apiclient

package
v1.77.1 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

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

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExternalPrincipalLoginRequest

func NewExternalPrincipalLoginRequest(server string, body ExternalPrincipalLoginJSONRequestBody) (*http.Request, error)

NewExternalPrincipalLoginRequest calls the generic ExternalPrincipalLogin builder with application/json body

func NewExternalPrincipalLoginRequestWithBody

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

NewExternalPrincipalLoginRequestWithBody generates requests for ExternalPrincipalLogin with any type of body

func NewHealthCheckRequest

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

NewHealthCheckRequest generates requests for HealthCheck

func NewLDAPLoginRequest

func NewLDAPLoginRequest(server string, body LDAPLoginJSONRequestBody) (*http.Request, error)

NewLDAPLoginRequest calls the generic LDAPLogin builder with application/json body

func NewLDAPLoginRequestWithBody

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

NewLDAPLoginRequestWithBody generates requests for LDAPLogin with any type of body

func NewOauthCallbackRequest

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

NewOauthCallbackRequest generates requests for OauthCallback

func NewSTSLoginRequest

func NewSTSLoginRequest(server string, body STSLoginJSONRequestBody) (*http.Request, error)

NewSTSLoginRequest calls the generic STSLogin builder with application/json body

func NewSTSLoginRequestWithBody

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

NewSTSLoginRequestWithBody generates requests for STSLogin with any type of body

Types

type BadRequest

type BadRequest Error

BadRequest defines model for BadRequest.

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

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

func (*Client) ExternalPrincipalLoginWithBody

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

func (*Client) HealthCheck

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

func (*Client) LDAPLogin

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

func (*Client) LDAPLoginWithBody

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

func (*Client) OauthCallback

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

func (*Client) STSLogin

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

func (*Client) STSLoginWithBody

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

type ClientInterface

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

	ExternalPrincipalLogin(ctx context.Context, body ExternalPrincipalLoginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

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

	LDAPLogin(ctx context.Context, body LDAPLoginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

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

	STSLogin(ctx context.Context, body STSLoginJSONRequestBody, 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) ExternalPrincipalLoginWithBodyWithResponse

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

ExternalPrincipalLoginWithBodyWithResponse request with arbitrary body returning *ExternalPrincipalLoginResponse

func (*ClientWithResponses) ExternalPrincipalLoginWithResponse

func (c *ClientWithResponses) ExternalPrincipalLoginWithResponse(ctx context.Context, body ExternalPrincipalLoginJSONRequestBody, reqEditors ...RequestEditorFn) (*ExternalPrincipalLoginResponse, error)

func (*ClientWithResponses) HealthCheckWithResponse

func (c *ClientWithResponses) HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error)

HealthCheckWithResponse request returning *HealthCheckResponse

func (*ClientWithResponses) LDAPLoginWithBodyWithResponse

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

LDAPLoginWithBodyWithResponse request with arbitrary body returning *LDAPLoginResponse

func (*ClientWithResponses) LDAPLoginWithResponse

func (c *ClientWithResponses) LDAPLoginWithResponse(ctx context.Context, body LDAPLoginJSONRequestBody, reqEditors ...RequestEditorFn) (*LDAPLoginResponse, error)

func (*ClientWithResponses) OauthCallbackWithResponse

func (c *ClientWithResponses) OauthCallbackWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*OauthCallbackResponse, error)

OauthCallbackWithResponse request returning *OauthCallbackResponse

func (*ClientWithResponses) STSLoginWithBodyWithResponse

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

STSLoginWithBodyWithResponse request with arbitrary body returning *STSLoginResponse

func (*ClientWithResponses) STSLoginWithResponse

func (c *ClientWithResponses) STSLoginWithResponse(ctx context.Context, body STSLoginJSONRequestBody, reqEditors ...RequestEditorFn) (*STSLoginResponse, error)

type ClientWithResponsesInterface

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

	ExternalPrincipalLoginWithResponse(ctx context.Context, body ExternalPrincipalLoginJSONRequestBody, reqEditors ...RequestEditorFn) (*ExternalPrincipalLoginResponse, error)

	// HealthCheck request
	HealthCheckWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthCheckResponse, error)

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

	LDAPLoginWithResponse(ctx context.Context, body LDAPLoginJSONRequestBody, reqEditors ...RequestEditorFn) (*LDAPLoginResponse, error)

	// OauthCallback request
	OauthCallbackWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*OauthCallbackResponse, error)

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

	STSLoginWithResponse(ctx context.Context, body STSLoginJSONRequestBody, reqEditors ...RequestEditorFn) (*STSLoginResponse, error)
}

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

type Error

type Error struct {

	// short message explaining the error
	Message string `json:"message"`
}

Error defines model for Error.

type ExternalPrincipal

type ExternalPrincipal struct {
	Id string `json:"id"`
}

ExternalPrincipal defines model for ExternalPrincipal.

type ExternalPrincipalLoginJSONBody

type ExternalPrincipalLoginJSONBody IdentityRequest

ExternalPrincipalLoginJSONBody defines parameters for ExternalPrincipalLogin.

type ExternalPrincipalLoginJSONRequestBody

type ExternalPrincipalLoginJSONRequestBody ExternalPrincipalLoginJSONBody

ExternalPrincipalLoginJSONRequestBody defines body for ExternalPrincipalLogin for application/json ContentType.

type ExternalPrincipalLoginResponse

type ExternalPrincipalLoginResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *ExternalPrincipal
	JSON400      *Error
	JSON401      *Error
	JSON403      *Error
	JSON404      *Error
	JSONDefault  *Error
}

