agentclient

package
v0.0.0-...-5004fd2 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

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

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

Index

Constants

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

Variables

This section is empty.

Functions

func NewGetAgentConfigRadiusRequest

func NewGetAgentConfigRadiusRequest(server string, namespaceKind externalRef0.NamespaceKindParameter, namespaceId externalRef0.NamespaceIdParameter) (*http.Request, error)

NewGetAgentConfigRadiusRequest generates requests for GetAgentConfigRadius

func NewGetAgentConfigServerRequest

func NewGetAgentConfigServerRequest(server string, namespaceKind externalRef0.NamespaceKindParameter, namespaceId externalRef0.NamespaceIdParameter) (*http.Request, error)

NewGetAgentConfigServerRequest generates requests for GetAgentConfigServer

func NewGetCertificateRequest

func NewGetCertificateRequest(server string, namespaceKind externalRef0.NamespaceKindParameter, namespaceId externalRef0.NamespaceIdParameter, resourceId externalRef0.ResourceIdParameter) (*http.Request, error)

NewGetCertificateRequest generates requests for GetCertificate

func NewGetSecretRequest

func NewGetSecretRequest(server string, namespaceKind externalRef0.NamespaceKindParameter, namespaceId externalRef0.NamespaceIdParameter, resourceId externalRef0.ResourceIdParameter, params *GetSecretParams) (*http.Request, error)

NewGetSecretRequest generates requests for GetSecret

Types

type AgentConfigRadiusResponse

type AgentConfigRadiusResponse = externalRef3.AgentConfigRadius

AgentConfigRadiusResponse defines model for AgentConfigRadiusResponse.

type AgentConfigServer

type AgentConfigServer = externalRef3.AgentConfigServer

AgentConfigServer defines model for AgentConfigServer.

type CertificateResponse

type CertificateResponse = externalRef1.Certificate

CertificateResponse defines model for CertificateResponse.

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) GetAgentConfigRadius

