client

package
v0.100.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

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

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGetApiAllJsonRequest

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

NewGetApiAllJsonRequest generates requests for GetApiAllJson

func NewGetApiProductCycleJsonRequest

func NewGetApiProductCycleJsonRequest(server string, product string, cycle string) (*http.Request, error)

NewGetApiProductCycleJsonRequest generates requests for GetApiProductCycleJson

func NewGetApiProductJsonRequest

func NewGetApiProductJsonRequest(server string, product string) (*http.Request, error)

NewGetApiProductJsonRequest generates requests for GetApiProductJson

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

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

func (*Client) GetApiProductCycleJson

func (c *Client) GetApiProductCycleJson(ctx context.Context, product string, cycle string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetApiProductJson

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

type ClientInterface

type ClientInterface interface {
	// GetApiAllJson request
	GetApiAllJson(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetApiProductJson request
	GetApiProductJson(ctx context.Context, product string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetApiProductCycleJson request
	GetApiProductCycleJson(ctx context.Context, product string, cycle string, 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) GetApiAllJsonWithResponse

func (c *ClientWithResponses) GetApiAllJsonWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAllJsonResponse, error)

GetApiAllJsonWithResponse request returning *GetApiAllJsonResponse

func (*ClientWithResponses) GetApiProductCycleJsonWithResponse

func (c *ClientWithResponses) GetApiProductCycleJsonWithResponse(ctx context.Context, product string, cycle string, reqEditors ...RequestEditorFn) (*GetApiProductCycleJsonResponse, error)

GetApiProductCycleJsonWithResponse request returning *GetApiProductCycleJsonResponse

func (*ClientWithResponses) GetApiProductJsonWithResponse

func (c *ClientWithResponses) GetApiProductJsonWithResponse(ctx context.Context, product string, reqEditors ...RequestEditorFn) (*GetApiProductJsonResponse, error)

GetApiProductJsonWithResponse request returning *GetApiProductJsonResponse

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// GetApiAllJsonWithResponse request
	GetApiAllJsonWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetApiAllJsonResponse, error)

	// GetApiProductJsonWithResponse request
	GetApiProductJsonWithResponse(ctx context.Context, product string, reqEditors ...RequestEditorFn) (*GetApiProductJsonResponse, error)

	// GetApiProductCycleJsonWithResponse request
	GetApiProductCycleJsonWithResponse(ctx context.Context, product string, cycle string, reqEditors ...RequestEditorFn) (*GetApiProductCycleJsonResponse, error)
}

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

type Cycle

type Cycle struct {
	// Cycle Release Cycle
	Cycle *Cycle_Cycle `json:"cycle,omitempty"`

	// Discontinued Whether this cycle is now discontinued.
	Discontinued *Cycle_Discontinued `json:"discontinued,omitempty"`

	// Eol End of Life Date for this release cycle
	Eol *Cycle_Eol `json:"eol,omitempty"`

	// Latest Latest release in this cycle
	Latest *string `json:"latest,omitempty"`

	// Link Link to changelog for the latest release, if available
	Link *string `json:"link,omitempty"`

	// Lts Whether this release cycle has long-term-support (LTS). Can be a date instead in YYYY-MM-DD format as well if the release enters LTS status on a given date.
	Lts *Cycle_Lts `json:"lts,omitempty"`

	// ReleaseDate Release Date for the first release in this cycle
	ReleaseDate *openapi_types.Date `json:"releaseDate,omitempty"`

	// Support Whether this release cycle has active support
	Support *Cycle_Support `json:"support,omitempty"`
}

Cycle Details of a single release cycle of a given product. There might be some slight variations to this depending on the product.

type CycleCycle0

type CycleCycle0 = string

CycleCycle0 defines model for .

type CycleCycle1

type CycleCycle1 = bool

CycleCycle1 defines model for .

type CycleDiscontinued0

type CycleDiscontinued0 = openapi_types.Date

CycleDiscontinued0 defines model for .

type CycleDiscontinued1

type CycleDiscontinued1 = bool

CycleDiscontinued1 defines model for .

type CycleEol0

type CycleEol0 = string

CycleEol0 defines model for .

type CycleEol1

type CycleEol1 = bool

CycleEol1 defines model for .

type CycleLts0

type CycleLts0 = string

CycleLts0 defines model for .

type CycleLts1

type CycleLts1 = bool

CycleLts1 defines model for .

type CycleSupport0

type CycleSupport0 = openapi_types.Date

CycleSupport0 defines model for .

type CycleSupport1

type CycleSupport1 = bool

CycleSupport1 defines model for .

type Cycle_Cycle

type Cycle_Cycle struct {
	// contains filtered or unexported fields
}

Cycle_Cycle Release Cycle

func (Cycle_Cycle) AsCycleCycle0

func (t Cycle_Cycle) AsCycleCycle0() (CycleCycle0, error)

AsCycleCycle0 returns the union data inside the Cycle_Cycle as a CycleCycle0

func (Cycle_Cycle) AsCycleCycle1

func (t Cycle_Cycle) AsCycleCycle1() (CycleCycle1, error)

AsCycleCycle1 returns the union data inside the Cycle_Cycle as a CycleCycle1

func (*Cycle_Cycle) FromCycleCycle0

func (t *Cycle_Cycle) FromCycleCycle0(v CycleCycle0) error

FromCycleCycle0 overwrites any union data inside the Cycle_Cycle as the provided CycleCycle0

func (*Cycle_Cycle) FromCycleCycle1

func (t *Cycle_Cycle) FromCycleCycle1(v CycleCycle1) error

FromCycleCycle1 overwrites any union data inside the Cycle_Cycle as the provided CycleCycle1

func (Cycle_Cycle) MarshalJSON

func (t Cycle_Cycle) MarshalJSON() ([]byte, error)

func (*Cycle_Cycle) MergeCycleCycle0

func (t *Cycle_Cycle) MergeCycleCycle0(v CycleCycle0) error

MergeCycleCycle0 performs a merge with any union data inside the Cycle_Cycle, using the provided CycleCycle0

func (*Cycle_Cycle) MergeCycleCycle1

func (t *Cycle_Cycle) MergeCycleCycle1(v CycleCycle1) error

MergeCycleCycle1 performs a merge with any union data inside the Cycle_Cycle, using the provided CycleCycle1

func (*Cycle_Cycle) UnmarshalJSON

func (t *Cycle_Cycle) UnmarshalJSON(b []byte) error

type Cycle_Discontinued

type Cycle_Discontinued struct {
	// contains filtered or unexported fields
}

Cycle_Discontinued Whether this cycle is now discontinued.

func (Cycle_Discontinued) AsCycleDiscontinued0

func (t Cycle_Discontinued) AsCycleDiscontinued0() (CycleDiscontinued0, error)

AsCycleDiscontinued0 returns the union data inside the Cycle_Discontinued as a CycleDiscontinued0

func (Cycle_Discontinued) AsCycleDiscontinued1

func (t Cycle_Discontinued) AsCycleDiscontinued1() (CycleDiscontinued1, error)

AsCycleDiscontinued1 returns the union data inside the Cycle_Discontinued as a CycleDiscontinued1

func (*Cycle_Discontinued) FromCycleDiscontinued0

func (t *Cycle_Discontinued) FromCycleDiscontinued0(v CycleDiscontinued0) error

FromCycleDiscontinued0 overwrites any union data inside the Cycle_Discontinued as the provided CycleDiscontinued0

func (*Cycle_Discontinued) FromCycleDiscontinued1

func (t *Cycle_Discontinued) FromCycleDiscontinued1(v CycleDiscontinued1) error

FromCycleDiscontinued1 overwrites any union data inside the Cycle_Discontinued as the provided CycleDiscontinued1

func (Cycle_Discontinued) MarshalJSON

func (t Cycle_Discontinued) MarshalJSON() ([]byte, error)

func (*Cycle_Discontinued) MergeCycleDiscontinued0

func (t *Cycle_Discontinued) MergeCycleDiscontinued0(v CycleDiscontinued0) error

MergeCycleDiscontinued0 performs a merge with any union data inside the Cycle_Discontinued, using the provided CycleDiscontinued0

func (*Cycle_Discontinued) MergeCycleDiscontinued1

func (t *Cycle_Discontinued) MergeCycleDiscontinued1(v CycleDiscontinued1) error

MergeCycleDiscontinued1 performs a merge with any union data inside the Cycle_Discontinued, using the provided CycleDiscontinued1

func (*Cycle_Discontinued) UnmarshalJSON

func (t *Cycle_Discontinued) UnmarshalJSON(b []byte) error

type Cycle_Eol

type Cycle_Eol struct {
	// contains filtered or unexported fields
}

Cycle_Eol End of Life Date for this release cycle

func (Cycle_Eol) AsCycleEol0

func (t Cycle_Eol) AsCycleEol0() (CycleEol0, error)

AsCycleEol0 returns the union data inside the Cycle_Eol as a CycleEol0

func (Cycle_Eol) AsCycleEol1

func (t Cycle_Eol) AsCycleEol1() (CycleEol1, error)

AsCycleEol1 returns the union data inside the Cycle_Eol as a CycleEol1

func (*Cycle_Eol) FromCycleEol0

func (t *Cycle_Eol) FromCycleEol0(v CycleEol0) error

FromCycleEol0 overwrites any union data inside the Cycle_Eol as the provided CycleEol0

func (*Cycle_Eol) FromCycleEol1

func (t *Cycle_Eol) FromCycleEol1(v CycleEol1) error

FromCycleEol1 overwrites any union data inside the Cycle_Eol as the provided CycleEol1

func (Cycle_Eol) MarshalJSON

func (t Cycle_Eol) MarshalJSON() ([]byte, error)

func (*Cycle_Eol) MergeCycleEol0

func (t *Cycle_Eol) MergeCycleEol0(v CycleEol0) error

MergeCycleEol0 performs a merge with any union data inside the Cycle_Eol, using the provided CycleEol0

func (*Cycle_Eol) MergeCycleEol1

func (t *Cycle_Eol) MergeCycleEol1(v CycleEol1) error

MergeCycleEol1 performs a merge with any union data inside the Cycle_Eol, using the provided CycleEol1

func (*Cycle_Eol) UnmarshalJSON

func (t *Cycle_Eol) UnmarshalJSON(b []byte) error

type Cycle_Lts

type Cycle_Lts struct {
	// contains filtered or unexported fields
}

Cycle_Lts Whether this release cycle has long-term-support (LTS). Can be a date instead in YYYY-MM-DD format as well if the release enters LTS status on a given date.

func (Cycle_Lts) AsCycleLts0

func (t Cycle_Lts) AsCycleLts0() (CycleLts0, error)

AsCycleLts0 returns the union data inside the Cycle_Lts as a CycleLts0

func (Cycle_Lts) AsCycleLts1

func (t Cycle_Lts) AsCycleLts1() (CycleLts1, error)

AsCycleLts1 returns the union data inside the Cycle_Lts as a CycleLts1

func (*Cycle_Lts) FromCycleLts0

func (t *Cycle_Lts) FromCycleLts0(v CycleLts0) error

FromCycleLts0 overwrites any union data inside the Cycle_Lts as the provided CycleLts0

func (*Cycle_Lts) FromCycleLts1

func (t *Cycle_Lts) FromCycleLts1(v CycleLts1) error

FromCycleLts1 overwrites any union data inside the Cycle_Lts as the provided CycleLts1

func (Cycle_Lts) MarshalJSON

func (t Cycle_Lts) MarshalJSON() ([]byte, error)

func (*Cycle_Lts) MergeCycleLts0

func (t *Cycle_Lts) MergeCycleLts0(v CycleLts0) error

MergeCycleLts0 performs a merge with any union data inside the Cycle_Lts, using the provided CycleLts0

func (*Cycle_Lts) MergeCycleLts1

func (t *Cycle_Lts) MergeCycleLts1(v CycleLts1) error

MergeCycleLts1 performs a merge with any union data inside the Cycle_Lts, using the provided CycleLts1

func (*Cycle_Lts) UnmarshalJSON

func (t *Cycle_Lts) UnmarshalJSON(b []byte) error

type Cycle_Support

type Cycle_Support struct {
	// contains filtered or unexported fields
}

Cycle_Support Whether this release cycle has active support

func (Cycle_Support) AsCycleSupport0

func (t Cycle_Support) AsCycleSupport0() (CycleSupport0, error)

AsCycleSupport0 returns the union data inside the Cycle_Support as a CycleSupport0

func (Cycle_Support) AsCycleSupport1

func (t Cycle_Support) AsCycleSupport1() (CycleSupport1, error)

AsCycleSupport1 returns the union data inside the Cycle_Support as a CycleSupport1

func (*Cycle_Support) FromCycleSupport0

func (t *Cycle_Support) FromCycleSupport0(v CycleSupport0) error

FromCycleSupport0 overwrites any union data inside the Cycle_Support as the provided CycleSupport0

func (*Cycle_Support) FromCycleSupport1

func (t *Cycle_Support) FromCycleSupport1(v CycleSupport1) error

FromCycleSupport1 overwrites any union data inside the Cycle_Support as the provided CycleSupport1

func (Cycle_Support) MarshalJSON

func (t Cycle_Support) MarshalJSON() ([]byte, error)

func (*Cycle_Support) MergeCycleSupport0

func (t *Cycle_Support) MergeCycleSupport0(v CycleSupport0) error

MergeCycleSupport0 performs a merge with any union data inside the Cycle_Support, using the provided CycleSupport0

func (*Cycle_Support) MergeCycleSupport1

func (t *Cycle_Support) MergeCycleSupport1(v CycleSupport1) error

MergeCycleSupport1 performs a merge with any union data inside the Cycle_Support, using the provided CycleSupport1

func (*Cycle_Support) UnmarshalJSON

func (t *Cycle_Support) UnmarshalJSON(b []byte) error

type GetApiAllJsonResponse

type GetApiAllJsonResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]string
}

