users

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 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 NewDeleteUserRequest added in v1.15.1

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

NewDeleteUserRequest generates requests for DeleteUser

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 NewResetUserRequest added in v1.15.1

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

NewResetUserRequest generates requests for ResetUser

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) DeleteUser added in v1.15.1

func (c *Client) DeleteUser(ctx context.Context, projectID string, instanceID string, userID string, 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)

func (*Client) ResetUser added in v1.15.1

func (c *Client) ResetUser(ctx context.Context, projectID string, instanceID string, userID 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)

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

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

	// ResetUser request
	ResetUser(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) DeleteUserWithResponse added in v1.15.1

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

DeleteUserWithResponse request returning *DeleteUserResponse

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) ParseDeleteUserResponse added in v1.15.1

func (c *ClientWithResponses) ParseDeleteUserResponse(rsp *http.Response) (*DeleteUserResponse, error)

ParseDeleteUserResponse parses an HTTP response from a DeleteUserWithResponse 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

func (*ClientWithResponses) ParseResetUserResponse added in v1.15.1

func (c *ClientWithResponses) ParseResetUserResponse(rsp *http.Response) (*ResetUserResponse, error)

ParseResetUserResponse parses an HTTP response from a ResetUserWithResponse call

func (*ClientWithResponses) ResetUserWithResponse added in v1.15.1

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

ResetUserWithResponse request returning *ResetUserResponse

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)

	// DeleteUser request
	DeleteUserWithResponse(ctx context.Context, projectID string, instanceID string, userID string, reqEditors ...RequestEditorFn) (*DeleteUserResponse, error)

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

	// ResetUser request
	ResetUserWithResponse(ctx context.Context, projectID string, instanceID string, userID string, reqEditors ...RequestEditorFn) (*ResetUserResponse, error)
}

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

type CreateUserJSONRequestBody added in v1.5.1

type CreateUserJSONRequestBody = UserCreateUserRequest

CreateUserJSONRequestBody defines body for CreateUser for application/json ContentType.

type CreateUserResponse added in v1.5.1

type CreateUserResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *InstanceCreateUserResponse
	JSON400      *InstanceError
	Error        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 DeleteUserResponse added in v1.15.1

type DeleteUserResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON400      *InstanceError
	Error        error // Aggregated error
}

func (DeleteUserResponse) Status added in v1.15.1

func (r DeleteUserResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteUserResponse) StatusCode added in v1.15.1

func (r DeleteUserResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetUserResponse added in v1.4.0

type GetUserResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *UserGetUserResponse
	JSON400      *InstanceError
	Error        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
	Error        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 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 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 InstanceResetUserResponse added in v1.15.1

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

InstanceResetUserResponse defines model for instance.ResetUserResponse.

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

type ResetUserResponse added in v1.15.1

type ResetUserResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON202      *InstanceResetUserResponse
	JSON400      *InstanceError
	JSON404      *InstanceError
	JSON500      *InstanceError
	Error        error // Aggregated error
}

func (ResetUserResponse) Status added in v1.15.1

func (r ResetUserResponse) Status() string

Status returns HTTPResponse.Status

func (ResetUserResponse) StatusCode added in v1.15.1

func (r ResetUserResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UserCreateUserRequest added in v1.15.1

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

UserCreateUserRequest defines model for user.CreateUserRequest.

type UserGetUserResponse added in v1.15.1

type UserGetUserResponse struct {
	Item *UserResponseUser `json:"item,omitempty"`
}

UserGetUserResponse defines model for user.GetUserResponse.

type UserResponseUser added in v1.15.1

type UserResponseUser struct {
	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"`
}

UserResponseUser defines model for user.ResponseUser.

Jump to

Keyboard shortcuts

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