users

package
v1.14.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package users provides primitives to interact with the openapi HTTP API.

Code generated by github.com/do87/oapi-codegen version v0.5.1 DO NOT EDIT.

Index

Constants

View Source
const (
	BearerAuthScopes = "BearerAuth.Scopes"
)

Variables

This section is empty.

Functions

func NewCreateUserRequest added in v1.5.1

func NewCreateUserRequest(ctx context.Context, server string, projectID string, instanceID string, body CreateUserJSONRequestBody) (*http.Request, error)

NewCreateUserRequest calls the generic CreateUser builder with application/json body

func NewCreateUserRequestWithBody added in v1.5.1

func NewCreateUserRequestWithBody(ctx context.Context, server string, projectID string, instanceID string, contentType string, body io.Reader) (*http.Request, error)

NewCreateUserRequestWithBody generates requests for CreateUser with any type of body

func NewGetUserRequest added in v1.4.0

func NewGetUserRequest(ctx context.Context, server string, projectID string, instanceID string, userID string) (*http.Request, error)

NewGetUserRequest generates requests for GetUser

func NewGetUsersRequest added in v1.4.0

func NewGetUsersRequest(ctx context.Context, server string, projectID string, instanceID string) (*http.Request, error)

NewGetUsersRequest generates requests for GetUsers

Types

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client common.Client
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, httpClient common.Client) *Client

Creates a new Client, with reasonable defaults

func (*Client) CreateUser added in v1.5.1

