containers

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2021 License: BSD-3-Clause Imports: 11 Imported by: 1

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 containers API

func (*Client) CreateContainer

func (a *Client) CreateContainer(params *CreateContainerParams, opts ...ClientOption) (*CreateContainerCreated, error)

CreateContainer Create a container

func (*Client) DeleteContainer

func (a *Client) DeleteContainer(params *DeleteContainerParams, opts ...ClientOption) (*DeleteContainerOK, error)
DeleteContainer Delete a container defition.

Either `id` or `name` query parameter must be specified.

func (*Client) ListContainers

func (a *Client) ListContainers(params *ListContainersParams, opts ...ClientOption) (*ListContainersOK, error)

ListContainers Get a list of containers

func (*Client) SetContainerState

func (a *Client) SetContainerState(params *SetContainerStateParams, opts ...ClientOption) (*SetContainerStateOK, error)
SetContainerState Request a (valid) state for a container.

Valid states to request include: `running`, `exited`, `paused` (paused is not yet implemented)

Either a valid Name or ID must be passed as a query parameter, along with a valid state parameter.

func (*Client) SetTransport

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

SetTransport changes the transport on the client

type ClientOption added in v0.2.0

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService

type ClientService interface {
	CreateContainer(params *CreateContainerParams, opts ...ClientOption) (*CreateContainerCreated, error)

	DeleteContainer(params *DeleteContainerParams, opts ...ClientOption) (*DeleteContainerOK, error)

	ListContainers(params *ListContainersParams, opts ...ClientOption) (*ListContainersOK, error)

	SetContainerState(params *SetContainerStateParams, opts ...ClientOption) (*SetContainerStateOK, 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 containers API client.

type CreateContainerCreated

type CreateContainerCreated struct {
	Payload *models.Container
}
CreateContainerCreated describes a response with status code 201, with default header values.

Container creation succeed

func NewCreateContainerCreated

func NewCreateContainerCreated() *CreateContainerCreated

NewCreateContainerCreated creates a CreateContainerCreated with default headers values

func (*CreateContainerCreated) Error

func (o *CreateContainerCreated) Error() string

func (*CreateContainerCreated) GetPayload

func (o *CreateContainerCreated) GetPayload() *models.Container

type CreateContainerDefault

type CreateContainerDefault struct {
	Payload *models.Error
	// contains filtered or unexported fields
}
CreateContainerDefault describes a response with status code -1, with default header values.

error

func NewCreateContainerDefault

func NewCreateContainerDefault(code int) *CreateContainerDefault

NewCreateContainerDefault creates a CreateContainerDefault with default headers values

func (*CreateContainerDefault) Code

func (o *CreateContainerDefault) Code() int

Code gets the status code for the create container default response

func (*CreateContainerDefault) Error

func (o *CreateContainerDefault) Error() string

func (*CreateContainerDefault) GetPayload

func (o *CreateContainerDefault) GetPayload() *models.Error

type CreateContainerParams

type CreateContainerParams struct {

	// Container.
	Container *models.Container

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

CreateContainerParams contains all the parameters to send to the API endpoint

for the create container operation.

Typically these are written to a http.Request.

func NewCreateContainerParams

func NewCreateContainerParams() *CreateContainerParams

NewCreateContainerParams creates a new CreateContainerParams 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 NewCreateContainerParamsWithContext

func NewCreateContainerParamsWithContext(ctx context.Context) *CreateContainerParams

NewCreateContainerParamsWithContext creates a new CreateContainerParams object with the ability to set a context for a request.

func NewCreateContainerParamsWithHTTPClient

func NewCreateContainerParamsWithHTTPClient(client *http.Client) *CreateContainerParams

NewCreateContainerParamsWithHTTPClient creates a new CreateContainerParams object with the ability to set a custom HTTPClient for a request.

func NewCreateContainerParamsWithTimeout

func NewCreateContainerParamsWithTimeout(timeout time.Duration) *CreateContainerParams

NewCreateContainerParamsWithTimeout creates a new CreateContainerParams object with the ability to set a timeout on a request.

func (*CreateContainerParams) SetContainer

func (o *CreateContainerParams) SetContainer(container *models.Container)

SetContainer adds the container to the create container params

func (*CreateContainerParams) SetContext

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

SetContext adds the context to the create container params

func (*CreateContainerParams) SetDefaults added in v0.2.0

func (o *CreateContainerParams) SetDefaults()

SetDefaults hydrates default values in the create container params (not the query body).

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

func (*CreateContainerParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the create container params

func (*CreateContainerParams) SetTimeout

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

SetTimeout adds the timeout to the create container params

func (*CreateContainerParams) WithContainer

func (o *CreateContainerParams) WithContainer(container *models.Container) *CreateContainerParams

WithContainer adds the container to the create container params

func (*CreateContainerParams) WithContext

WithContext adds the context to the create container params

func (*CreateContainerParams) WithDefaults added in v0.2.0

func (o *CreateContainerParams) WithDefaults() *CreateContainerParams

WithDefaults hydrates default values in the create container params (not the query body).

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

func (*CreateContainerParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the create container params

func (*CreateContainerParams) WithTimeout

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

WithTimeout adds the timeout to the create container params

func (*CreateContainerParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type CreateContainerReader

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

CreateContainerReader is a Reader for the CreateContainer structure.

func (*CreateContainerReader) ReadResponse

func (o *CreateContainerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type DeleteContainerDefault

type DeleteContainerDefault struct {
	Payload *models.Error
	// contains filtered or unexported fields
}
DeleteContainerDefault describes a response with status code -1, with default header values.

error

func NewDeleteContainerDefault

func NewDeleteContainerDefault(code int) *DeleteContainerDefault

NewDeleteContainerDefault creates a DeleteContainerDefault with default headers values

func (*DeleteContainerDefault) Code

func (o *DeleteContainerDefault) Code() int

Code gets the status code for the delete container default response

func (*DeleteContainerDefault) Error

func (o *DeleteContainerDefault) Error() string

func (*DeleteContainerDefault) GetPayload

func (o *DeleteContainerDefault) GetPayload() *models.Error

type DeleteContainerOK

type DeleteContainerOK struct {
	Payload *models.Container
}
DeleteContainerOK describes a response with status code 200, with default header values.

Container deleted

func NewDeleteContainerOK

func NewDeleteContainerOK() *DeleteContainerOK

NewDeleteContainerOK creates a DeleteContainerOK with default headers values

func (*DeleteContainerOK) Error

func (o *DeleteContainerOK) Error() string

func (*DeleteContainerOK) GetPayload

func (o *DeleteContainerOK) GetPayload() *models.Container

type DeleteContainerParams

type DeleteContainerParams struct {

	/* Force.

	   Force deletion
	*/
	Force *bool

	/* ID.

	   Delete by ID

	   Format: int64
	*/
	ID *int64

	/* Name.

	   Delete by Name
	*/
	Name *string

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

DeleteContainerParams contains all the parameters to send to the API endpoint

for the delete container operation.

Typically these are written to a http.Request.

func NewDeleteContainerParams

func NewDeleteContainerParams() *DeleteContainerParams

NewDeleteContainerParams creates a new DeleteContainerParams 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 NewDeleteContainerParamsWithContext

func NewDeleteContainerParamsWithContext(ctx context.Context) *DeleteContainerParams

NewDeleteContainerParamsWithContext creates a new DeleteContainerParams object with the ability to set a context for a request.

func NewDeleteContainerParamsWithHTTPClient

func NewDeleteContainerParamsWithHTTPClient(client *http.Client) *DeleteContainerParams

NewDeleteContainerParamsWithHTTPClient creates a new DeleteContainerParams object with the ability to set a custom HTTPClient for a request.

func NewDeleteContainerParamsWithTimeout

func NewDeleteContainerParamsWithTimeout(timeout time.Duration) *DeleteContainerParams

NewDeleteContainerParamsWithTimeout creates a new DeleteContainerParams object with the ability to set a timeout on a request.

func (*DeleteContainerParams) SetContext

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

SetContext adds the context to the delete container params

func (*DeleteContainerParams) SetDefaults added in v0.2.0

func (o *DeleteContainerParams) SetDefaults()

SetDefaults hydrates default values in the delete container params (not the query body).

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

func (*DeleteContainerParams) SetForce added in v0.2.0

func (o *DeleteContainerParams) SetForce(force *bool)

SetForce adds the force to the delete container params

func (*DeleteContainerParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the delete container params

func (*DeleteContainerParams) SetID

func (o *DeleteContainerParams) SetID(id *int64)

SetID adds the id to the delete container params

func (*DeleteContainerParams) SetName added in v0.2.0

func (o *DeleteContainerParams) SetName(name *string)

SetName adds the name to the delete container params

func (*DeleteContainerParams) SetTimeout

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

SetTimeout adds the timeout to the delete container params

func (*DeleteContainerParams) WithContext

WithContext adds the context to the delete container params

func (*DeleteContainerParams) WithDefaults added in v0.2.0

func (o *DeleteContainerParams) WithDefaults() *DeleteContainerParams

WithDefaults hydrates default values in the delete container params (not the query body).

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

func (*DeleteContainerParams) WithForce added in v0.2.0

func (o *DeleteContainerParams) WithForce(force *bool) *DeleteContainerParams

WithForce adds the force to the delete container params

func (*DeleteContainerParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the delete container params

func (*DeleteContainerParams) WithID

WithID adds the id to the delete container params

func (*DeleteContainerParams) WithName added in v0.2.0

WithName adds the name to the delete container params

func (*DeleteContainerParams) WithTimeout

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

WithTimeout adds the timeout to the delete container params

func (*DeleteContainerParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type DeleteContainerReader

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

DeleteContainerReader is a Reader for the DeleteContainer structure.

func (*DeleteContainerReader) ReadResponse

func (o *DeleteContainerReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type ListContainersDefault

type ListContainersDefault struct {
	Payload *models.Error
	// contains filtered or unexported fields
}
ListContainersDefault describes a response with status code -1, with default header values.

error

func NewListContainersDefault

func NewListContainersDefault(code int) *ListContainersDefault

NewListContainersDefault creates a ListContainersDefault with default headers values

func (*ListContainersDefault) Code

func (o *ListContainersDefault) Code() int

Code gets the status code for the list containers default response

func (*ListContainersDefault) Error

func (o *ListContainersDefault) Error() string

func (*ListContainersDefault) GetPayload

func (o *ListContainersDefault) GetPayload() *models.Error

type ListContainersOK

type ListContainersOK struct {
	Payload []*models.Container
}
ListContainersOK describes a response with status code 200, with default header values.

List of containers

func NewListContainersOK

func NewListContainersOK() *ListContainersOK

NewListContainersOK creates a ListContainersOK with default headers values

func (*ListContainersOK) Error

func (o *ListContainersOK) Error() string

func (*ListContainersOK) GetPayload

func (o *ListContainersOK) GetPayload() []*models.Container

type ListContainersParams

type ListContainersParams struct {

	/* ID.

	   Query containers by ID

	   Format: int64
	*/
	ID *int64

	/* Name.

	   Query containers by name
	*/
	Name *string

	/* State.

	   Query containers by state
	*/
	State *string

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

ListContainersParams contains all the parameters to send to the API endpoint

for the list containers operation.

Typically these are written to a http.Request.

func NewListContainersParams

func NewListContainersParams() *ListContainersParams

NewListContainersParams creates a new ListContainersParams 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 NewListContainersParamsWithContext

func NewListContainersParamsWithContext(ctx context.Context) *ListContainersParams

NewListContainersParamsWithContext creates a new ListContainersParams object with the ability to set a context for a request.

func NewListContainersParamsWithHTTPClient

func NewListContainersParamsWithHTTPClient(client *http.Client) *ListContainersParams

NewListContainersParamsWithHTTPClient creates a new ListContainersParams object with the ability to set a custom HTTPClient for a request.

func NewListContainersParamsWithTimeout

func NewListContainersParamsWithTimeout(timeout time.Duration) *ListContainersParams

NewListContainersParamsWithTimeout creates a new ListContainersParams object with the ability to set a timeout on a request.

func (*ListContainersParams) SetContext

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

SetContext adds the context to the list containers params

func (*ListContainersParams) SetDefaults added in v0.2.0

func (o *ListContainersParams) SetDefaults()

SetDefaults hydrates default values in the list containers params (not the query body).

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

func (*ListContainersParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the list containers params

func (*ListContainersParams) SetID added in v0.2.0

func (o *ListContainersParams) SetID(id *int64)

SetID adds the id to the list containers params

func (*ListContainersParams) SetName added in v0.2.0

func (o *ListContainersParams) SetName(name *string)

SetName adds the name to the list containers params

func (*ListContainersParams) SetState added in v0.2.0

func (o *ListContainersParams) SetState(state *string)

SetState adds the state to the list containers params

func (*ListContainersParams) SetTimeout

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

SetTimeout adds the timeout to the list containers params

func (*ListContainersParams) WithContext

WithContext adds the context to the list containers params

func (*ListContainersParams) WithDefaults added in v0.2.0

func (o *ListContainersParams) WithDefaults() *ListContainersParams

WithDefaults hydrates default values in the list containers params (not the query body).

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

func (*ListContainersParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the list containers params

func (*ListContainersParams) WithID added in v0.2.0

WithID adds the id to the list containers params

func (*ListContainersParams) WithName added in v0.2.0

func (o *ListContainersParams) WithName(name *string) *ListContainersParams

WithName adds the name to the list containers params

func (*ListContainersParams) WithState added in v0.2.0

func (o *ListContainersParams) WithState(state *string) *ListContainersParams

WithState adds the state to the list containers params

func (*ListContainersParams) WithTimeout

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

WithTimeout adds the timeout to the list containers params

func (*ListContainersParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type ListContainersReader

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

ListContainersReader is a Reader for the ListContainers structure.

func (*ListContainersReader) ReadResponse

func (o *ListContainersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type SetContainerStateDefault

type SetContainerStateDefault struct {
	Payload *models.Error
	// contains filtered or unexported fields
}
SetContainerStateDefault describes a response with status code -1, with default header values.

error

func NewSetContainerStateDefault

func NewSetContainerStateDefault(code int) *SetContainerStateDefault

NewSetContainerStateDefault creates a SetContainerStateDefault with default headers values

func (*SetContainerStateDefault) Code

func (o *SetContainerStateDefault) Code() int

Code gets the status code for the set container state default response

func (*SetContainerStateDefault) Error

func (o *SetContainerStateDefault) Error() string

func (*SetContainerStateDefault) GetPayload

func (o *SetContainerStateDefault) GetPayload() *models.Error

type SetContainerStateOK

type SetContainerStateOK struct {
	Payload *models.Container
}
SetContainerStateOK describes a response with status code 200, with default header values.

Container state changed

func NewSetContainerStateOK

func NewSetContainerStateOK() *SetContainerStateOK

NewSetContainerStateOK creates a SetContainerStateOK with default headers values

func (*SetContainerStateOK) Error

func (o *SetContainerStateOK) Error() string

func (*SetContainerStateOK) GetPayload

func (o *SetContainerStateOK) GetPayload() *models.Container

type SetContainerStateParams

type SetContainerStateParams struct {

	/* ID.

	   ID of container

	   Format: int64
	*/
	ID *int64

	/* Name.

	   Name of container
	*/
	Name *string

	/* State.

	   Desired container state
	*/
	State string

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

SetContainerStateParams contains all the parameters to send to the API endpoint

for the set container state operation.

Typically these are written to a http.Request.

func NewSetContainerStateParams

func NewSetContainerStateParams() *SetContainerStateParams

NewSetContainerStateParams creates a new SetContainerStateParams 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 NewSetContainerStateParamsWithContext

func NewSetContainerStateParamsWithContext(ctx context.Context) *SetContainerStateParams

NewSetContainerStateParamsWithContext creates a new SetContainerStateParams object with the ability to set a context for a request.

func NewSetContainerStateParamsWithHTTPClient

func NewSetContainerStateParamsWithHTTPClient(client *http.Client) *SetContainerStateParams

NewSetContainerStateParamsWithHTTPClient creates a new SetContainerStateParams object with the ability to set a custom HTTPClient for a request.

func NewSetContainerStateParamsWithTimeout

func NewSetContainerStateParamsWithTimeout(timeout time.Duration) *SetContainerStateParams

NewSetContainerStateParamsWithTimeout creates a new SetContainerStateParams object with the ability to set a timeout on a request.

func (*SetContainerStateParams) SetContext

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

SetContext adds the context to the set container state params

func (*SetContainerStateParams) SetDefaults added in v0.2.0

func (o *SetContainerStateParams) SetDefaults()

SetDefaults hydrates default values in the set container state params (not the query body).

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

func (*SetContainerStateParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the set container state params

func (*SetContainerStateParams) SetID

func (o *SetContainerStateParams) SetID(id *int64)

SetID adds the id to the set container state params

func (*SetContainerStateParams) SetName added in v0.2.0

func (o *SetContainerStateParams) SetName(name *string)

SetName adds the name to the set container state params

func (*SetContainerStateParams) SetState

func (o *SetContainerStateParams) SetState(state string)

SetState adds the state to the set container state params

func (*SetContainerStateParams) SetTimeout

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

SetTimeout adds the timeout to the set container state params

func (*SetContainerStateParams) WithContext

WithContext adds the context to the set container state params

func (*SetContainerStateParams) WithDefaults added in v0.2.0

WithDefaults hydrates default values in the set container state params (not the query body).

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

func (*SetContainerStateParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the set container state params

func (*SetContainerStateParams) WithID

WithID adds the id to the set container state params

func (*SetContainerStateParams) WithName added in v0.2.0

WithName adds the name to the set container state params

func (*SetContainerStateParams) WithState

WithState adds the state to the set container state params

func (*SetContainerStateParams) WithTimeout

WithTimeout adds the timeout to the set container state params

func (*SetContainerStateParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type SetContainerStateReader

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

SetContainerStateReader is a Reader for the SetContainerState structure.

func (*SetContainerStateReader) ReadResponse

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