service

package
v1.4.1 Latest Latest
Warning

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

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

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

func (a *Client) ReadService(params *ReadServiceParams, opts ...ClientOption) (*ReadServiceOK, error)

ReadService read service API

func (*Client) SetTransport

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

SetTransport changes the transport on the client

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService

type ClientService interface {
	ReadService(params *ReadServiceParams, opts ...ClientOption) (*ReadServiceOK, error)

	SetTransport(transport runtime.ClientTransport)
}

ClientService is the interface for Client methods

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService

New creates a new service API client.

type ReadServiceDefault

type ReadServiceDefault struct {
	Payload models.GenericError
	// contains filtered or unexported fields
}

ReadServiceDefault describes a response with status code -1, with default header values.

An undefined error response.

func NewReadServiceDefault

func NewReadServiceDefault(code int) *ReadServiceDefault

NewReadServiceDefault creates a ReadServiceDefault with default headers values

func (*ReadServiceDefault) Code

func (o *ReadServiceDefault) Code() int

Code gets the status code for the read service default response

func (*ReadServiceDefault) Error

func (o *ReadServiceDefault) Error() string

func (*ReadServiceDefault) GetPayload

func (o *ReadServiceDefault) GetPayload() models.GenericError

func (*ReadServiceDefault) IsClientError

func (o *ReadServiceDefault) IsClientError() bool

IsClientError returns true when this read service default response has a 4xx status code

func (*ReadServiceDefault) IsCode

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

IsCode returns true when this read service default response a status code equal to that given

func (*ReadServiceDefault) IsRedirect

func (o *ReadServiceDefault) IsRedirect() bool

IsRedirect returns true when this read service default response has a 3xx status code

func (*ReadServiceDefault) IsServerError

func (o *ReadServiceDefault) IsServerError() bool

IsServerError returns true when this read service default response has a 5xx status code

func (*ReadServiceDefault) IsSuccess

func (o *ReadServiceDefault) IsSuccess() bool

IsSuccess returns true when this read service default response has a 2xx status code

func (*ReadServiceDefault) String

func (o *ReadServiceDefault) String() string

type ReadServiceInternalServerError

type ReadServiceInternalServerError struct {
	Payload *models.APIError
}

ReadServiceInternalServerError describes a response with status code 500, with default header values.

An unexpected error response.

func NewReadServiceInternalServerError

func NewReadServiceInternalServerError() *ReadServiceInternalServerError

NewReadServiceInternalServerError creates a ReadServiceInternalServerError with default headers values

func (*ReadServiceInternalServerError) Code

Code gets the status code for the read service internal server error response

func (*ReadServiceInternalServerError) Error

func (*ReadServiceInternalServerError) GetPayload

func (*ReadServiceInternalServerError) IsClientError

func (o *ReadServiceInternalServerError) IsClientError() bool

IsClientError returns true when this read service internal server error response has a 4xx status code

func (*ReadServiceInternalServerError) IsCode

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

IsCode returns true when this read service internal server error response a status code equal to that given

func (*ReadServiceInternalServerError) IsRedirect

func (o *ReadServiceInternalServerError) IsRedirect() bool

IsRedirect returns true when this read service internal server error response has a 3xx status code

func (*ReadServiceInternalServerError) IsServerError

func (o *ReadServiceInternalServerError) IsServerError() bool

IsServerError returns true when this read service internal server error response has a 5xx status code

func (*ReadServiceInternalServerError) IsSuccess

func (o *ReadServiceInternalServerError) IsSuccess() bool

IsSuccess returns true when this read service internal server error response has a 2xx status code

func (*ReadServiceInternalServerError) String

type ReadServiceNotFound

type ReadServiceNotFound struct {
	Payload *models.APIError
}

ReadServiceNotFound describes a response with status code 404, with default header values.

Cannot read the Service because the slug does not exist.

func NewReadServiceNotFound

func NewReadServiceNotFound() *ReadServiceNotFound

NewReadServiceNotFound creates a ReadServiceNotFound with default headers values

func (*ReadServiceNotFound) Code

func (o *ReadServiceNotFound) Code() int

Code gets the status code for the read service not found response

func (*ReadServiceNotFound) Error

func (o *ReadServiceNotFound) Error() string

func (*ReadServiceNotFound) GetPayload

func (o *ReadServiceNotFound) GetPayload() *models.APIError

func (*ReadServiceNotFound) IsClientError

func (o *ReadServiceNotFound) IsClientError() bool

IsClientError returns true when this read service not found response has a 4xx status code

func (*ReadServiceNotFound) IsCode

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

IsCode returns true when this read service not found response a status code equal to that given

func (*ReadServiceNotFound) IsRedirect

func (o *ReadServiceNotFound) IsRedirect() bool

IsRedirect returns true when this read service not found response has a 3xx status code

func (*ReadServiceNotFound) IsServerError

func (o *ReadServiceNotFound) IsServerError() bool

IsServerError returns true when this read service not found response has a 5xx status code

func (*ReadServiceNotFound) IsSuccess

func (o *ReadServiceNotFound) IsSuccess() bool

IsSuccess returns true when this read service not found response has a 2xx status code

func (*ReadServiceNotFound) String

func (o *ReadServiceNotFound) String() string

type ReadServiceOK

type ReadServiceOK struct {
	Payload *models.Configv1ReadServiceResponse
}

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

A successful response.

func NewReadServiceOK

func NewReadServiceOK() *ReadServiceOK

NewReadServiceOK creates a ReadServiceOK with default headers values

func (*ReadServiceOK) Code

func (o *ReadServiceOK) Code() int

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

func (*ReadServiceOK) Error

func (o *ReadServiceOK) Error() string

func (*ReadServiceOK) GetPayload

func (*ReadServiceOK) IsClientError

func (o *ReadServiceOK) IsClientError() bool

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

func (*ReadServiceOK) IsCode

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

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

func (*ReadServiceOK) IsRedirect

func (o *ReadServiceOK) IsRedirect() bool

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

func (*ReadServiceOK) IsServerError

func (o *ReadServiceOK) IsServerError() bool

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

func (*ReadServiceOK) IsSuccess

func (o *ReadServiceOK) IsSuccess() bool

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

func (*ReadServiceOK) String

func (o *ReadServiceOK) String() string

type ReadServiceParams

type ReadServiceParams struct {

	// Slug.
	Slug string

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

ReadServiceParams contains all the parameters to send to the API endpoint

for the read service operation.

Typically these are written to a http.Request.

func NewReadServiceParams

func NewReadServiceParams() *ReadServiceParams

NewReadServiceParams creates a new ReadServiceParams 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 NewReadServiceParamsWithContext

func NewReadServiceParamsWithContext(ctx context.Context) *ReadServiceParams

NewReadServiceParamsWithContext creates a new ReadServiceParams object with the ability to set a context for a request.

func NewReadServiceParamsWithHTTPClient

func NewReadServiceParamsWithHTTPClient(client *http.Client) *ReadServiceParams

NewReadServiceParamsWithHTTPClient creates a new ReadServiceParams object with the ability to set a custom HTTPClient for a request.

func NewReadServiceParamsWithTimeout

func NewReadServiceParamsWithTimeout(timeout time.Duration) *ReadServiceParams

NewReadServiceParamsWithTimeout creates a new ReadServiceParams object with the ability to set a timeout on a request.

func (*ReadServiceParams) SetContext

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

SetContext adds the context to the read service params

func (*ReadServiceParams) SetDefaults

func (o *ReadServiceParams) SetDefaults()

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

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

func (*ReadServiceParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the read service params

func (*ReadServiceParams) SetSlug

func (o *ReadServiceParams) SetSlug(slug string)

SetSlug adds the slug to the read service params

func (*ReadServiceParams) SetTimeout

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

SetTimeout adds the timeout to the read service params

func (*ReadServiceParams) WithContext

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

WithContext adds the context to the read service params

func (*ReadServiceParams) WithDefaults

func (o *ReadServiceParams) WithDefaults() *ReadServiceParams

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

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

func (*ReadServiceParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the read service params

func (*ReadServiceParams) WithSlug

func (o *ReadServiceParams) WithSlug(slug string) *ReadServiceParams

WithSlug adds the slug to the read service params

func (*ReadServiceParams) WithTimeout

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

WithTimeout adds the timeout to the read service params

func (*ReadServiceParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type ReadServiceReader

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

ReadServiceReader is a Reader for the ReadService structure.

func (*ReadServiceReader) ReadResponse

func (o *ReadServiceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, 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