func ParseGetApiAllJsonResponse

func ParseGetApiAllJsonResponse(rsp *http.Response) (*GetApiAllJsonResponse, error)

ParseGetApiAllJsonResponse parses an HTTP response from a GetApiAllJsonWithResponse call

func (GetApiAllJsonResponse) Status

func (r GetApiAllJsonResponse) Status() string

Status returns HTTPResponse.Status

func (GetApiAllJsonResponse) StatusCode

func (r GetApiAllJsonResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetApiProductCycleJsonResponse

type GetApiProductCycleJsonResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Cycle
}

func ParseGetApiProductCycleJsonResponse

func ParseGetApiProductCycleJsonResponse(rsp *http.Response) (*GetApiProductCycleJsonResponse, error)

ParseGetApiProductCycleJsonResponse parses an HTTP response from a GetApiProductCycleJsonWithResponse call

func (GetApiProductCycleJsonResponse) Status

Status returns HTTPResponse.Status

func (GetApiProductCycleJsonResponse) StatusCode

func (r GetApiProductCycleJsonResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetApiProductJsonResponse

type GetApiProductJsonResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *[]Cycle
}

func ParseGetApiProductJsonResponse

func ParseGetApiProductJsonResponse(rsp *http.Response) (*GetApiProductJsonResponse, error)

ParseGetApiProductJsonResponse parses an HTTP response from a GetApiProductJsonWithResponse call

func (GetApiProductJsonResponse) Status

func (r GetApiProductJsonResponse) Status() string

Status returns HTTPResponse.Status

func (GetApiProductJsonResponse) StatusCode

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

Jump to

Keyboard shortcuts

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