task

package
v0.0.0-...-f9bae2f Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const TaskInspectInternalServerErrorCode int = 500

TaskInspectInternalServerErrorCode is the HTTP code returned for type TaskInspectInternalServerError

View Source
const TaskInspectNotFoundCode int = 404

TaskInspectNotFoundCode is the HTTP code returned for type TaskInspectNotFound

View Source
const TaskInspectOKCode int = 200

TaskInspectOKCode is the HTTP code returned for type TaskInspectOK

View Source
const TaskInspectServiceUnavailableCode int = 503

TaskInspectServiceUnavailableCode is the HTTP code returned for type TaskInspectServiceUnavailable

View Source
const TaskListInternalServerErrorCode int = 500

TaskListInternalServerErrorCode is the HTTP code returned for type TaskListInternalServerError

View Source
const TaskListOKCode int = 200

TaskListOKCode is the HTTP code returned for type TaskListOK

View Source
const TaskListServiceUnavailableCode int = 503

TaskListServiceUnavailableCode is the HTTP code returned for type TaskListServiceUnavailable

View Source
const TaskLogsInternalServerErrorCode int = 500

TaskLogsInternalServerErrorCode is the HTTP code returned for type TaskLogsInternalServerError

View Source
const TaskLogsNotFoundCode int = 404

TaskLogsNotFoundCode is the HTTP code returned for type TaskLogsNotFound

View Source
const TaskLogsOKCode int = 200

TaskLogsOKCode is the HTTP code returned for type TaskLogsOK

View Source
const TaskLogsServiceUnavailableCode int = 503

TaskLogsServiceUnavailableCode is the HTTP code returned for type TaskLogsServiceUnavailable

Variables

This section is empty.

Functions

This section is empty.

Types

type TaskInspect

type TaskInspect struct {
	Context *middleware.Context
	Handler TaskInspectHandler
}
TaskInspect swagger:route GET /tasks/{id} Task taskInspect

Inspect a task

func NewTaskInspect

func NewTaskInspect(ctx *middleware.Context, handler TaskInspectHandler) *TaskInspect

NewTaskInspect creates a new http.Handler for the task inspect operation

func (*TaskInspect) ServeHTTP

func (o *TaskInspect) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type TaskInspectHandler

type TaskInspectHandler interface {
	Handle(TaskInspectParams) middleware.Responder
}

TaskInspectHandler interface for that can handle valid task inspect params

type TaskInspectHandlerFunc

type TaskInspectHandlerFunc func(TaskInspectParams) middleware.Responder

TaskInspectHandlerFunc turns a function with the right signature into a task inspect handler

func (TaskInspectHandlerFunc) Handle

Handle executing the request and returning a response

type TaskInspectInternalServerError

type TaskInspectInternalServerError struct {

	/*
	  In: Body
	*/
	Payload *models.ErrorResponse `json:"body,omitempty"`
}

TaskInspectInternalServerError server error

swagger:response taskInspectInternalServerError

func NewTaskInspectInternalServerError

func NewTaskInspectInternalServerError() *TaskInspectInternalServerError

NewTaskInspectInternalServerError creates TaskInspectInternalServerError with default headers values

func (*TaskInspectInternalServerError) SetPayload

func (o *TaskInspectInternalServerError) SetPayload(payload *models.ErrorResponse)

SetPayload sets the payload to the task inspect internal server error response

func (*TaskInspectInternalServerError) WithPayload

WithPayload adds the payload to the task inspect internal server error response

func (*TaskInspectInternalServerError) WriteResponse