func (c *Client) CreateUser(ctx context.Context, projectID string, instanceID string, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateUserWithBody added in v1.5.1

func (c *Client) CreateUserWithBody(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetUser added in v1.4.0

func (c *Client) GetUser(ctx context.Context, projectID string, instanceID string, userID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetUsers added in v1.4.0

func (c *Client) GetUsers(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// GetUsers request
	GetUsers(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateUser request with any body
	CreateUserWithBody(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateUser(ctx context.Context, projectID string, instanceID string, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetUser request
	GetUser(ctx context.Context, projectID string, instanceID string, userID string, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, httpClient common.Client) *ClientWithResponses

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) CreateUserWithBodyWithResponse added in v1.5.1

func (c *ClientWithResponses) CreateUserWithBodyWithResponse(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUserResponse, error)

CreateUserWithBodyWithResponse request with arbitrary body returning *CreateUserResponse

func (*ClientWithResponses) CreateUserWithResponse added in v1.5.1

func (c *ClientWithResponses) CreateUserWithResponse(ctx context.Context, projectID string, instanceID string, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUserResponse, error)

func (*ClientWithResponses) GetUserWithResponse added in v1.4.0

func (c *ClientWithResponses) GetUserWithResponse(ctx context.Context, projectID string, instanceID string, userID string, reqEditors ...RequestEditorFn) (*GetUserResponse, error)

GetUserWithResponse request returning *GetUserResponse

func (*ClientWithResponses) GetUsersWithResponse added in v1.4.0

func (c *ClientWithResponses) GetUsersWithResponse(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*GetUsersResponse, error)

GetUsersWithResponse request returning *GetUsersResponse

func (*ClientWithResponses) ParseCreateUserResponse added in v1.5.1

func (c *ClientWithResponses) ParseCreateUserResponse(rsp *http.Response) (*CreateUserResponse, error)

ParseCreateUserResponse parses an HTTP response from a CreateUserWithResponse call

func (*ClientWithResponses) ParseGetUserResponse added in v1.4.0

func (c *ClientWithResponses) ParseGetUserResponse(rsp *http.Response) (*GetUserResponse, error)

ParseGetUserResponse parses an HTTP response from a GetUserWithResponse call

func (*ClientWithResponses) ParseGetUsersResponse added in v1.4.0

func (c *ClientWithResponses) ParseGetUsersResponse(rsp *http.Response) (*GetUsersResponse, error)

ParseGetUsersResponse parses an HTTP response from a GetUsersWithResponse call

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetUsers request
	GetUsersWithResponse(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*GetUsersResponse, error)

	// CreateUser request with any body
	CreateUserWithBodyWithResponse(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUserResponse, error)

	CreateUserWithResponse(ctx context.Context, projectID string, instanceID string, body CreateUserJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUserResponse, error)

	// GetUser request
	GetUserWithResponse(ctx context.Context, projectID string, instanceID string, userID string, reqEditors ...RequestEditorFn) (*GetUserResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type CreateUserJSONRequestBody added in v1.5.1

type CreateUserJSONRequestBody = InstanceCreateUserRequest

CreateUserJSONRequestBody defines body for CreateUser for application/json ContentType.

type CreateUserResponse added in v1.5.1

type CreateUserResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *InstanceCreateUserResponse
	JSON400      *InstanceError
	HasError     error // Aggregated error
}

func (CreateUserResponse) Status added in v1.5.1

func (r CreateUserResponse) Status() string

Status returns HTTPResponse.Status

func (CreateUserResponse) StatusCode added in v1.5.1

func (r CreateUserResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetUserResponse added in v1.4.0

type GetUserResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *InstanceGetUserResponse
	JSON400      *InstanceError
	HasError     error // Aggregated error
}

func (GetUserResponse) Status added in v1.4.0

func (r GetUserResponse) Status() string

Status returns HTTPResponse.Status

func (GetUserResponse) StatusCode added in v1.4.0

func (r GetUserResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetUsersResponse added in v1.4.0

type GetUsersResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *InstanceListUserResponse
	JSON400      *InstanceError
	HasError     error // Aggregated error
}

func (GetUsersResponse) Status added in v1.4.0

func (r GetUsersResponse) Status() string

Status returns HTTPResponse.Status

func (GetUsersResponse) StatusCode added in v1.4.0

func (r GetUsersResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type InstanceCreateUserRequest

type InstanceCreateUserRequest struct {
	Database *string   `json:"database,omitempty"`
	Roles    *[]string `json:"roles,omitempty"`
	Username *string   `json:"username,omitempty"`
}

InstanceCreateUserRequest defines model for instance.CreateUserRequest.

type InstanceCreateUserResponse

type InstanceCreateUserResponse struct {
	Item *InstanceUser `json:"item,omitempty"`
}

InstanceCreateUserResponse defines model for instance.CreateUserResponse.

type InstanceError

type InstanceError struct {
	Code    *int                 `json:"code,omitempty"`
	Fields  *map[string][]string `json:"fields,omitempty"`
	Message *string              `json:"message,omitempty"`
	Type    *string              `json:"type,omitempty"`
}

InstanceError defines model for instance.Error.

type InstanceGetUserResponse

type InstanceGetUserResponse struct {
	Item *InstanceResponseUser `json:"item,omitempty"`
}

InstanceGetUserResponse defines model for instance.GetUserResponse.

type InstanceListUser

type InstanceListUser struct {
	ID       *string `json:"id,omitempty"`
	Username *string `json:"username,omitempty"`
}

InstanceListUser defines model for instance.ListUser.

type InstanceListUserResponse

type InstanceListUserResponse struct {
	Count *int                `json:"count,omitempty"`
	Items *[]InstanceListUser `json:"items,omitempty"`
}

InstanceListUserResponse defines model for instance.ListUserResponse.

type InstanceResponseUser

type InstanceResponseUser struct {
	Database *string   `json:"database,omitempty"`
	Host     *string   `json:"host,omitempty"`
	ID       *string   `json:"id,omitempty"`
	Port     *int      `json:"port,omitempty"`
	Roles    *[]string `json:"roles,omitempty"`
	Username *string   `json:"username,omitempty"`
}

InstanceResponseUser defines model for instance.ResponseUser.

type InstanceUser

type InstanceUser struct {
	Database *string   `json:"database,omitempty"`
	Host     *string   `json:"host,omitempty"`
	ID       *string   `json:"id,omitempty"`
	Password *string   `json:"password,omitempty"`
	Port     *int      `json:"port,omitempty"`
	Roles    *[]string `json:"roles,omitempty"`
	Uri      *string   `json:"uri,omitempty"`
	Username *string   `json:"username,omitempty"`
}

InstanceUser defines model for instance.User.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL