service

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: Apache-2.0 Imports: 12 Imported by: 40

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client for service API.

func (*Client) GetLrp added in v0.15.7

func (a *Client) GetLrp(params *GetLrpParams, opts ...ClientOption) (*GetLrpOK, error)

GetLrpretrieves list of all local redirect policies.

This method does not support injected context. However, timeout and opentracing contexts are honored whenever enabled.

If you need to pass a specific context, use Client.GetLrpContext instead.

func (*Client) GetLrpContext added in v1.20.0

func (a *Client) GetLrpContext(ctx context.Context, params *GetLrpParams, opts ...ClientOption) (*GetLrpOK, error)

GetLrpContextretrieves list of all local redirect policies.

Do not use the deprecated [GetLrpParams.Context] with this method: it would be ignored.

func (*Client) GetService

func (a *Client) GetService(params *GetServiceParams, opts ...ClientOption) (*GetServiceOK, error)

GetServiceretrieves list of all services.

This method does not support injected context. However, timeout and opentracing contexts are honored whenever enabled.

If you need to pass a specific context, use Client.GetServiceContext instead.

func (*Client) GetServiceContext added in v1.20.0

func (a *Client) GetServiceContext(ctx context.Context, params *GetServiceParams, opts ...ClientOption) (*GetServiceOK, error)

GetServiceContextretrieves list of all services.

Do not use the deprecated [GetServiceParams.Context] with this method: it would be ignored.

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ContextualTransport)

SetTransport changes the transport on the client

type ClientOption added in v0.15.7

type ClientOption func(*runtime.ClientOperation)

ClientOption may be used to customize the behavior of Client methods.

type ClientService added in v0.15.7

type ClientService interface {

	// GetLrp retrieve list of all local redirect policies.
	GetLrp(params *GetLrpParams, opts ...ClientOption) (*GetLrpOK, error)

	// GetLrpContext retrieve list of all local redirect policies.
	GetLrpContext(ctx context.Context, params *GetLrpParams, opts ...ClientOption) (*GetLrpOK, error)

	// GetService retrieve list of all services.
	GetService(params *GetServiceParams, opts ...ClientOption) (*GetServiceOK, error)

	// GetServiceContext retrieve list of all services.
	GetServiceContext(ctx context.Context, params *GetServiceParams, opts ...ClientOption) (*GetServiceOK, error)

	SetTransport(transport runtime.ContextualTransport)
}

ClientService is the interface for Client methods.

func New

New creates a new service API client.

func NewClientWithBasicAuth added in v1.16.5

func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService

New creates a new service API client with basic auth credentials.

It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - user: user for basic authentication header. - password: password for basic authentication header.

func NewClientWithBearerToken added in v1.16.5

func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService

New creates a new service API client with a bearer token for authentication.

It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - bearerToken: bearer token for Bearer authentication header.

type GetLrpOK added in v0.15.7

type GetLrpOK struct {
	Payload []*models.LRPSpec
}

GetLrpOK describes a response with status code 200, with default header values.

Success

func NewGetLrpOK added in v0.15.7

func NewGetLrpOK() *GetLrpOK

NewGetLrpOK creates a GetLrpOK with default headers values

func (*GetLrpOK) Code added in v1.16.0

func (o *GetLrpOK) Code() int

Code gets the status code for the get lrp o k response

func (*GetLrpOK) Error added in v0.15.7

func (o *GetLrpOK) Error() string

func (*GetLrpOK) GetPayload added in v0.15.7

func (o *GetLrpOK) GetPayload() []*models.LRPSpec

func (*GetLrpOK) IsClientError added in v0.15.7

func (o *GetLrpOK) IsClientError() bool

IsClientError returns true when this get lrp o k response has a 4xx status code

func (*GetLrpOK) IsCode added in v0.15.7

func (o *GetLrpOK) IsCode(code int) bool

IsCode returns true when this get lrp o k response a status code equal to that given

func (*GetLrpOK) IsRedirect added in v0.15.7

func (o *GetLrpOK) IsRedirect() bool

IsRedirect returns true when this get lrp o k response has a 3xx status code

func (*GetLrpOK) IsServerError added in v0.15.7

func (o *GetLrpOK) IsServerError() bool

IsServerError returns true when this get lrp o k response has a 5xx status code

func (*GetLrpOK) IsSuccess added in v0.15.7

func (o *GetLrpOK) IsSuccess() bool

IsSuccess returns true when this get lrp o k response has a 2xx status code

func (*GetLrpOK) String added in v0.15.7

func (o *GetLrpOK) String() string

type GetLrpParams added in v0.15.7

type GetLrpParams struct {
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

GetLrpParams contains all the parameters to send to the API endpoint

for the get lrp operation.

Typically these are written to a http.Request.

func NewGetLrpParams added in v0.15.7

func NewGetLrpParams() *GetLrpParams

NewGetLrpParams creates a new GetLrpParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewGetLrpParamsWithContext deprecated added in v0.15.7

func NewGetLrpParamsWithContext(ctx context.Context) *GetLrpParams

NewGetLrpParamsWithContext creates a new GetLrpParams object with the ability to set a context for a request.

Deprecated: use the operation call with context to pass the context instead of GetLrpParams.

func NewGetLrpParamsWithHTTPClient added in v0.15.7

func NewGetLrpParamsWithHTTPClient(client *http.Client) *GetLrpParams

NewGetLrpParamsWithHTTPClient creates a new GetLrpParams object with the ability to set a custom HTTPClient for a request.

func NewGetLrpParamsWithTimeout added in v0.15.7

func NewGetLrpParamsWithTimeout(timeout time.Duration) *GetLrpParams

NewGetLrpParamsWithTimeout creates a new GetLrpParams object with the ability to set a timeout on a request.

func (*GetLrpParams) SetContext deprecated added in v0.15.7

func (o *GetLrpParams) SetContext(ctx context.Context)

SetContext adds the context to the get lrp params.

Deprecated: use the operation call with context to pass the context instead of GetLrpParams.

func (*GetLrpParams) SetDefaults added in v0.15.7

func (o *GetLrpParams) SetDefaults()

SetDefaults hydrates default values in the get lrp params (not the query body).

All values with no default are reset to their zero value.

func (*GetLrpParams) SetHTTPClient added in v0.15.7

func (o *GetLrpParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the get lrp params.

func (*GetLrpParams) SetTimeout added in v0.15.7

func (o *GetLrpParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the get lrp params.

func (*GetLrpParams) WithContext deprecated added in v0.15.7

func (o *GetLrpParams) WithContext(ctx context.Context) *GetLrpParams

WithContext adds the context to the get lrp params.

Deprecated: use the operation call with context to pass the context instead of GetLrpParams.

func (*GetLrpParams) WithDefaults added in v0.15.7

func (o *GetLrpParams) WithDefaults() *GetLrpParams

WithDefaults hydrates default values in the get lrp params (not the query body).

All values with no default are reset to their zero value.

func (*GetLrpParams) WithHTTPClient added in v0.15.7

func (o *GetLrpParams) WithHTTPClient(client *http.Client) *GetLrpParams

WithHTTPClient adds the HTTPClient to the get lrp params.

func (*GetLrpParams) WithTimeout added in v0.15.7

func (o *GetLrpParams) WithTimeout(timeout time.Duration) *GetLrpParams

WithTimeout adds the timeout to the get lrp params.

func (*GetLrpParams) WriteToRequest added in v0.15.7

func (o *GetLrpParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a runtime.ClientRequest.

type GetLrpReader added in v0.15.7

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

GetLrpReader is a Reader for the GetLrp structure.

func (*GetLrpReader) ReadResponse added in v0.15.7

func (o *GetLrpReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error)

ReadResponse reads a server response into the received o.

type GetServiceOK

type GetServiceOK struct {
	Payload []*models.Service
}

GetServiceOK describes a response with status code 200, with default header values.

Success

func NewGetServiceOK

func NewGetServiceOK() *GetServiceOK

NewGetServiceOK creates a GetServiceOK with default headers values

func (*GetServiceOK) Code added in v1.16.0

func (o *GetServiceOK) Code() int

Code gets the status code for the get service o k response

func (*GetServiceOK) Error

func (o *GetServiceOK) Error() string

func (*GetServiceOK) GetPayload added in v0.15.7

func (o *GetServiceOK) GetPayload() []*models.Service

func (*GetServiceOK) IsClientError added in v0.15.7

func (o *GetServiceOK) IsClientError() bool

IsClientError returns true when this get service o k response has a 4xx status code

func (*GetServiceOK) IsCode added in v0.15.7

func (o *GetServiceOK) IsCode(code int) bool

IsCode returns true when this get service o k response a status code equal to that given

func (*GetServiceOK) IsRedirect added in v0.15.7

func (o *GetServiceOK) IsRedirect() bool

IsRedirect returns true when this get service o k response has a 3xx status code

func (*GetServiceOK) IsServerError added in v0.15.7

func (o *GetServiceOK) IsServerError() bool

IsServerError returns true when this get service o k response has a 5xx status code

func (*GetServiceOK) IsSuccess added in v0.15.7

func (o *GetServiceOK) IsSuccess() bool

IsSuccess returns true when this get service o k response has a 2xx status code

func (*GetServiceOK) String added in v0.15.7

func (o *GetServiceOK) String() string

type GetServiceParams

type GetServiceParams struct {
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

GetServiceParams contains all the parameters to send to the API endpoint

for the get service operation.

Typically these are written to a http.Request.

func NewGetServiceParams

func NewGetServiceParams() *GetServiceParams

NewGetServiceParams creates a new GetServiceParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewGetServiceParamsWithContext deprecated

func NewGetServiceParamsWithContext(ctx context.Context) *GetServiceParams

NewGetServiceParamsWithContext creates a new GetServiceParams object with the ability to set a context for a request.

Deprecated: use the operation call with context to pass the context instead of GetServiceParams.

func NewGetServiceParamsWithHTTPClient

func NewGetServiceParamsWithHTTPClient(client *http.Client) *GetServiceParams

NewGetServiceParamsWithHTTPClient creates a new GetServiceParams object with the ability to set a custom HTTPClient for a request.

func NewGetServiceParamsWithTimeout

func NewGetServiceParamsWithTimeout(timeout time.Duration) *GetServiceParams

NewGetServiceParamsWithTimeout creates a new GetServiceParams object with the ability to set a timeout on a request.

func (*GetServiceParams) SetContext deprecated

func (o *GetServiceParams) SetContext(ctx context.Context)

SetContext adds the context to the get service params.

Deprecated: use the operation call with context to pass the context instead of GetServiceParams.

func (*GetServiceParams) SetDefaults added in v0.15.7

func (o *GetServiceParams) SetDefaults()

SetDefaults hydrates default values in the get service params (not the query body).

All values with no default are reset to their zero value.

func (*GetServiceParams) SetHTTPClient

func (o *GetServiceParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the get service params.

func (*GetServiceParams) SetTimeout

func (o *GetServiceParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the get service params.

func (*GetServiceParams) WithContext deprecated

func (o *GetServiceParams) WithContext(ctx context.Context) *GetServiceParams

WithContext adds the context to the get service params.

Deprecated: use the operation call with context to pass the context instead of GetServiceParams.

func (*GetServiceParams) WithDefaults added in v0.15.7

func (o *GetServiceParams) WithDefaults() *GetServiceParams

WithDefaults hydrates default values in the get service params (not the query body).

All values with no default are reset to their zero value.

func (*GetServiceParams) WithHTTPClient

func (o *GetServiceParams) WithHTTPClient(client *http.Client) *GetServiceParams

WithHTTPClient adds the HTTPClient to the get service params.

func (*GetServiceParams) WithTimeout

func (o *GetServiceParams) WithTimeout(timeout time.Duration) *GetServiceParams

WithTimeout adds the timeout to the get service params.

func (*GetServiceParams) WriteToRequest

func (o *GetServiceParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a runtime.ClientRequest.

type GetServiceReader

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

GetServiceReader is a Reader for the GetService structure.

func (*GetServiceReader) ReadResponse

func (o *GetServiceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error)

ReadResponse reads a server response into the received o.

Jump to

Keyboard shortcuts

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