func ParseExternalPrincipalLoginResponse

func ParseExternalPrincipalLoginResponse(rsp *http.Response) (*ExternalPrincipalLoginResponse, error)

ParseExternalPrincipalLoginResponse parses an HTTP response from a ExternalPrincipalLoginWithResponse call

func (ExternalPrincipalLoginResponse) Status

Status returns HTTPResponse.Status

func (ExternalPrincipalLoginResponse) StatusCode

func (r ExternalPrincipalLoginResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Forbidden

type Forbidden Error

Forbidden defines model for Forbidden.

type HealthCheckResponse

type HealthCheckResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *Error
}

func ParseHealthCheckResponse

func ParseHealthCheckResponse(rsp *http.Response) (*HealthCheckResponse, error)

ParseHealthCheckResponse parses an HTTP response from a HealthCheckWithResponse call

func (HealthCheckResponse) Status

func (r HealthCheckResponse) Status() string

Status returns HTTPResponse.Status

func (HealthCheckResponse) StatusCode

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

type IdentityRequest map[string]interface{}

IdentityRequest defines model for IdentityRequest.

type LDAPLoginJSONBody

type LDAPLoginJSONBody LdapAuthRequest

LDAPLoginJSONBody defines parameters for LDAPLogin.

type LDAPLoginJSONRequestBody

type LDAPLoginJSONRequestBody LDAPLoginJSONBody

LDAPLoginJSONRequestBody defines body for LDAPLogin for application/json ContentType.

type LDAPLoginResponse

type LDAPLoginResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *LdapAuthResponse
	JSON401      *Error
	JSONDefault  *Error
}

func ParseLDAPLoginResponse

func ParseLDAPLoginResponse(rsp *http.Response) (*LDAPLoginResponse, error)

ParseLDAPLoginResponse parses an HTTP response from a LDAPLoginWithResponse call

func (LDAPLoginResponse) Status

func (r LDAPLoginResponse) Status() string

Status returns HTTPResponse.Status

func (LDAPLoginResponse) StatusCode

func (r LDAPLoginResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type LdapAuthRequest

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

LdapAuthRequest defines model for LdapAuthRequest.

type LdapAuthResponse

type LdapAuthResponse struct {

	// external_user_identifier is the user DN in LDAP set if user exists with that username and has this password.
	ExternalUserIdentifier string `json:"external_user_identifier"`
}

LdapAuthResponse defines model for LdapAuthResponse.

type NotFound

type NotFound Error

NotFound defines model for NotFound.

type OauthCallbackResponse

type OauthCallbackResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSONDefault  *Error
}

func ParseOauthCallbackResponse

func ParseOauthCallbackResponse(rsp *http.Response) (*OauthCallbackResponse, error)

ParseOauthCallbackResponse parses an HTTP response from a OauthCallbackWithResponse call

func (OauthCallbackResponse) Status

func (r OauthCallbackResponse) Status() string

Status returns HTTPResponse.Status

func (OauthCallbackResponse) StatusCode

func (r OauthCallbackResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type OidcTokenData

type OidcTokenData struct {

	// the claims of the token returned from the provider
	Claims OidcTokenData_Claims `json:"claims"`
}

OidcTokenData defines model for oidc_token_data.

type OidcTokenData_Claims

type OidcTokenData_Claims struct {
	AdditionalProperties map[string]string `json:"-"`
}

OidcTokenData_Claims defines model for OidcTokenData.Claims.

func (OidcTokenData_Claims) Get

func (a OidcTokenData_Claims) Get(fieldName string) (value string, found bool)

Getter for additional properties for OidcTokenData_Claims. Returns the specified element and whether it was found

func (OidcTokenData_Claims) MarshalJSON

func (a OidcTokenData_Claims) MarshalJSON() ([]byte, error)

Override default JSON handling for OidcTokenData_Claims to handle AdditionalProperties

func (*OidcTokenData_Claims) Set

func (a *OidcTokenData_Claims) Set(fieldName string, value string)

Setter for additional properties for OidcTokenData_Claims

func (*OidcTokenData_Claims) UnmarshalJSON

func (a *OidcTokenData_Claims) UnmarshalJSON(b []byte) error

Override default JSON handling for OidcTokenData_Claims to handle AdditionalProperties

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

type STSLoginJSONBody

type STSLoginJSONBody StsAuthRequest

STSLoginJSONBody defines parameters for STSLogin.

type STSLoginJSONRequestBody

type STSLoginJSONRequestBody STSLoginJSONBody

STSLoginJSONRequestBody defines body for STSLogin for application/json ContentType.

type STSLoginResponse

type STSLoginResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *OidcTokenData
	JSON401      *Error
	JSONDefault  *Error
}

func ParseSTSLoginResponse

func ParseSTSLoginResponse(rsp *http.Response) (*STSLoginResponse, error)

ParseSTSLoginResponse parses an HTTP response from a STSLoginWithResponse call

func (STSLoginResponse) Status

func (r STSLoginResponse) Status() string

Status returns HTTPResponse.Status

func (STSLoginResponse) StatusCode

func (r STSLoginResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ServerError

type ServerError Error

ServerError defines model for ServerError.

type StsAuthRequest

type StsAuthRequest struct {
	Code        string `json:"code"`
	RedirectUri string `json:"redirect_uri"`
	State       string `json:"state"`
}

StsAuthRequest defines model for StsAuthRequest.

type Unauthorized

type Unauthorized Error

Unauthorized defines model for Unauthorized.

Jump to

Keyboard shortcuts

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