gen

package
v0.0.0-...-32533e6 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

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

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

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

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

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

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.

Index

Constants

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

Variables

This section is empty.

Functions

func Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler

HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.

func HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

func NewDeleteSatellitesIdRequest

func NewDeleteSatellitesIdRequest(server string, id openapi_types.UUID) (*http.Request, error)

NewDeleteSatellitesIdRequest generates requests for DeleteSatellitesId

func NewDeleteUsersIdRequest

func NewDeleteUsersIdRequest(server string, id openapi_types.UUID) (*http.Request, error)

NewDeleteUsersIdRequest generates requests for DeleteUsersId

func NewGetHealthRequest

func NewGetHealthRequest(server string) (*http.Request, error)

NewGetHealthRequest generates requests for GetHealth

func NewGetSatellitesIdRequest

func NewGetSatellitesIdRequest(server string, id openapi_types.UUID) (*http.Request, error)

NewGetSatellitesIdRequest generates requests for GetSatellitesId

func NewGetSatellitesRequest

func NewGetSatellitesRequest(server string) (*http.Request, error)

NewGetSatellitesRequest generates requests for GetSatellites

func NewGetUsersRequest

func NewGetUsersRequest(server string) (*http.Request, error)

NewGetUsersRequest generates requests for GetUsers

func NewGetVersionRequest

func NewGetVersionRequest(server string) (*http.Request, error)

NewGetVersionRequest generates requests for GetVersion

func NewPatchSatellitesIdRequest

func NewPatchSatellitesIdRequest(server string, id openapi_types.UUID, body PatchSatellitesIdJSONRequestBody) (*http.Request, error)

NewPatchSatellitesIdRequest calls the generic PatchSatellitesId builder with application/json body

func NewPatchSatellitesIdRequestWithBody

func NewPatchSatellitesIdRequestWithBody(server string, id openapi_types.UUID, contentType string, body io.Reader) (*http.Request, error)

NewPatchSatellitesIdRequestWithBody generates requests for PatchSatellitesId with any type of body

func NewPostAuthLoginRequest

func NewPostAuthLoginRequest(server string, body PostAuthLoginJSONRequestBody) (*http.Request, error)

NewPostAuthLoginRequest calls the generic PostAuthLogin builder with application/json body

func NewPostAuthLoginRequestWithBody

func NewPostAuthLoginRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPostAuthLoginRequestWithBody generates requests for PostAuthLogin with any type of body

func NewPostSatellitesIdHeartbeatRequest

func NewPostSatellitesIdHeartbeatRequest(server string, id openapi_types.UUID) (*http.Request, error)

NewPostSatellitesIdHeartbeatRequest generates requests for PostSatellitesIdHeartbeat

func NewPostSatellitesRequest

func NewPostSatellitesRequest(server string, body PostSatellitesJSONRequestBody) (*http.Request, error)

NewPostSatellitesRequest calls the generic PostSatellites builder with application/json body

func NewPostSatellitesRequestWithBody

func NewPostSatellitesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPostSatellitesRequestWithBody generates requests for PostSatellites with any type of body

func NewPostUsersRequest

func NewPostUsersRequest(server string, body PostUsersJSONRequestBody) (*http.Request, error)

NewPostUsersRequest calls the generic PostUsers builder with application/json body

func NewPostUsersRequestWithBody

func NewPostUsersRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewPostUsersRequestWithBody generates requests for PostUsers with any type of body

Types

type ChiServerOptions

type ChiServerOptions struct {
	BaseURL          string
	BaseRouter       chi.Router
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

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 HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) DeleteSatellitesId

