icon

package
v3.3.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2021 License: MIT 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 icon API

func (*Client) GetIcon

func (a *Client) GetIcon(params *GetIconParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIconOK, error)

GetIcon gets artifact icon

Get the artifact icon with the specified digest. As the original icon image is resized and encoded before returning, the parameter "digest" in the path doesn't match the hash of the returned content

func (*Client) SetTransport

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

SetTransport changes the transport on the client

type ClientOption added in v3.2.1

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService

type ClientService interface {
	GetIcon(params *GetIconParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetIconOK, 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 icon API client.

type GetIconBadRequest

type GetIconBadRequest struct {

	/* The ID of the corresponding request for the response
	 */
	XRequestID string

	Payload *model.Errors
}
GetIconBadRequest describes a response with status code 400, with default header values.

Bad request

func NewGetIconBadRequest

func NewGetIconBadRequest() *GetIconBadRequest

NewGetIconBadRequest creates a GetIconBadRequest with default headers values

func (*GetIconBadRequest) Error

func (o *GetIconBadRequest) Error() string

func (*GetIconBadRequest) GetPayload

func (o *GetIconBadRequest) GetPayload() *model.Errors

type GetIconInternalServerError

type GetIconInternalServerError struct {

	/* The ID of the corresponding request for the response
	 */
	XRequestID string

	Payload *model.Errors
}
GetIconInternalServerError describes a response with status code 500, with default header values.

Internal server error

func NewGetIconInternalServerError

func NewGetIconInternalServerError() *GetIconInternalServerError

NewGetIconInternalServerError creates a GetIconInternalServerError with default headers values

func (*GetIconInternalServerError) Error

func (*GetIconInternalServerError) GetPayload

func (o *GetIconInternalServerError) GetPayload() *model.Errors

type GetIconNotFound

type GetIconNotFound struct {

	/* The ID of the corresponding request for the response
	 */
	XRequestID string

	Payload *model.Errors
}
GetIconNotFound describes a response with status code 404, with default header values.

Not found

func NewGetIconNotFound

func NewGetIconNotFound() *GetIconNotFound

NewGetIconNotFound creates a GetIconNotFound with default headers values

func (*GetIconNotFound) Error

func (o *GetIconNotFound) Error() string

func (*GetIconNotFound) GetPayload

func (o *GetIconNotFound) GetPayload() *model.Errors

type GetIconOK

type GetIconOK struct {
	Payload *model.Icon
}
GetIconOK describes a response with status code 200, with default header values.

Success

func NewGetIconOK

func NewGetIconOK() *GetIconOK

NewGetIconOK creates a GetIconOK with default headers values

func (*GetIconOK) Error

func (o *GetIconOK) Error() string

func (*GetIconOK) GetPayload

func (o *GetIconOK) GetPayload() *model.Icon

type GetIconParams

type GetIconParams struct {

	/* XRequestID.

	   An unique ID for the request
	*/
	XRequestID *string

	/* Digest.

	   The digest of the resource
	*/
	Digest string

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

GetIconParams contains all the parameters to send to the API endpoint

for the get icon operation.

Typically these are written to a http.Request.

func NewGetIconParams

func NewGetIconParams() *GetIconParams

NewGetIconParams creates a new GetIconParams 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 NewGetIconParamsWithContext

func NewGetIconParamsWithContext(ctx context.Context) *GetIconParams

NewGetIconParamsWithContext creates a new GetIconParams object with the ability to set a context for a request.

func NewGetIconParamsWithHTTPClient

func NewGetIconParamsWithHTTPClient(client *http.Client) *GetIconParams

NewGetIconParamsWithHTTPClient creates a new GetIconParams object with the ability to set a custom HTTPClient for a request.

func NewGetIconParamsWithTimeout

func NewGetIconParamsWithTimeout(timeout time.Duration) *GetIconParams

NewGetIconParamsWithTimeout creates a new GetIconParams object with the ability to set a timeout on a request.

func (*GetIconParams) SetContext

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

SetContext adds the context to the get icon params

func (*GetIconParams) SetDefaults added in v3.1.1

func (o *GetIconParams) SetDefaults()

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

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

func (*GetIconParams) SetDigest

func (o *GetIconParams) SetDigest(digest string)

SetDigest adds the digest to the get icon params

func (*GetIconParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get icon params

func (*GetIconParams) SetTimeout

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

SetTimeout adds the timeout to the get icon params

func (*GetIconParams) SetXRequestID

func (o *GetIconParams) SetXRequestID(xRequestID *string)

SetXRequestID adds the xRequestId to the get icon params

func (*GetIconParams) WithContext

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

WithContext adds the context to the get icon params

func (*GetIconParams) WithDefaults added in v3.1.1

func (o *GetIconParams) WithDefaults() *GetIconParams

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

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

func (*GetIconParams) WithDigest

func (o *GetIconParams) WithDigest(digest string) *GetIconParams

WithDigest adds the digest to the get icon params

func (*GetIconParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get icon params

func (*GetIconParams) WithTimeout

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

WithTimeout adds the timeout to the get icon params

func (*GetIconParams) WithXRequestID

func (o *GetIconParams) WithXRequestID(xRequestID *string) *GetIconParams

WithXRequestID adds the xRequestID to the get icon params

func (*GetIconParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetIconReader

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

GetIconReader is a Reader for the GetIcon structure.

func (*GetIconReader) ReadResponse

func (o *GetIconReader) 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