func (o *TaskInspectInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type TaskInspectNotFound

type TaskInspectNotFound struct {

	/*
	  In: Body
	*/
	Payload *models.ErrorResponse `json:"body,omitempty"`
}

TaskInspectNotFound no such task

swagger:response taskInspectNotFound

func NewTaskInspectNotFound

func NewTaskInspectNotFound() *TaskInspectNotFound

NewTaskInspectNotFound creates TaskInspectNotFound with default headers values

func (*TaskInspectNotFound) SetPayload

func (o *TaskInspectNotFound) SetPayload(payload *models.ErrorResponse)

SetPayload sets the payload to the task inspect not found response

func (*TaskInspectNotFound) WithPayload

func (o *TaskInspectNotFound) WithPayload(payload *models.ErrorResponse) *TaskInspectNotFound

WithPayload adds the payload to the task inspect not found response

func (*TaskInspectNotFound) WriteResponse

func (o *TaskInspectNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type TaskInspectOK

type TaskInspectOK struct {

	/*
	  In: Body
	*/
	Payload *models.Task `json:"body,omitempty"`
}

TaskInspectOK no error

swagger:response taskInspectOK

func NewTaskInspectOK

func NewTaskInspectOK() *TaskInspectOK

NewTaskInspectOK creates TaskInspectOK with default headers values

func (*TaskInspectOK) SetPayload

func (o *TaskInspectOK) SetPayload(payload *models.Task)

SetPayload sets the payload to the task inspect o k response

func (*TaskInspectOK) WithPayload

func (o *TaskInspectOK) WithPayload(payload *models.Task) *TaskInspectOK

WithPayload adds the payload to the task inspect o k response

func (*TaskInspectOK) WriteResponse

func (o *TaskInspectOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type TaskInspectParams

type TaskInspectParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*ID of the task
	  Required: true
	  In: path
	*/
	ID string
}

TaskInspectParams contains all the bound params for the task inspect operation typically these are obtained from a http.Request

swagger:parameters TaskInspect

func NewTaskInspectParams

func NewTaskInspectParams() TaskInspectParams

NewTaskInspectParams creates a new TaskInspectParams object

There are no default values defined in the spec.

func (*TaskInspectParams) BindRequest

func (o *TaskInspectParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewTaskInspectParams() beforehand.

type TaskInspectServiceUnavailable

type TaskInspectServiceUnavailable struct {

	/*
	  In: Body
	*/
	Payload *models.ErrorResponse `json:"body,omitempty"`
}

TaskInspectServiceUnavailable node is not part of a swarm

swagger:response taskInspectServiceUnavailable

func NewTaskInspectServiceUnavailable

func NewTaskInspectServiceUnavailable() *TaskInspectServiceUnavailable

NewTaskInspectServiceUnavailable creates TaskInspectServiceUnavailable with default headers values

func (*TaskInspectServiceUnavailable) SetPayload

func (o *TaskInspectServiceUnavailable) SetPayload(payload *models.ErrorResponse)

SetPayload sets the payload to the task inspect service unavailable response

func (*TaskInspectServiceUnavailable) WithPayload

WithPayload adds the payload to the task inspect service unavailable response

func (*TaskInspectServiceUnavailable) WriteResponse

func (o *TaskInspectServiceUnavailable) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type TaskInspectURL

type TaskInspectURL struct {
	ID string
	// contains filtered or unexported fields
}

TaskInspectURL generates an URL for the task inspect operation

func (*TaskInspectURL) Build

func (o *TaskInspectURL) Build() (*url.URL, error)

Build a url path and query string

func (*TaskInspectURL) BuildFull

func (o *TaskInspectURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*TaskInspectURL) Must

func (o *TaskInspectURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*TaskInspectURL) SetBasePath

func (o *TaskInspectURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*TaskInspectURL) String

func (o *TaskInspectURL) String() string

String returns the string representation of the path with query string

func (*TaskInspectURL) StringFull

func (o *TaskInspectURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*TaskInspectURL) WithBasePath

func (o *TaskInspectURL) WithBasePath(bp string) *TaskInspectURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type TaskList

type TaskList struct {
	Context *middleware.Context
	Handler TaskListHandler
}
TaskList swagger:route GET /tasks Task taskList

List tasks

func NewTaskList

func NewTaskList(ctx *middleware.Context, handler TaskListHandler) *TaskList

NewTaskList creates a new http.Handler for the task list operation

func (*TaskList) ServeHTTP

func (o *TaskList) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type TaskListHandler

type TaskListHandler interface {
	Handle(TaskListParams) middleware.Responder
}

TaskListHandler interface for that can handle valid task list params

type TaskListHandlerFunc

type TaskListHandlerFunc func(TaskListParams) middleware.Responder

TaskListHandlerFunc turns a function with the right signature into a task list handler

func (TaskListHandlerFunc) Handle

Handle executing the request and returning a response

type TaskListInternalServerError

type TaskListInternalServerError struct {

	/*
	  In: Body
	*/
	Payload *models.ErrorResponse `json:"body,omitempty"`
}

TaskListInternalServerError server error

swagger:response taskListInternalServerError

func NewTaskListInternalServerError

func NewTaskListInternalServerError() *TaskListInternalServerError

NewTaskListInternalServerError creates TaskListInternalServerError with default headers values

func (*TaskListInternalServerError) SetPayload

func (o *TaskListInternalServerError) SetPayload(payload *models.ErrorResponse)

SetPayload sets the payload to the task list internal server error response

func (*TaskListInternalServerError) WithPayload

WithPayload adds the payload to the task list internal server error response

func (*TaskListInternalServerError) WriteResponse

func (o *TaskListInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type TaskListOK

type TaskListOK struct {

	/*
	  In: Body
	*/
	Payload []*models.Task `json:"body,omitempty"`
}

TaskListOK no error

swagger:response taskListOK

func NewTaskListOK

func NewTaskListOK() *TaskListOK

NewTaskListOK creates TaskListOK with default headers values

func (*TaskListOK) SetPayload

func (o *TaskListOK) SetPayload(payload []*models.Task)

SetPayload sets the payload to the task list o k response

func (*TaskListOK) WithPayload

func (o *TaskListOK) WithPayload(payload []*models.Task) *TaskListOK

WithPayload adds the payload to the task list o k response

func (*TaskListOK) WriteResponse

func (o *TaskListOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type TaskListParams

type TaskListParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*A JSON encoded value of the filters (a `map[string][]string`) to
	process on the tasks list.

	Available filters:

	- `desired-state=(running | shutdown | accepted)`
	- `id=<task id>`
	- `label=key` or `label="key=value"`
	- `name=<task name>`
	- `node=<node id or name>`
	- `service=<service name>`

	  In: query
	*/
	Filters *string
}

TaskListParams contains all the bound params for the task list operation typically these are obtained from a http.Request

swagger:parameters TaskList

func NewTaskListParams

func NewTaskListParams() TaskListParams

NewTaskListParams creates a new TaskListParams object

There are no default values defined in the spec.

func (*TaskListParams) BindRequest

func (o *TaskListParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewTaskListParams() beforehand.

type TaskListServiceUnavailable

type TaskListServiceUnavailable struct {

	/*
	  In: Body
	*/
	Payload *models.ErrorResponse `json:"body,omitempty"`
}

TaskListServiceUnavailable node is not part of a swarm

swagger:response taskListServiceUnavailable

func NewTaskListServiceUnavailable

func NewTaskListServiceUnavailable() *TaskListServiceUnavailable

NewTaskListServiceUnavailable creates TaskListServiceUnavailable with default headers values

func (*TaskListServiceUnavailable) SetPayload

func (o *TaskListServiceUnavailable) SetPayload(payload *models.ErrorResponse)

SetPayload sets the payload to the task list service unavailable response

func (*TaskListServiceUnavailable) WithPayload

WithPayload adds the payload to the task list service unavailable response

func (*TaskListServiceUnavailable) WriteResponse

func (o *TaskListServiceUnavailable) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type TaskListURL

type TaskListURL struct {
	Filters *string
	// contains filtered or unexported fields
}

TaskListURL generates an URL for the task list operation

func (*TaskListURL) Build

func (o *TaskListURL) Build() (*url.URL, error)

Build a url path and query string

func (*TaskListURL) BuildFull

func (o *TaskListURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*TaskListURL) Must

func (o *TaskListURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*TaskListURL) SetBasePath

func (o *TaskListURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*TaskListURL) String

func (o *TaskListURL) String() string

String returns the string representation of the path with query string

func (*TaskListURL) StringFull

func (o *TaskListURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*TaskListURL) WithBasePath

func (o *TaskListURL) WithBasePath(bp string) *TaskListURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type TaskLogs

type TaskLogs struct {
	Context *middleware.Context
	Handler TaskLogsHandler
}
TaskLogs swagger:route GET /tasks/{id}/logs Task taskLogs

Get task logs

Get `stdout` and `stderr` logs from a task. See also [`/containers/{id}/logs`](#operation/ContainerLogs).

**Note**: This endpoint works only for services with the `local`, `json-file` or `journald` logging drivers.

func NewTaskLogs

func NewTaskLogs(ctx *middleware.Context, handler TaskLogsHandler) *TaskLogs

NewTaskLogs creates a new http.Handler for the task logs operation

func (*TaskLogs) ServeHTTP

func (o *TaskLogs) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type TaskLogsHandler

type TaskLogsHandler interface {
	Handle(TaskLogsParams) middleware.Responder
}

TaskLogsHandler interface for that can handle valid task logs params

type TaskLogsHandlerFunc

type TaskLogsHandlerFunc func(TaskLogsParams) middleware.Responder

TaskLogsHandlerFunc turns a function with the right signature into a task logs handler

func (TaskLogsHandlerFunc) Handle

Handle executing the request and returning a response

type TaskLogsInternalServerError

type TaskLogsInternalServerError struct {

	/*
	  In: Body
	*/
	Payload *models.ErrorResponse `json:"body,omitempty"`
}

TaskLogsInternalServerError server error

swagger:response taskLogsInternalServerError

func NewTaskLogsInternalServerError

func NewTaskLogsInternalServerError() *TaskLogsInternalServerError

NewTaskLogsInternalServerError creates TaskLogsInternalServerError with default headers values

func (*TaskLogsInternalServerError) SetPayload

func (o *TaskLogsInternalServerError) SetPayload(payload *models.ErrorResponse)

SetPayload sets the payload to the task logs internal server error response

func (*TaskLogsInternalServerError) WithPayload

WithPayload adds the payload to the task logs internal server error response

func (*TaskLogsInternalServerError) WriteResponse

func (o *TaskLogsInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type TaskLogsNotFound

type TaskLogsNotFound struct {

	/*
	  In: Body
	*/
	Payload *models.ErrorResponse `json:"body,omitempty"`
}

TaskLogsNotFound no such task

swagger:response taskLogsNotFound

func NewTaskLogsNotFound

func NewTaskLogsNotFound() *TaskLogsNotFound

NewTaskLogsNotFound creates TaskLogsNotFound with default headers values

func (*TaskLogsNotFound) SetPayload

func (o *TaskLogsNotFound) SetPayload(payload *models.ErrorResponse)

SetPayload sets the payload to the task logs not found response

func (*TaskLogsNotFound) WithPayload

func (o *TaskLogsNotFound) WithPayload(payload *models.ErrorResponse) *TaskLogsNotFound

WithPayload adds the payload to the task logs not found response

func (*TaskLogsNotFound) WriteResponse

func (o *TaskLogsNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type TaskLogsOK

type TaskLogsOK struct {

	/*
	  In: Body
	*/
	Payload io.ReadCloser `json:"body,omitempty"`
}

TaskLogsOK logs returned as a stream in response body

swagger:response taskLogsOK

func NewTaskLogsOK

func NewTaskLogsOK() *TaskLogsOK

NewTaskLogsOK creates TaskLogsOK with default headers values

func (*TaskLogsOK) SetPayload

func (o *TaskLogsOK) SetPayload(payload io.ReadCloser)

SetPayload sets the payload to the task logs o k response

func (*TaskLogsOK) WithPayload

func (o *TaskLogsOK) WithPayload(payload io.ReadCloser) *TaskLogsOK

WithPayload adds the payload to the task logs o k response

func (*TaskLogsOK) WriteResponse

func (o *TaskLogsOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type TaskLogsParams

type TaskLogsParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*Show task context and extra details provided to logs.
	  In: query
	  Default: false
	*/
	Details *bool
	/*Keep connection after returning logs.
	  In: query
	  Default: false
	*/
	Follow *bool
	/*ID of the task
	  Required: true
	  In: path
	*/
	ID string
	/*Only return logs since this time, as a UNIX timestamp
	  In: query
	  Default: 0
	*/
	Since *int64
	/*Return logs from `stderr`
	  In: query
	  Default: false
	*/
	Stderr *bool
	/*Return logs from `stdout`
	  In: query
	  Default: false
	*/
	Stdout *bool
	/*Only return this number of log lines from the end of the logs.
	Specify as an integer or `all` to output all log lines.

	  In: query
	  Default: "all"
	*/
	Tail *string
	/*Add timestamps to every log line
	  In: query
	  Default: false
	*/
	Timestamps *bool
}

TaskLogsParams contains all the bound params for the task logs operation typically these are obtained from a http.Request

swagger:parameters TaskLogs

func NewTaskLogsParams

func NewTaskLogsParams() TaskLogsParams

NewTaskLogsParams creates a new TaskLogsParams object with the default values initialized.

func (*TaskLogsParams) BindRequest

func (o *TaskLogsParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewTaskLogsParams() beforehand.

type TaskLogsServiceUnavailable

type TaskLogsServiceUnavailable struct {

	/*
	  In: Body
	*/
	Payload *models.ErrorResponse `json:"body,omitempty"`
}

TaskLogsServiceUnavailable node is not part of a swarm

swagger:response taskLogsServiceUnavailable

func NewTaskLogsServiceUnavailable

func NewTaskLogsServiceUnavailable() *TaskLogsServiceUnavailable

NewTaskLogsServiceUnavailable creates TaskLogsServiceUnavailable with default headers values

func (*TaskLogsServiceUnavailable) SetPayload

func (o *TaskLogsServiceUnavailable) SetPayload(payload *models.ErrorResponse)

SetPayload sets the payload to the task logs service unavailable response

func (*TaskLogsServiceUnavailable) WithPayload

WithPayload adds the payload to the task logs service unavailable response

func (*TaskLogsServiceUnavailable) WriteResponse

func (o *TaskLogsServiceUnavailable) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type TaskLogsURL

type TaskLogsURL struct {
	ID string

	Details    *bool
	Follow     *bool
	Since      *int64
	Stderr     *bool
	Stdout     *bool
	Tail       *string
	Timestamps *bool
	// contains filtered or unexported fields
}

TaskLogsURL generates an URL for the task logs operation

func (*TaskLogsURL) Build

func (o *TaskLogsURL) Build() (*url.URL, error)

Build a url path and query string

func (*TaskLogsURL) BuildFull

func (o *TaskLogsURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*TaskLogsURL) Must

func (o *TaskLogsURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*TaskLogsURL) SetBasePath

func (o *TaskLogsURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*TaskLogsURL) String

func (o *TaskLogsURL) String() string

String returns the string representation of the path with query string

func (*TaskLogsURL) StringFull

func (o *TaskLogsURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*TaskLogsURL) WithBasePath

func (o *TaskLogsURL) WithBasePath(bp string) *TaskLogsURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

Jump to

Keyboard shortcuts

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