Documentation ¶
Overview ¶
Package user 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
- func NewCreateRequest(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- func NewCreateRequestWithBody(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- func NewDeleteRequest(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- func NewGetRequest(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- func NewListRequest(ctx context.Context, server string, projectID string, instanceID string) (*http.Request, error)
- func NewPatchRequest(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- func NewPatchRequestWithBody(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- func NewResetPasswordRequest(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- func NewUpdateRequest(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- func NewUpdateRequestWithBody(ctx context.Context, server string, projectID string, instanceID string, ...) (*http.Request, error)
- type Client
- func (c *Client) Create(ctx context.Context, projectID string, instanceID string, ...) (*http.Response, error)
- func (c *Client) CreateWithBody(ctx context.Context, projectID string, instanceID string, contentType string, ...) (*http.Response, error)
- func (c *Client) Delete(ctx context.Context, projectID string, instanceID string, userID string, ...) (*http.Response, error)
- func (c *Client) Get(ctx context.Context, projectID string, instanceID string, userID string, ...) (*http.Response, error)
- func (c *Client) List(ctx context.Context, projectID string, instanceID string, ...) (*http.Response, error)
- func (c *Client) Patch(ctx context.Context, projectID string, instanceID string, userID string, ...) (*http.Response, error)
- func (c *Client) PatchWithBody(ctx context.Context, projectID string, instanceID string, userID string, ...) (*http.Response, error)
- func (c *Client) ResetPassword(ctx context.Context, projectID string, instanceID string, userID string, ...) (*http.Response, error)
- func (c *Client) Update(ctx context.Context, projectID string, instanceID string, userID string, ...) (*http.Response, error)
- func (c *Client) UpdateWithBody(ctx context.Context, projectID string, instanceID string, userID string, ...) (*http.Response, error)
- type ClientInterface
- type ClientWithResponses
- func (c *ClientWithResponses) CreateWithBodyWithResponse(ctx context.Context, projectID string, instanceID string, contentType string, ...) (*CreateResponse, error)
- func (c *ClientWithResponses) CreateWithResponse(ctx context.Context, projectID string, instanceID string, ...) (*CreateResponse, error)
- func (c *ClientWithResponses) DeleteWithResponse(ctx context.Context, projectID string, instanceID string, userID string, ...) (*DeleteResponse, error)
- func (c *ClientWithResponses) GetWithResponse(ctx context.Context, projectID string, instanceID string, userID string, ...) (*GetResponse, error)
- func (c *ClientWithResponses) ListWithResponse(ctx context.Context, projectID string, instanceID string, ...) (*ListResponse, error)
- func (c *ClientWithResponses) ParseCreateResponse(rsp *http.Response) (*CreateResponse, error)
- func (c *ClientWithResponses) ParseDeleteResponse(rsp *http.Response) (*DeleteResponse, error)
- func (c *ClientWithResponses) ParseGetResponse(rsp *http.Response) (*GetResponse, error)
- func (c *ClientWithResponses) ParseListResponse(rsp *http.Response) (*ListResponse, error)
- func (c *ClientWithResponses) ParsePatchResponse(rsp *http.Response) (*PatchResponse, error)
- func (c *ClientWithResponses) ParseResetPasswordResponse(rsp *http.Response) (*ResetPasswordResponse, error)
- func (c *ClientWithResponses) ParseUpdateResponse(rsp *http.Response) (*UpdateResponse, error)
- func (c *ClientWithResponses) PatchWithBodyWithResponse(ctx context.Context, projectID string, instanceID string, userID string, ...) (*PatchResponse, error)
- func (c *ClientWithResponses) PatchWithResponse(ctx context.Context, projectID string, instanceID string, userID string, ...) (*PatchResponse, error)
- func (c *ClientWithResponses) ResetPasswordWithResponse(ctx context.Context, projectID string, instanceID string, userID string, ...) (*ResetPasswordResponse, error)
- func (c *ClientWithResponses) UpdateWithBodyWithResponse(ctx context.Context, projectID string, instanceID string, userID string, ...) (*UpdateResponse, error)
- func (c *ClientWithResponses) UpdateWithResponse(ctx context.Context, projectID string, instanceID string, userID string, ...) (*UpdateResponse, error)
- type ClientWithResponsesInterface
- type CreateJSONRequestBody
- type CreateResponse
- type DeleteResponse
- type GetResponse
- type InstanceCreateUserRequest
- type InstanceCreateUserResponse
- type InstanceError
- type InstanceGetUserResponse
- type InstanceListUser
- type InstanceListUserResponse
- type InstanceResponseUser
- type InstanceUpdateUserRequest
- type InstanceUser
- type ListResponse
- type PatchJSONRequestBody
- type PatchResponse
- type RequestEditorFn
- type ResetPasswordResponse
- type UpdateJSONRequestBody
- type UpdateResponse
Constants ¶
const (
BearerAuthScopes = "BearerAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func NewCreateRequest ¶
func NewCreateRequest(ctx context.Context, server string, projectID string, instanceID string, body CreateJSONRequestBody) (*http.Request, error)
NewCreateRequest calls the generic Create builder with application/json body
func NewCreateRequestWithBody ¶
func NewCreateRequestWithBody(ctx context.Context, server string, projectID string, instanceID string, contentType string, body io.Reader) (*http.Request, error)
NewCreateRequestWithBody generates requests for Create with any type of body
func NewDeleteRequest ¶
func NewDeleteRequest(ctx context.Context, server string, projectID string, instanceID string, userID string) (*http.Request, error)
NewDeleteRequest generates requests for Delete
func NewGetRequest ¶
func NewGetRequest(ctx context.Context, server string, projectID string, instanceID string, userID string) (*http.Request, error)
NewGetRequest generates requests for Get
func NewListRequest ¶
func NewListRequest(ctx context.Context, server string, projectID string, instanceID string) (*http.Request, error)
NewListRequest generates requests for List
func NewPatchRequest ¶
func NewPatchRequest(ctx context.Context, server string, projectID string, instanceID string, userID string, body PatchJSONRequestBody) (*http.Request, error)
NewPatchRequest calls the generic Patch builder with application/json body
func NewPatchRequestWithBody ¶
func NewPatchRequestWithBody(ctx context.Context, server string, projectID string, instanceID string, userID string, contentType string, body io.Reader) (*http.Request, error)
NewPatchRequestWithBody generates requests for Patch with any type of body
func NewResetPasswordRequest ¶
func NewResetPasswordRequest(ctx context.Context, server string, projectID string, instanceID string, userID string) (*http.Request, error)
NewResetPasswordRequest generates requests for ResetPassword
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) Create ¶
func (c *Client) Create(ctx context.Context, projectID string, instanceID string, body CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateWithBody ¶
func (*Client) PatchWithBody ¶
func (*Client) ResetPassword ¶
type ClientInterface ¶
type ClientInterface interface { // List request List(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*http.Response, error) // Create request with any body CreateWithBody(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) Create(ctx context.Context, projectID string, instanceID string, body CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // Delete request Delete(ctx context.Context, projectID string, instanceID string, userID string, reqEditors ...RequestEditorFn) (*http.Response, error) // Get request Get(ctx context.Context, projectID string, instanceID string, userID string, reqEditors ...RequestEditorFn) (*http.Response, error) // Patch request with any body PatchWithBody(ctx context.Context, projectID string, instanceID string, userID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) Patch(ctx context.Context, projectID string, instanceID string, userID string, body PatchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // Update request with any body UpdateWithBody(ctx context.Context, projectID string, instanceID string, userID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) Update(ctx context.Context, projectID string, instanceID string, userID string, body UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // ResetPassword request ResetPassword(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) CreateWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateWithBodyWithResponse(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateResponse, error)
CreateWithBodyWithResponse request with arbitrary body returning *CreateResponse
func (*ClientWithResponses) CreateWithResponse ¶
func (c *ClientWithResponses) CreateWithResponse(ctx context.Context, projectID string, instanceID string, body CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateResponse, error)
func (*ClientWithResponses) DeleteWithResponse ¶
func (c *ClientWithResponses) DeleteWithResponse(ctx context.Context, projectID string, instanceID string, userID string, reqEditors ...RequestEditorFn) (*DeleteResponse, error)
DeleteWithResponse request returning *DeleteResponse
func (*ClientWithResponses) GetWithResponse ¶
func (c *ClientWithResponses) GetWithResponse(ctx context.Context, projectID string, instanceID string, userID string, reqEditors ...RequestEditorFn) (*GetResponse, error)
GetWithResponse request returning *GetResponse
func (*ClientWithResponses) ListWithResponse ¶
func (c *ClientWithResponses) ListWithResponse(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*ListResponse, error)
ListWithResponse request returning *ListResponse
func (*ClientWithResponses) ParseCreateResponse ¶
func (c *ClientWithResponses) ParseCreateResponse(rsp *http.Response) (*CreateResponse, error)
ParseCreateResponse parses an HTTP response from a CreateWithResponse call
func (*ClientWithResponses) ParseDeleteResponse ¶
func (c *ClientWithResponses) ParseDeleteResponse(rsp *http.Response) (*DeleteResponse, error)
ParseDeleteResponse parses an HTTP response from a DeleteWithResponse call
func (*ClientWithResponses) ParseGetResponse ¶
func (c *ClientWithResponses) ParseGetResponse(rsp *http.Response) (*GetResponse, error)
ParseGetResponse parses an HTTP response from a GetWithResponse call
func (*ClientWithResponses) ParseListResponse ¶
func (c *ClientWithResponses) ParseListResponse(rsp *http.Response) (*ListResponse, error)
ParseListResponse parses an HTTP response from a ListWithResponse call
func (*ClientWithResponses) ParsePatchResponse ¶
func (c *ClientWithResponses) ParsePatchResponse(rsp *http.Response) (*PatchResponse, error)
ParsePatchResponse parses an HTTP response from a PatchWithResponse call
func (*ClientWithResponses) ParseResetPasswordResponse ¶
func (c *ClientWithResponses) ParseResetPasswordResponse(rsp *http.Response) (*ResetPasswordResponse, error)
ParseResetPasswordResponse parses an HTTP response from a ResetPasswordWithResponse call
func (*ClientWithResponses) ParseUpdateResponse ¶
func (c *ClientWithResponses) ParseUpdateResponse(rsp *http.Response) (*UpdateResponse, error)
ParseUpdateResponse parses an HTTP response from a UpdateWithResponse call
func (*ClientWithResponses) PatchWithBodyWithResponse ¶
func (c *ClientWithResponses) PatchWithBodyWithResponse(ctx context.Context, projectID string, instanceID string, userID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchResponse, error)
PatchWithBodyWithResponse request with arbitrary body returning *PatchResponse
func (*ClientWithResponses) PatchWithResponse ¶
func (c *ClientWithResponses) PatchWithResponse(ctx context.Context, projectID string, instanceID string, userID string, body PatchJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchResponse, error)
func (*ClientWithResponses) ResetPasswordWithResponse ¶
func (c *ClientWithResponses) ResetPasswordWithResponse(ctx context.Context, projectID string, instanceID string, userID string, reqEditors ...RequestEditorFn) (*ResetPasswordResponse, error)
ResetPasswordWithResponse request returning *ResetPasswordResponse
func (*ClientWithResponses) UpdateWithBodyWithResponse ¶
func (c *ClientWithResponses) UpdateWithBodyWithResponse(ctx context.Context, projectID string, instanceID string, userID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateResponse, error)
UpdateWithBodyWithResponse request with arbitrary body returning *UpdateResponse
func (*ClientWithResponses) UpdateWithResponse ¶
func (c *ClientWithResponses) UpdateWithResponse(ctx context.Context, projectID string, instanceID string, userID string, body UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface { // List request ListWithResponse(ctx context.Context, projectID string, instanceID string, reqEditors ...RequestEditorFn) (*ListResponse, error) // Create request with any body CreateWithBodyWithResponse(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateResponse, error) CreateWithResponse(ctx context.Context, projectID string, instanceID string, body CreateJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateResponse, error) // Delete request DeleteWithResponse(ctx context.Context, projectID string, instanceID string, userID string, reqEditors ...RequestEditorFn) (*DeleteResponse, error) // Get request GetWithResponse(ctx context.Context, projectID string, instanceID string, userID string, reqEditors ...RequestEditorFn) (*GetResponse, error) // Patch request with any body PatchWithBodyWithResponse(ctx context.Context, projectID string, instanceID string, userID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchResponse, error) PatchWithResponse(ctx context.Context, projectID string, instanceID string, userID string, body PatchJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchResponse, error) // Update request with any body UpdateWithBodyWithResponse(ctx context.Context, projectID string, instanceID string, userID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateResponse, error) UpdateWithResponse(ctx context.Context, projectID string, instanceID string, userID string, body UpdateJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateResponse, error) // ResetPassword request ResetPasswordWithResponse(ctx context.Context, projectID string, instanceID string, userID string, reqEditors ...RequestEditorFn) (*ResetPasswordResponse, error) }
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CreateJSONRequestBody ¶
type CreateJSONRequestBody = InstanceCreateUserRequest
CreateJSONRequestBody defines body for Create for application/json ContentType.
type CreateResponse ¶
type CreateResponse struct { Body []byte HTTPResponse *http.Response JSON202 *InstanceCreateUserResponse JSON400 *InstanceError JSON404 *InstanceError JSON409 *InstanceError JSON500 *InstanceError HasError error // Aggregated error }
func (CreateResponse) Status ¶
func (r CreateResponse) Status() string
Status returns HTTPResponse.Status
func (CreateResponse) StatusCode ¶
func (r CreateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteResponse ¶
type DeleteResponse struct { Body []byte HTTPResponse *http.Response JSON404 *InstanceError JSON500 *InstanceError HasError error // Aggregated error }
func (DeleteResponse) Status ¶
func (r DeleteResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteResponse) StatusCode ¶
func (r DeleteResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetResponse ¶
type GetResponse struct { Body []byte HTTPResponse *http.Response JSON200 *InstanceGetUserResponse JSON404 *InstanceError JSON500 *InstanceError HasError error // Aggregated error }
func (GetResponse) StatusCode ¶
func (r GetResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type InstanceCreateUserRequest ¶
type InstanceCreateUserRequest struct { Database string `json:"database"` // Roles available roles are "read" or "readWrite" Roles []string `json:"roles"` // Username if provided it must match the regex "^[a-zA-Z][a-zA-Z0-9_-]{1,30}[a-zA-Z0-9]$" 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 InstanceUpdateUserRequest ¶
type InstanceUpdateUserRequest struct { Database *string `json:"database,omitempty"` Roles *[]string `json:"roles,omitempty"` }
InstanceUpdateUserRequest defines model for instance.UpdateUserRequest.
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 ListResponse ¶
type ListResponse struct { Body []byte HTTPResponse *http.Response JSON200 *InstanceListUserResponse JSON404 *InstanceError JSON500 *InstanceError HasError error // Aggregated error }
func (ListResponse) Status ¶
func (r ListResponse) Status() string
Status returns HTTPResponse.Status
func (ListResponse) StatusCode ¶
func (r ListResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type PatchJSONRequestBody ¶
type PatchJSONRequestBody = InstanceUpdateUserRequest
PatchJSONRequestBody defines body for Patch for application/json ContentType.
type PatchResponse ¶
type PatchResponse struct { Body []byte HTTPResponse *http.Response JSON400 *InstanceError JSON404 *InstanceError JSON409 *InstanceError HasError error // Aggregated error }
func (PatchResponse) Status ¶
func (r PatchResponse) Status() string
Status returns HTTPResponse.Status
func (PatchResponse) StatusCode ¶
func (r PatchResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type ResetPasswordResponse ¶
type ResetPasswordResponse struct { Body []byte HTTPResponse *http.Response JSON202 *InstanceUser JSON404 *InstanceError JSON500 *InstanceError HasError error // Aggregated error }
func (ResetPasswordResponse) Status ¶
func (r ResetPasswordResponse) Status() string
Status returns HTTPResponse.Status
func (ResetPasswordResponse) StatusCode ¶
func (r ResetPasswordResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type UpdateJSONRequestBody ¶
type UpdateJSONRequestBody = InstanceUpdateUserRequest
UpdateJSONRequestBody defines body for Update for application/json ContentType.
type UpdateResponse ¶
type UpdateResponse struct { Body []byte HTTPResponse *http.Response JSON400 *InstanceError JSON404 *InstanceError JSON409 *InstanceError HasError error // Aggregated error }
func (UpdateResponse) Status ¶
func (r UpdateResponse) Status() string
Status returns HTTPResponse.Status
func (UpdateResponse) StatusCode ¶
func (r UpdateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode