service

package
v0.0.0-...-00c4b02 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 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 AddTaskBadRequest

type AddTaskBadRequest struct {
}
AddTaskBadRequest describes a response with status code 400, with default header values.

bad request

func NewAddTaskBadRequest

func NewAddTaskBadRequest() *AddTaskBadRequest

NewAddTaskBadRequest creates a AddTaskBadRequest with default headers values

func (*AddTaskBadRequest) Error

func (o *AddTaskBadRequest) Error() string

type AddTaskCreated

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

task added

func NewAddTaskCreated

func NewAddTaskCreated() *AddTaskCreated

NewAddTaskCreated creates a AddTaskCreated with default headers values

func (*AddTaskCreated) Error

func (o *AddTaskCreated) Error() string

func (*AddTaskCreated) GetPayload

func (o *AddTaskCreated) GetPayload() *models.Task

type AddTaskInternalServerError

type AddTaskInternalServerError struct {
}
AddTaskInternalServerError describes a response with status code 500, with default header values.

internal server error

func NewAddTaskInternalServerError

func NewAddTaskInternalServerError() *AddTaskInternalServerError

NewAddTaskInternalServerError creates a AddTaskInternalServerError with default headers values

func (*AddTaskInternalServerError) Error

type AddTaskParams

type AddTaskParams struct {

	/* Task.

	   task model
	*/
	Task *models.Task

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

AddTaskParams contains all the parameters to send to the API endpoint

for the add task operation.

Typically these are written to a http.Request.

func NewAddTaskParams

func NewAddTaskParams() *AddTaskParams

NewAddTaskParams creates a new AddTaskParams 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 NewAddTaskParamsWithContext

func NewAddTaskParamsWithContext(ctx context.Context) *AddTaskParams

NewAddTaskParamsWithContext creates a new AddTaskParams object with the ability to set a context for a request.

func NewAddTaskParamsWithHTTPClient

func NewAddTaskParamsWithHTTPClient(client *http.Client) *AddTaskParams

NewAddTaskParamsWithHTTPClient creates a new AddTaskParams object with the ability to set a custom HTTPClient for a request.

func NewAddTaskParamsWithTimeout

func NewAddTaskParamsWithTimeout(timeout time.Duration) *AddTaskParams

NewAddTaskParamsWithTimeout creates a new AddTaskParams object with the ability to set a timeout on a request.

func (*AddTaskParams) SetContext

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

SetContext adds the context to the add task params

func (*AddTaskParams) SetDefaults

func (o *AddTaskParams) SetDefaults()

SetDefaults hydrates default values in the add task params (not the query body).

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

func (*AddTaskParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the add task params

func (*AddTaskParams) SetTask

func (o *AddTaskParams) SetTask(task *models.Task)

SetTask adds the task to the add task params

func (*AddTaskParams) SetTimeout

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

SetTimeout adds the timeout to the add task params

func (*AddTaskParams) WithContext

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

WithContext adds the context to the add task params

func (*AddTaskParams) WithDefaults

func (o *AddTaskParams) WithDefaults() *AddTaskParams

WithDefaults hydrates default values in the add task params (not the query body).

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

func (*AddTaskParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the add task params

func (*AddTaskParams) WithTask

func (o *AddTaskParams) WithTask(task *models.Task) *AddTaskParams

WithTask adds the task to the add task params

func (*AddTaskParams) WithTimeout

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

WithTimeout adds the timeout to the add task params

func (*AddTaskParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type AddTaskReader

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

AddTaskReader is a Reader for the AddTask structure.

func (*AddTaskReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type Client

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

Client for service API

func (*Client) AddTask

func (a *Client) AddTask(params *AddTaskParams, opts ...ClientOption) (*AddTaskCreated, error)

AddTask create task

func (*Client) DeleteTask

func (a *Client) DeleteTask(params *DeleteTaskParams, opts ...ClientOption) (*DeleteTaskOK, error)

DeleteTask delete task based on id

func (*Client) GetTaskByID

func (a *Client) GetTaskByID(params *GetTaskByIDParams, opts ...ClientOption) (*GetTaskByIDOK, error)

GetTaskByID retrieve task based on id

func (*Client) SetTransport

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

SetTransport changes the transport on the client

func (*Client) UpdateTask

func (a *Client) UpdateTask(params *UpdateTaskParams, opts ...ClientOption) (*UpdateTaskOK, error)

UpdateTask update task

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService

type ClientService interface {
	AddTask(params *AddTaskParams, opts ...ClientOption) (*AddTaskCreated, error)

	DeleteTask(params *DeleteTaskParams, opts ...ClientOption) (*DeleteTaskOK, error)

	GetTaskByID(params *GetTaskByIDParams, opts ...ClientOption) (*GetTaskByIDOK, error)

	UpdateTask(params *UpdateTaskParams, opts ...ClientOption) (*UpdateTaskOK, 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 DeleteTaskBadRequest

type DeleteTaskBadRequest struct {
}
DeleteTaskBadRequest describes a response with status code 400, with default header values.

bad request

func NewDeleteTaskBadRequest

func NewDeleteTaskBadRequest() *DeleteTaskBadRequest

NewDeleteTaskBadRequest creates a DeleteTaskBadRequest with default headers values

func (*DeleteTaskBadRequest) Error

func (o *DeleteTaskBadRequest) Error() string

type DeleteTaskInternalServerError

type DeleteTaskInternalServerError struct {
}
DeleteTaskInternalServerError describes a response with status code 500, with default header values.

internal server error

func NewDeleteTaskInternalServerError

func NewDeleteTaskInternalServerError() *DeleteTaskInternalServerError

NewDeleteTaskInternalServerError creates a DeleteTaskInternalServerError with default headers values

func (*DeleteTaskInternalServerError) Error

type DeleteTaskNotFound

type DeleteTaskNotFound struct {
}
DeleteTaskNotFound describes a response with status code 404, with default header values.

task not found

func NewDeleteTaskNotFound

func NewDeleteTaskNotFound() *DeleteTaskNotFound

NewDeleteTaskNotFound creates a DeleteTaskNotFound with default headers values

func (*DeleteTaskNotFound) Error

func (o *DeleteTaskNotFound) Error() string

type DeleteTaskOK

type DeleteTaskOK struct {
}
DeleteTaskOK describes a response with status code 200, with default header values.

task deleted

func NewDeleteTaskOK

func NewDeleteTaskOK() *DeleteTaskOK

NewDeleteTaskOK creates a DeleteTaskOK with default headers values

func (*DeleteTaskOK) Error

func (o *DeleteTaskOK) Error() string

type DeleteTaskParams

type DeleteTaskParams struct {

	/* ID.

	   id of task
	*/
	ID string

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

DeleteTaskParams contains all the parameters to send to the API endpoint

for the delete task operation.

Typically these are written to a http.Request.

func NewDeleteTaskParams

func NewDeleteTaskParams() *DeleteTaskParams

NewDeleteTaskParams creates a new DeleteTaskParams 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 NewDeleteTaskParamsWithContext

func NewDeleteTaskParamsWithContext(ctx context.Context) *DeleteTaskParams

NewDeleteTaskParamsWithContext creates a new DeleteTaskParams object with the ability to set a context for a request.

func NewDeleteTaskParamsWithHTTPClient

func NewDeleteTaskParamsWithHTTPClient(client *http.Client) *DeleteTaskParams

NewDeleteTaskParamsWithHTTPClient creates a new DeleteTaskParams object with the ability to set a custom HTTPClient for a request.

func NewDeleteTaskParamsWithTimeout

func NewDeleteTaskParamsWithTimeout(timeout time.Duration) *DeleteTaskParams

NewDeleteTaskParamsWithTimeout creates a new DeleteTaskParams object with the ability to set a timeout on a request.

func (*DeleteTaskParams) SetContext

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

SetContext adds the context to the delete task params

func (*DeleteTaskParams) SetDefaults

func (o *DeleteTaskParams) SetDefaults()

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

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

func (*DeleteTaskParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the delete task params

func (*DeleteTaskParams) SetID

func (o *DeleteTaskParams) SetID(id string)

SetID adds the id to the delete task params

func (*DeleteTaskParams) SetTimeout

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

SetTimeout adds the timeout to the delete task params

func (*DeleteTaskParams) WithContext

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

WithContext adds the context to the delete task params

func (*DeleteTaskParams) WithDefaults

func (o *DeleteTaskParams) WithDefaults() *DeleteTaskParams

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

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

func (*DeleteTaskParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the delete task params

func (*DeleteTaskParams) WithID

func (o *DeleteTaskParams) WithID(id string) *DeleteTaskParams

WithID adds the id to the delete task params

func (*DeleteTaskParams) WithTimeout

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

WithTimeout adds the timeout to the delete task params

func (*DeleteTaskParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type DeleteTaskReader

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

DeleteTaskReader is a Reader for the DeleteTask structure.

func (*DeleteTaskReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type GetTaskByIDInternalServerError

type GetTaskByIDInternalServerError struct {
}
GetTaskByIDInternalServerError describes a response with status code 500, with default header values.

internal server error

func NewGetTaskByIDInternalServerError

func NewGetTaskByIDInternalServerError() *GetTaskByIDInternalServerError

NewGetTaskByIDInternalServerError creates a GetTaskByIDInternalServerError with default headers values

func (*GetTaskByIDInternalServerError) Error

type GetTaskByIDNotFound

type GetTaskByIDNotFound struct {
}
GetTaskByIDNotFound describes a response with status code 404, with default header values.

task not found

func NewGetTaskByIDNotFound

func NewGetTaskByIDNotFound() *GetTaskByIDNotFound

NewGetTaskByIDNotFound creates a GetTaskByIDNotFound with default headers values

func (*GetTaskByIDNotFound) Error

func (o *GetTaskByIDNotFound) Error() string

type GetTaskByIDOK

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

task retrieved

func NewGetTaskByIDOK

func NewGetTaskByIDOK() *GetTaskByIDOK

NewGetTaskByIDOK creates a GetTaskByIDOK with default headers values

func (*GetTaskByIDOK) Error

func (o *GetTaskByIDOK) Error() string

func (*GetTaskByIDOK) GetPayload

func (o *GetTaskByIDOK) GetPayload() *models.Task

type GetTaskByIDParams

type GetTaskByIDParams struct {

	/* ID.

	   id of task
	*/
	ID string

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

GetTaskByIDParams contains all the parameters to send to the API endpoint

for the get task by ID operation.

Typically these are written to a http.Request.

func NewGetTaskByIDParams

func NewGetTaskByIDParams() *GetTaskByIDParams

NewGetTaskByIDParams creates a new GetTaskByIDParams 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 NewGetTaskByIDParamsWithContext

func NewGetTaskByIDParamsWithContext(ctx context.Context) *GetTaskByIDParams

NewGetTaskByIDParamsWithContext creates a new GetTaskByIDParams object with the ability to set a context for a request.

func NewGetTaskByIDParamsWithHTTPClient

func NewGetTaskByIDParamsWithHTTPClient(client *http.Client) *GetTaskByIDParams

NewGetTaskByIDParamsWithHTTPClient creates a new GetTaskByIDParams object with the ability to set a custom HTTPClient for a request.

func NewGetTaskByIDParamsWithTimeout

func NewGetTaskByIDParamsWithTimeout(timeout time.Duration) *GetTaskByIDParams

NewGetTaskByIDParamsWithTimeout creates a new GetTaskByIDParams object with the ability to set a timeout on a request.

func (*GetTaskByIDParams) SetContext

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

SetContext adds the context to the get task by ID params

func (*GetTaskByIDParams) SetDefaults

func (o *GetTaskByIDParams) SetDefaults()

SetDefaults hydrates default values in the get task by ID params (not the query body).

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

func (*GetTaskByIDParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get task by ID params

func (*GetTaskByIDParams) SetID

func (o *GetTaskByIDParams) SetID(id string)

SetID adds the id to the get task by ID params

func (*GetTaskByIDParams) SetTimeout

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

SetTimeout adds the timeout to the get task by ID params

func (*GetTaskByIDParams) WithContext

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

WithContext adds the context to the get task by ID params

func (*GetTaskByIDParams) WithDefaults

func (o *GetTaskByIDParams) WithDefaults() *GetTaskByIDParams

WithDefaults hydrates default values in the get task by ID params (not the query body).

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

func (*GetTaskByIDParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get task by ID params

func (*GetTaskByIDParams) WithID

WithID adds the id to the get task by ID params

func (*GetTaskByIDParams) WithTimeout

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

WithTimeout adds the timeout to the get task by ID params

func (*GetTaskByIDParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetTaskByIDReader

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

GetTaskByIDReader is a Reader for the GetTaskByID structure.

func (*GetTaskByIDReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type UpdateTaskBadRequest

type UpdateTaskBadRequest struct {
}
UpdateTaskBadRequest describes a response with status code 400, with default header values.

bad request

func NewUpdateTaskBadRequest

func NewUpdateTaskBadRequest() *UpdateTaskBadRequest

NewUpdateTaskBadRequest creates a UpdateTaskBadRequest with default headers values

func (*UpdateTaskBadRequest) Error

func (o *UpdateTaskBadRequest) Error() string

type UpdateTaskInternalServerError

type UpdateTaskInternalServerError struct {
}
UpdateTaskInternalServerError describes a response with status code 500, with default header values.

internal server error

func NewUpdateTaskInternalServerError

func NewUpdateTaskInternalServerError() *UpdateTaskInternalServerError

NewUpdateTaskInternalServerError creates a UpdateTaskInternalServerError with default headers values

func (*UpdateTaskInternalServerError) Error

type UpdateTaskNotFound

type UpdateTaskNotFound struct {
}
UpdateTaskNotFound describes a response with status code 404, with default header values.

Task not found

func NewUpdateTaskNotFound

func NewUpdateTaskNotFound() *UpdateTaskNotFound

NewUpdateTaskNotFound creates a UpdateTaskNotFound with default headers values

func (*UpdateTaskNotFound) Error

func (o *UpdateTaskNotFound) Error() string

type UpdateTaskOK

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

Task updated

func NewUpdateTaskOK

func NewUpdateTaskOK() *UpdateTaskOK

NewUpdateTaskOK creates a UpdateTaskOK with default headers values

func (*UpdateTaskOK) Error

func (o *UpdateTaskOK) Error() string

func (*UpdateTaskOK) GetPayload

func (o *UpdateTaskOK) GetPayload() *models.Task

type UpdateTaskParams

type UpdateTaskParams struct {

	/* Task.

	   task model
	*/
	Task *models.Task

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

UpdateTaskParams contains all the parameters to send to the API endpoint

for the update task operation.

Typically these are written to a http.Request.

func NewUpdateTaskParams

func NewUpdateTaskParams() *UpdateTaskParams

NewUpdateTaskParams creates a new UpdateTaskParams 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 NewUpdateTaskParamsWithContext

func NewUpdateTaskParamsWithContext(ctx context.Context) *UpdateTaskParams

NewUpdateTaskParamsWithContext creates a new UpdateTaskParams object with the ability to set a context for a request.

func NewUpdateTaskParamsWithHTTPClient

func NewUpdateTaskParamsWithHTTPClient(client *http.Client) *UpdateTaskParams

NewUpdateTaskParamsWithHTTPClient creates a new UpdateTaskParams object with the ability to set a custom HTTPClient for a request.

func NewUpdateTaskParamsWithTimeout

func NewUpdateTaskParamsWithTimeout(timeout time.Duration) *UpdateTaskParams

NewUpdateTaskParamsWithTimeout creates a new UpdateTaskParams object with the ability to set a timeout on a request.

func (*UpdateTaskParams) SetContext

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

SetContext adds the context to the update task params

func (*UpdateTaskParams) SetDefaults

func (o *UpdateTaskParams) SetDefaults()

SetDefaults hydrates default values in the update task params (not the query body).

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

func (*UpdateTaskParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the update task params

func (*UpdateTaskParams) SetTask

func (o *UpdateTaskParams) SetTask(task *models.Task)

SetTask adds the task to the update task params

func (*UpdateTaskParams) SetTimeout

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

SetTimeout adds the timeout to the update task params

func (*UpdateTaskParams) WithContext

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

WithContext adds the context to the update task params

func (*UpdateTaskParams) WithDefaults

func (o *UpdateTaskParams) WithDefaults() *UpdateTaskParams

WithDefaults hydrates default values in the update task params (not the query body).

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

func (*UpdateTaskParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the update task params

func (*UpdateTaskParams) WithTask

func (o *UpdateTaskParams) WithTask(task *models.Task) *UpdateTaskParams

WithTask adds the task to the update task params

func (*UpdateTaskParams) WithTimeout

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

WithTimeout adds the timeout to the update task params

func (*UpdateTaskParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type UpdateTaskReader

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

UpdateTaskReader is a Reader for the UpdateTask structure.

func (*UpdateTaskReader) ReadResponse

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