Documentation ¶
Overview ¶
Package users provides primitives to interact with the openapi HTTP API.
Code generated by github.com/do87/oapi-codegen version v0.4.0 DO NOT EDIT.
Index ¶
- Constants
- func NewCreateUserRequest(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- func NewCreateUserRequestWithBody(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- func NewGetUserRequest(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- func NewGetUsersRequest(ctx context.Context, server string, projectID string, instanceID string) (*http.Request, error)
- type Client
- func (c *Client) CreateUser(ctx context.Context, projectID string, instanceID string, ...) (*http.Response, error)
- func (c *Client) CreateUserWithBody(ctx context.Context, projectID string, instanceID string, contentType string, ...) (*http.Response, error)
- func (c *Client) GetUser(ctx context.Context, projectID string, instanceID string, userID string, ...) (*http.Response, error)
- func (c *Client) GetUsers(ctx context.Context, projectID string, instanceID string, ...) (*http.Response, error)
- type ClientInterface
- type ClientWithResponses
- func (c *ClientWithResponses) CreateUserWithBodyWithResponse(ctx context.Context, projectID string, instanceID string, contentType string, ...) (*CreateUserResponse, error)
- func (c *ClientWithResponses) CreateUserWithResponse(ctx context.Context, projectID string, instanceID string, ...) (*CreateUserResponse, error)
- func (c *ClientWithResponses) GetUserWithResponse(ctx context.Context, projectID string, instanceID string, userID string, ...) (*GetUserResponse, error)
- func (c *ClientWithResponses) GetUsersWithResponse(ctx context.Context, projectID string, instanceID string, ...) (*GetUsersResponse, error)
- func (c *ClientWithResponses) ParseCreateUserResponse(rsp *http.Response) (*CreateUserResponse, error)
- func (c *ClientWithResponses) ParseGetUserResponse(rsp *http.Response) (*GetUserResponse, error)
- func (c *ClientWithResponses) ParseGetUsersResponse(rsp *http.Response) (*GetUsersResponse, error)
- type ClientWithResponsesInterface
- type CreateUserJSONRequestBody
- type CreateUserResponse
- type GetUserResponse
- type GetUsersResponse
- type InstanceCreateUserRequest
- type InstanceCreateUserResponse
- type InstanceError
- type InstanceGetUserResponse
- type InstanceListUser
- type InstanceListUserResponse
- type InstanceResponseUser
- type InstanceUser
- type RequestEditorFn
Constants ¶
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
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 (*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
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.