func (c *Client) DeleteSatellitesId(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteUsersId

func (c *Client) DeleteUsersId(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetHealth

func (c *Client) GetHealth(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetSatellites

func (c *Client) GetSatellites(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetSatellitesId

func (c *Client) GetSatellitesId(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetUsers

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

func (*Client) GetVersion

func (c *Client) GetVersion(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PatchSatellitesId

func (c *Client) PatchSatellitesId(ctx context.Context, id openapi_types.UUID, body PatchSatellitesIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PatchSatellitesIdWithBody

func (c *Client) PatchSatellitesIdWithBody(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostAuthLogin

func (c *Client) PostAuthLogin(ctx context.Context, body PostAuthLoginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostAuthLoginWithBody

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

func (*Client) PostSatellites

func (c *Client) PostSatellites(ctx context.Context, body PostSatellitesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostSatellitesIdHeartbeat

func (c *Client) PostSatellitesIdHeartbeat(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostSatellitesWithBody

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

func (*Client) PostUsers

func (c *Client) PostUsers(ctx context.Context, body PostUsersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PostUsersWithBody

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

type ClientInterface

type ClientInterface interface {
	// PostAuthLoginWithBody request with any body
	PostAuthLoginWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PostAuthLogin(ctx context.Context, body PostAuthLoginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetHealth request
	GetHealth(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetSatellites request
	GetSatellites(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	PostSatellites(ctx context.Context, body PostSatellitesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteSatellitesId request
	DeleteSatellitesId(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetSatellitesId request
	GetSatellitesId(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PatchSatellitesIdWithBody request with any body
	PatchSatellitesIdWithBody(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PatchSatellitesId(ctx context.Context, id openapi_types.UUID, body PatchSatellitesIdJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PostSatellitesIdHeartbeat request
	PostSatellitesIdHeartbeat(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetUsers request
	GetUsers(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	PostUsers(ctx context.Context, body PostUsersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteUsersId request
	DeleteUsersId(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetVersion request
	GetVersion(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

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

func (*ClientWithResponses) DeleteSatellitesIdWithResponse

func (c *ClientWithResponses) DeleteSatellitesIdWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*DeleteSatellitesIdResponse, error)

DeleteSatellitesIdWithResponse request returning *DeleteSatellitesIdResponse

func (*ClientWithResponses) DeleteUsersIdWithResponse

func (c *ClientWithResponses) DeleteUsersIdWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*DeleteUsersIdResponse, error)

DeleteUsersIdWithResponse request returning *DeleteUsersIdResponse

func (*ClientWithResponses) GetHealthWithResponse

func (c *ClientWithResponses) GetHealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHealthResponse, error)

GetHealthWithResponse request returning *GetHealthResponse

func (*ClientWithResponses) GetSatellitesIdWithResponse

func (c *ClientWithResponses) GetSatellitesIdWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetSatellitesIdResponse, error)

GetSatellitesIdWithResponse request returning *GetSatellitesIdResponse

func (*ClientWithResponses) GetSatellitesWithResponse

func (c *ClientWithResponses) GetSatellitesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetSatellitesResponse, error)

GetSatellitesWithResponse request returning *GetSatellitesResponse

func (*ClientWithResponses) GetUsersWithResponse

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

GetUsersWithResponse request returning *GetUsersResponse

func (*ClientWithResponses) GetVersionWithResponse

func (c *ClientWithResponses) GetVersionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetVersionResponse, error)

GetVersionWithResponse request returning *GetVersionResponse

func (*ClientWithResponses) PatchSatellitesIdWithBodyWithResponse

func (c *ClientWithResponses) PatchSatellitesIdWithBodyWithResponse(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchSatellitesIdResponse, error)

PatchSatellitesIdWithBodyWithResponse request with arbitrary body returning *PatchSatellitesIdResponse

func (*ClientWithResponses) PatchSatellitesIdWithResponse

func (*ClientWithResponses) PostAuthLoginWithBodyWithResponse

func (c *ClientWithResponses) PostAuthLoginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostAuthLoginResponse, error)

PostAuthLoginWithBodyWithResponse request with arbitrary body returning *PostAuthLoginResponse

func (*ClientWithResponses) PostAuthLoginWithResponse

func (c *ClientWithResponses) PostAuthLoginWithResponse(ctx context.Context, body PostAuthLoginJSONRequestBody, reqEditors ...RequestEditorFn) (*PostAuthLoginResponse, error)

func (*ClientWithResponses) PostSatellitesIdHeartbeatWithResponse

func (c *ClientWithResponses) PostSatellitesIdHeartbeatWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*PostSatellitesIdHeartbeatResponse, error)

PostSatellitesIdHeartbeatWithResponse request returning *PostSatellitesIdHeartbeatResponse

func (*ClientWithResponses) PostSatellitesWithBodyWithResponse

func (c *ClientWithResponses) PostSatellitesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostSatellitesResponse, error)

PostSatellitesWithBodyWithResponse request with arbitrary body returning *PostSatellitesResponse

func (*ClientWithResponses) PostSatellitesWithResponse

func (c *ClientWithResponses) PostSatellitesWithResponse(ctx context.Context, body PostSatellitesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostSatellitesResponse, error)

func (*ClientWithResponses) PostUsersWithBodyWithResponse

func (c *ClientWithResponses) PostUsersWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostUsersResponse, error)

PostUsersWithBodyWithResponse request with arbitrary body returning *PostUsersResponse

func (*ClientWithResponses) PostUsersWithResponse

func (c *ClientWithResponses) PostUsersWithResponse(ctx context.Context, body PostUsersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostUsersResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// PostAuthLoginWithBodyWithResponse request with any body
	PostAuthLoginWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostAuthLoginResponse, error)

	PostAuthLoginWithResponse(ctx context.Context, body PostAuthLoginJSONRequestBody, reqEditors ...RequestEditorFn) (*PostAuthLoginResponse, error)

	// GetHealthWithResponse request
	GetHealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetHealthResponse, error)

	// GetSatellitesWithResponse request
	GetSatellitesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetSatellitesResponse, error)

	// PostSatellitesWithBodyWithResponse request with any body
	PostSatellitesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostSatellitesResponse, error)

	PostSatellitesWithResponse(ctx context.Context, body PostSatellitesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostSatellitesResponse, error)

	// DeleteSatellitesIdWithResponse request
	DeleteSatellitesIdWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*DeleteSatellitesIdResponse, error)

	// GetSatellitesIdWithResponse request
	GetSatellitesIdWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetSatellitesIdResponse, error)

	// PatchSatellitesIdWithBodyWithResponse request with any body
	PatchSatellitesIdWithBodyWithResponse(ctx context.Context, id openapi_types.UUID, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchSatellitesIdResponse, error)

	PatchSatellitesIdWithResponse(ctx context.Context, id openapi_types.UUID, body PatchSatellitesIdJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchSatellitesIdResponse, error)

	// PostSatellitesIdHeartbeatWithResponse request
	PostSatellitesIdHeartbeatWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*PostSatellitesIdHeartbeatResponse, error)

	// GetUsersWithResponse request
	GetUsersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetUsersResponse, error)

	// PostUsersWithBodyWithResponse request with any body
	PostUsersWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostUsersResponse, error)

	PostUsersWithResponse(ctx context.Context, body PostUsersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostUsersResponse, error)

	// DeleteUsersIdWithResponse request
	DeleteUsersIdWithResponse(ctx context.Context, id openapi_types.UUID, reqEditors ...RequestEditorFn) (*DeleteUsersIdResponse, error)

	// GetVersionWithResponse request
	GetVersionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetVersionResponse, error)
}

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

type CreateSatelliteRequest

type CreateSatelliteRequest struct {
	Name   string `json:"name"`
	Region string `json:"region"`
}

CreateSatelliteRequest defines model for CreateSatelliteRequest.

type CreateUserRequest

type CreateUserRequest struct {
	Password string                 `json:"password"`
	Role     *CreateUserRequestRole `json:"role,omitempty"`
	Username string                 `json:"username"`
}

CreateUserRequest defines model for CreateUserRequest.

type CreateUserRequestRole

type CreateUserRequestRole string

CreateUserRequestRole defines model for CreateUserRequest.Role.

const (
	CreateUserRequestRoleAdmin  CreateUserRequestRole = "admin"
	CreateUserRequestRoleViewer CreateUserRequestRole = "viewer"
)

Defines values for CreateUserRequestRole.

type DeleteSatellitesIdResponse

type DeleteSatellitesIdResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON403      *Forbidden
	JSON404      *NotFound
}

func ParseDeleteSatellitesIdResponse

func ParseDeleteSatellitesIdResponse(rsp *http.Response) (*DeleteSatellitesIdResponse, error)

ParseDeleteSatellitesIdResponse parses an HTTP response from a DeleteSatellitesIdWithResponse call

func (DeleteSatellitesIdResponse) Status

Status returns HTTPResponse.Status

func (DeleteSatellitesIdResponse) StatusCode

func (r DeleteSatellitesIdResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteUsersIdResponse

type DeleteUsersIdResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON403      *Forbidden
	JSON404      *NotFound
}

func ParseDeleteUsersIdResponse

func ParseDeleteUsersIdResponse(rsp *http.Response) (*DeleteUsersIdResponse, error)

ParseDeleteUsersIdResponse parses an HTTP response from a DeleteUsersIdWithResponse call

func (DeleteUsersIdResponse) Status

func (r DeleteUsersIdResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteUsersIdResponse) StatusCode

func (r DeleteUsersIdResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ErrorResponse

type ErrorResponse struct {
	Error *struct {
		Code    *string `json:"code,omitempty"`
		Message *string `json:"message,omitempty"`
	} `json:"error,omitempty"`
}

ErrorResponse defines model for ErrorResponse.

type Forbidden

type Forbidden = ErrorResponse

Forbidden defines model for Forbidden.

type GetHealthResponse

type GetHealthResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *HealthResponse
	JSON503      *HealthResponse
}

func ParseGetHealthResponse

func ParseGetHealthResponse(rsp *http.Response) (*GetHealthResponse, error)

ParseGetHealthResponse parses an HTTP response from a GetHealthWithResponse call

func (GetHealthResponse) Status

func (r GetHealthResponse) Status() string

Status returns HTTPResponse.Status

func (GetHealthResponse) StatusCode

func (r GetHealthResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetSatellitesIdResponse

type GetSatellitesIdResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Satellite
	JSON401      *Unauthorized
	JSON404      *NotFound
}

func ParseGetSatellitesIdResponse

func ParseGetSatellitesIdResponse(rsp *http.Response) (*GetSatellitesIdResponse, error)

ParseGetSatellitesIdResponse parses an HTTP response from a GetSatellitesIdWithResponse call

func (GetSatellitesIdResponse) Status

func (r GetSatellitesIdResponse) Status() string

Status returns HTTPResponse.Status

func (GetSatellitesIdResponse) StatusCode

func (r GetSatellitesIdResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetSatellitesResponse

type GetSatellitesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]Satellite
	JSON401      *Unauthorized
}

func ParseGetSatellitesResponse

func ParseGetSatellitesResponse(rsp *http.Response) (*GetSatellitesResponse, error)

ParseGetSatellitesResponse parses an HTTP response from a GetSatellitesWithResponse call

func (GetSatellitesResponse) Status

func (r GetSatellitesResponse) Status() string

Status returns HTTPResponse.Status

func (GetSatellitesResponse) StatusCode

func (r GetSatellitesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetUsersResponse

type GetUsersResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]User
	JSON403      *Forbidden
}

func ParseGetUsersResponse

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

ParseGetUsersResponse parses an HTTP response from a GetUsersWithResponse call

func (GetUsersResponse) Status

func (r GetUsersResponse) Status() string

Status returns HTTPResponse.Status

func (GetUsersResponse) StatusCode

func (r GetUsersResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetVersionResponse

type GetVersionResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *VersionResponse
}

func ParseGetVersionResponse

func ParseGetVersionResponse(rsp *http.Response) (*GetVersionResponse, error)

ParseGetVersionResponse parses an HTTP response from a GetVersionWithResponse call

func (GetVersionResponse) Status

func (r GetVersionResponse) Status() string

Status returns HTTPResponse.Status

func (GetVersionResponse) StatusCode

func (r GetVersionResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HealthResponse

type HealthResponse struct {
	Db     *string `json:"db,omitempty"`
	Status *string `json:"status,omitempty"`
}

HealthResponse defines model for HealthResponse.

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type LoginRequest

type LoginRequest struct {
	Password string `json:"password"`
	Username string `json:"username"`
}

LoginRequest defines model for LoginRequest.

type LoginResponse

type LoginResponse struct {
	ExpiresIn *int    `json:"expiresIn,omitempty"`
	Token     *string `json:"token,omitempty"`
}

LoginResponse defines model for LoginResponse.

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type NotFound

type NotFound = ErrorResponse

NotFound defines model for NotFound.

type PatchSatellitesIdJSONRequestBody

type PatchSatellitesIdJSONRequestBody = UpdateSatelliteRequest

PatchSatellitesIdJSONRequestBody defines body for PatchSatellitesId for application/json ContentType.

type PatchSatellitesIdResponse

type PatchSatellitesIdResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Satellite
	JSON403      *Forbidden
	JSON404      *NotFound
}

func ParsePatchSatellitesIdResponse

func ParsePatchSatellitesIdResponse(rsp *http.Response) (*PatchSatellitesIdResponse, error)

ParsePatchSatellitesIdResponse parses an HTTP response from a PatchSatellitesIdWithResponse call

func (PatchSatellitesIdResponse) Status

func (r PatchSatellitesIdResponse) Status() string

Status returns HTTPResponse.Status

func (PatchSatellitesIdResponse) StatusCode

func (r PatchSatellitesIdResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostAuthLoginJSONRequestBody

type PostAuthLoginJSONRequestBody = LoginRequest

PostAuthLoginJSONRequestBody defines body for PostAuthLogin for application/json ContentType.

type PostAuthLoginResponse

type PostAuthLoginResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *LoginResponse
	JSON401      *ErrorResponse
}

func ParsePostAuthLoginResponse

func ParsePostAuthLoginResponse(rsp *http.Response) (*PostAuthLoginResponse, error)

ParsePostAuthLoginResponse parses an HTTP response from a PostAuthLoginWithResponse call

func (PostAuthLoginResponse) Status

func (r PostAuthLoginResponse) Status() string

Status returns HTTPResponse.Status

func (PostAuthLoginResponse) StatusCode

func (r PostAuthLoginResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostSatellitesIdHeartbeatResponse

type PostSatellitesIdHeartbeatResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Satellite
	JSON404      *NotFound
}

func ParsePostSatellitesIdHeartbeatResponse

func ParsePostSatellitesIdHeartbeatResponse(rsp *http.Response) (*PostSatellitesIdHeartbeatResponse, error)

ParsePostSatellitesIdHeartbeatResponse parses an HTTP response from a PostSatellitesIdHeartbeatWithResponse call

func (PostSatellitesIdHeartbeatResponse) Status

Status returns HTTPResponse.Status

func (PostSatellitesIdHeartbeatResponse) StatusCode

func (r PostSatellitesIdHeartbeatResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostSatellitesJSONRequestBody

type PostSatellitesJSONRequestBody = CreateSatelliteRequest

PostSatellitesJSONRequestBody defines body for PostSatellites for application/json ContentType.

type PostSatellitesResponse

type PostSatellitesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *Satellite
	JSON401      *Unauthorized
}

func ParsePostSatellitesResponse

func ParsePostSatellitesResponse(rsp *http.Response) (*PostSatellitesResponse, error)

ParsePostSatellitesResponse parses an HTTP response from a PostSatellitesWithResponse call

func (PostSatellitesResponse) Status

func (r PostSatellitesResponse) Status() string

Status returns HTTPResponse.Status

func (PostSatellitesResponse) StatusCode

func (r PostSatellitesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PostUsersJSONRequestBody

type PostUsersJSONRequestBody = CreateUserRequest

PostUsersJSONRequestBody defines body for PostUsers for application/json ContentType.

type PostUsersResponse

type PostUsersResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON201      *User
	JSON403      *Forbidden
}

func ParsePostUsersResponse

func ParsePostUsersResponse(rsp *http.Response) (*PostUsersResponse, error)

ParsePostUsersResponse parses an HTTP response from a PostUsersWithResponse call

func (PostUsersResponse) Status

func (r PostUsersResponse) Status() string

Status returns HTTPResponse.Status

func (PostUsersResponse) StatusCode

func (r PostUsersResponse) 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

type RequiredHeaderError

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

func (*RequiredHeaderError) Error

func (e *RequiredHeaderError) Error() string

func (*RequiredHeaderError) Unwrap

func (e *RequiredHeaderError) Unwrap() error

type RequiredParamError

type RequiredParamError struct {
	ParamName string
}

func (*RequiredParamError) Error

func (e *RequiredParamError) Error() string

type Satellite

type Satellite struct {
	CreatedAt  *time.Time          `json:"created_at,omitempty"`
	Id         *openapi_types.UUID `json:"id,omitempty"`
	LastSeenAt *time.Time          `json:"last_seen_at"`
	ManagedBy  *SatelliteManagedBy `json:"managed_by,omitempty"`
	Name       *string             `json:"name,omitempty"`
	Region     *string             `json:"region,omitempty"`
	Status     *SatelliteStatus    `json:"status,omitempty"`
}

Satellite defines model for Satellite.

type SatelliteManagedBy

type SatelliteManagedBy string

SatelliteManagedBy defines model for Satellite.ManagedBy.

const (
	Manual   SatelliteManagedBy = "manual"
	Operator SatelliteManagedBy = "operator"
)

Defines values for SatelliteManagedBy.

type SatelliteStatus

type SatelliteStatus string

SatelliteStatus defines model for Satellite.Status.

const (
	Error       SatelliteStatus = "Error"
	Pending     SatelliteStatus = "Pending"
	Ready       SatelliteStatus = "Ready"
	Unreachable SatelliteStatus = "Unreachable"
)

Defines values for SatelliteStatus.

type ServerInterface

type ServerInterface interface {
	// Login and get JWT token
	// (POST /auth/login)
	PostAuthLogin(w http.ResponseWriter, r *http.Request)
	// Health check
	// (GET /health)
	GetHealth(w http.ResponseWriter, r *http.Request)
	// List all satellites
	// (GET /satellites)
	GetSatellites(w http.ResponseWriter, r *http.Request)
	// Create a satellite
	// (POST /satellites)
	PostSatellites(w http.ResponseWriter, r *http.Request)
	// Delete a satellite
	// (DELETE /satellites/{id})
	DeleteSatellitesId(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)
	// Get a satellite by ID
	// (GET /satellites/{id})
	GetSatellitesId(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)
	// Update a satellite
	// (PATCH /satellites/{id})
	PatchSatellitesId(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)
	// Agent heartbeat
	// (POST /satellites/{id}/heartbeat)
	PostSatellitesIdHeartbeat(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)
	// List all users (admin only)
	// (GET /users)
	GetUsers(w http.ResponseWriter, r *http.Request)
	// Create a user (admin only)
	// (POST /users)
	PostUsers(w http.ResponseWriter, r *http.Request)
	// Delete a user (admin only)
	// (DELETE /users/{id})
	DeleteUsersId(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)
	// Version info
	// (GET /version)
	GetVersion(w http.ResponseWriter, r *http.Request)
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
	ErrorHandlerFunc   func(w http.ResponseWriter, r *http.Request, err error)
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) DeleteSatellitesId

func (siw *ServerInterfaceWrapper) DeleteSatellitesId(w http.ResponseWriter, r *http.Request)

DeleteSatellitesId operation middleware

func (*ServerInterfaceWrapper) DeleteUsersId

func (siw *ServerInterfaceWrapper) DeleteUsersId(w http.ResponseWriter, r *http.Request)

DeleteUsersId operation middleware

func (*ServerInterfaceWrapper) GetHealth

func (siw *ServerInterfaceWrapper) GetHealth(w http.ResponseWriter, r *http.Request)

GetHealth operation middleware

func (*ServerInterfaceWrapper) GetSatellites

func (siw *ServerInterfaceWrapper) GetSatellites(w http.ResponseWriter, r *http.Request)

GetSatellites operation middleware

func (*ServerInterfaceWrapper) GetSatellitesId

func (siw *ServerInterfaceWrapper) GetSatellitesId(w http.ResponseWriter, r *http.Request)

GetSatellitesId operation middleware

func (*ServerInterfaceWrapper) GetUsers

func (siw *ServerInterfaceWrapper) GetUsers(w http.ResponseWriter, r *http.Request)

GetUsers operation middleware

func (*ServerInterfaceWrapper) GetVersion

func (siw *ServerInterfaceWrapper) GetVersion(w http.ResponseWriter, r *http.Request)

GetVersion operation middleware

func (*ServerInterfaceWrapper) PatchSatellitesId

func (siw *ServerInterfaceWrapper) PatchSatellitesId(w http.ResponseWriter, r *http.Request)

PatchSatellitesId operation middleware

func (*ServerInterfaceWrapper) PostAuthLogin

func (siw *ServerInterfaceWrapper) PostAuthLogin(w http.ResponseWriter, r *http.Request)

PostAuthLogin operation middleware

func (*ServerInterfaceWrapper) PostSatellites

func (siw *ServerInterfaceWrapper) PostSatellites(w http.ResponseWriter, r *http.Request)

PostSatellites operation middleware

func (*ServerInterfaceWrapper) PostSatellitesIdHeartbeat

func (siw *ServerInterfaceWrapper) PostSatellitesIdHeartbeat(w http.ResponseWriter, r *http.Request)

PostSatellitesIdHeartbeat operation middleware

func (*ServerInterfaceWrapper) PostUsers

func (siw *ServerInterfaceWrapper) PostUsers(w http.ResponseWriter, r *http.Request)

PostUsers operation middleware

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type Unauthorized

type Unauthorized = ErrorResponse

Unauthorized defines model for Unauthorized.

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type Unimplemented

type Unimplemented struct{}

func (Unimplemented) DeleteSatellitesId

func (_ Unimplemented) DeleteSatellitesId(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)

Delete a satellite (DELETE /satellites/{id})

func (Unimplemented) DeleteUsersId

func (_ Unimplemented) DeleteUsersId(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)

Delete a user (admin only) (DELETE /users/{id})

func (Unimplemented) GetHealth

func (_ Unimplemented) GetHealth(w http.ResponseWriter, r *http.Request)

Health check (GET /health)

func (Unimplemented) GetSatellites

func (_ Unimplemented) GetSatellites(w http.ResponseWriter, r *http.Request)

List all satellites (GET /satellites)

func (Unimplemented) GetSatellitesId

func (_ Unimplemented) GetSatellitesId(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)

Get a satellite by ID (GET /satellites/{id})

func (Unimplemented) GetUsers

func (_ Unimplemented) GetUsers(w http.ResponseWriter, r *http.Request)

List all users (admin only) (GET /users)

func (Unimplemented) GetVersion

func (_ Unimplemented) GetVersion(w http.ResponseWriter, r *http.Request)

Version info (GET /version)

func (Unimplemented) PatchSatellitesId

func (_ Unimplemented) PatchSatellitesId(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)

Update a satellite (PATCH /satellites/{id})

func (Unimplemented) PostAuthLogin

func (_ Unimplemented) PostAuthLogin(w http.ResponseWriter, r *http.Request)

Login and get JWT token (POST /auth/login)

func (Unimplemented) PostSatellites

func (_ Unimplemented) PostSatellites(w http.ResponseWriter, r *http.Request)

Create a satellite (POST /satellites)

func (Unimplemented) PostSatellitesIdHeartbeat

func (_ Unimplemented) PostSatellitesIdHeartbeat(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)

Agent heartbeat (POST /satellites/{id}/heartbeat)

func (Unimplemented) PostUsers

func (_ Unimplemented) PostUsers(w http.ResponseWriter, r *http.Request)

Create a user (admin only) (POST /users)

type UnmarshalingParamError

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

type UpdateSatelliteRequest

type UpdateSatelliteRequest struct {
	Region string `json:"region"`
}

UpdateSatelliteRequest defines model for UpdateSatelliteRequest.

type User

type User struct {
	CreatedAt *time.Time          `json:"created_at,omitempty"`
	Id        *openapi_types.UUID `json:"id,omitempty"`
	Role      *UserRole           `json:"role,omitempty"`
	Username  *string             `json:"username,omitempty"`
}

User defines model for User.

type UserRole

type UserRole string

UserRole defines model for User.Role.

const (
	UserRoleAdmin  UserRole = "admin"
	UserRoleViewer UserRole = "viewer"
)

Defines values for UserRole.

type VersionResponse

type VersionResponse struct {
	Version *string `json:"version,omitempty"`
}

VersionResponse defines model for VersionResponse.

Jump to

Keyboard shortcuts

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