func (c *Client) GetAgentConfigRadius(ctx context.Context, namespaceKind externalRef0.NamespaceKindParameter, namespaceId externalRef0.NamespaceIdParameter, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetAgentConfigServer

func (c *Client) GetAgentConfigServer(ctx context.Context, namespaceKind externalRef0.NamespaceKindParameter, namespaceId externalRef0.NamespaceIdParameter, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetCertificate

func (c *Client) GetCertificate(ctx context.Context, namespaceKind externalRef0.NamespaceKindParameter, namespaceId externalRef0.NamespaceIdParameter, resourceId externalRef0.ResourceIdParameter, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetSecret

type ClientInterface

type ClientInterface interface {
	// GetAgentConfigRadius request
	GetAgentConfigRadius(ctx context.Context, namespaceKind externalRef0.NamespaceKindParameter, namespaceId externalRef0.NamespaceIdParameter, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetAgentConfigServer request
	GetAgentConfigServer(ctx context.Context, namespaceKind externalRef0.NamespaceKindParameter, namespaceId externalRef0.NamespaceIdParameter, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetCertificate request
	GetCertificate(ctx context.Context, namespaceKind externalRef0.NamespaceKindParameter, namespaceId externalRef0.NamespaceIdParameter, resourceId externalRef0.ResourceIdParameter, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetSecret request
	GetSecret(ctx context.Context, namespaceKind externalRef0.NamespaceKindParameter, namespaceId externalRef0.NamespaceIdParameter, resourceId externalRef0.ResourceIdParameter, params *GetSecretParams, 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) GetAgentConfigRadiusWithResponse

func (c *ClientWithResponses) GetAgentConfigRadiusWithResponse(ctx context.Context, namespaceKind externalRef0.NamespaceKindParameter, namespaceId externalRef0.NamespaceIdParameter, reqEditors ...RequestEditorFn) (*GetAgentConfigRadiusResponse, error)

GetAgentConfigRadiusWithResponse request returning *GetAgentConfigRadiusResponse

func (*ClientWithResponses) GetAgentConfigServerWithResponse

func (c *ClientWithResponses) GetAgentConfigServerWithResponse(ctx context.Context, namespaceKind externalRef0.NamespaceKindParameter, namespaceId externalRef0.NamespaceIdParameter, reqEditors ...RequestEditorFn) (*GetAgentConfigServerResponse, error)

GetAgentConfigServerWithResponse request returning *GetAgentConfigServerResponse

func (*ClientWithResponses) GetCertificateWithResponse

GetCertificateWithResponse request returning *GetCertificateResponse

func (*ClientWithResponses) GetSecretWithResponse

GetSecretWithResponse request returning *GetSecretResponse

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetAgentConfigRadiusWithResponse request
	GetAgentConfigRadiusWithResponse(ctx context.Context, namespaceKind externalRef0.NamespaceKindParameter, namespaceId externalRef0.NamespaceIdParameter, reqEditors ...RequestEditorFn) (*GetAgentConfigRadiusResponse, error)

	// GetAgentConfigServerWithResponse request
	GetAgentConfigServerWithResponse(ctx context.Context, namespaceKind externalRef0.NamespaceKindParameter, namespaceId externalRef0.NamespaceIdParameter, reqEditors ...RequestEditorFn) (*GetAgentConfigServerResponse, error)

	// GetCertificateWithResponse request
	GetCertificateWithResponse(ctx context.Context, namespaceKind externalRef0.NamespaceKindParameter, namespaceId externalRef0.NamespaceIdParameter, resourceId externalRef0.ResourceIdParameter, reqEditors ...RequestEditorFn) (*GetCertificateResponse, error)

	// GetSecretWithResponse request
	GetSecretWithResponse(ctx context.Context, namespaceKind externalRef0.NamespaceKindParameter, namespaceId externalRef0.NamespaceIdParameter, resourceId externalRef0.ResourceIdParameter, params *GetSecretParams, reqEditors ...RequestEditorFn) (*GetSecretResponse, error)
}

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

type GetAgentConfigRadiusResponse

type GetAgentConfigRadiusResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *AgentConfigRadiusResponse
}

func ParseGetAgentConfigRadiusResponse

func ParseGetAgentConfigRadiusResponse(rsp *http.Response) (*GetAgentConfigRadiusResponse, error)

ParseGetAgentConfigRadiusResponse parses an HTTP response from a GetAgentConfigRadiusWithResponse call

func (GetAgentConfigRadiusResponse) Status

Status returns HTTPResponse.Status

func (GetAgentConfigRadiusResponse) StatusCode

func (r GetAgentConfigRadiusResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetAgentConfigServerResponse

type GetAgentConfigServerResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *AgentConfigServer
}

func ParseGetAgentConfigServerResponse

func ParseGetAgentConfigServerResponse(rsp *http.Response) (*GetAgentConfigServerResponse, error)

ParseGetAgentConfigServerResponse parses an HTTP response from a GetAgentConfigServerWithResponse call

func (GetAgentConfigServerResponse) Status

Status returns HTTPResponse.Status

func (GetAgentConfigServerResponse) StatusCode

func (r GetAgentConfigServerResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetCertificateResponse

type GetCertificateResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *CertificateResponse
}

func ParseGetCertificateResponse

func ParseGetCertificateResponse(rsp *http.Response) (*GetCertificateResponse, error)

ParseGetCertificateResponse parses an HTTP response from a GetCertificateWithResponse call

func (GetCertificateResponse) Status

func (r GetCertificateResponse) Status() string

Status returns HTTPResponse.Status

func (GetCertificateResponse) StatusCode

func (r GetCertificateResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetSecretParams

type GetSecretParams struct {
	WithValue *bool `form:"withValue,omitempty" json:"withValue,omitempty"`
}

GetSecretParams defines parameters for GetSecret.

type GetSecretResponse

type GetSecretResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Secret
}

func ParseGetSecretResponse

func ParseGetSecretResponse(rsp *http.Response) (*GetSecretResponse, error)

ParseGetSecretResponse parses an HTTP response from a GetSecretWithResponse call

func (GetSecretResponse) Status

func (r GetSecretResponse) Status() string

Status returns HTTPResponse.Status

func (GetSecretResponse) StatusCode

func (r GetSecretResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type Secret

type Secret = externalRef4.Secret

Secret defines model for Secret.

Directories

Path Synopsis
Package agentclient provides primitives to interact with the openapi HTTP API.
Package agentclient provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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