users

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2022 License: Apache-2.0 Imports: 10 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.4.0 DO NOT EDIT.

Index

Constants

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

Variables

This section is empty.

Functions

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

func NewPostInstanceUsersRequest

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

NewPostInstanceUsersRequest calls the generic PostInstanceUsers builder with application/json body

func NewPostInstanceUsersRequestWithBody

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

NewPostInstanceUsersRequestWithBody generates requests for PostInstanceUsers 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 NewClient

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

Creates a new Client, with reasonable defaults

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)

func (*Client) PostInstanceUsers

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

func (*Client) PostInstanceUsersWithBody

func (c *Client) PostInstanceUsersWithBody(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, 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)

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

	PostInstanceUsers(ctx context.Context, projectID string, instanceID string, body PostInstanceUsersJSONRequestBody, 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) 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) 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

func (*ClientWithResponses) ParsePostInstanceUsersResponse

func (c *ClientWithResponses) ParsePostInstanceUsersResponse(rsp *http.Response) (*PostInstanceUsersResponse, error)

ParsePostInstanceUsersResponse parses an HTTP response from a PostInstanceUsersWithResponse call

func (*ClientWithResponses) PostInstanceUsersWithBodyWithResponse

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

PostInstanceUsersWithBodyWithResponse request with arbitrary body returning *PostInstanceUsersResponse

func (*ClientWithResponses) PostInstanceUsersWithResponse

func (c *ClientWithResponses) PostInstanceUsersWithResponse(ctx context.Context, projectID string, instanceID string, body PostInstanceUsersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostInstanceUsersResponse, error)

type ClientWithResponsesInterface

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

	// PostInstanceUsers request with any body
	PostInstanceUsersWithBodyWithResponse(ctx context.Context, projectID string, instanceID string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostInstanceUsersResponse, error)

	PostInstanceUsersWithResponse(ctx context.Context, projectID string, instanceID string, body PostInstanceUsersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostInstanceUsersResponse, 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 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 PostInstanceUsersJSONRequestBody

type PostInstanceUsersJSONRequestBody = InstanceCreateUserRequest

PostInstanceUsersJSONRequestBody defines body for PostInstanceUsers for application/json ContentType.

type PostInstanceUsersResponse

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

func (PostInstanceUsersResponse) Status

func (r PostInstanceUsersResponse) Status() string

Status returns HTTPResponse.Status

func (PostInstanceUsersResponse) StatusCode

func (r PostInstanceUsersResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

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