project

package
v0.0.0-...-acbd0ad Latest Latest
Warning

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

Go to latest
Published: May 8, 2022 License: MIT Imports: 11 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 project API

func (*Client) CreateProject

func (a *Client) CreateProject(params *CreateProjectParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateProjectCreated, error)

CreateProject Create Project

func (*Client) GetProject

func (a *Client) GetProject(params *GetProjectParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProjectOK, error)

GetProject Get Project

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 {
	CreateProject(params *CreateProjectParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateProjectCreated, error)

	GetProject(params *GetProjectParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetProjectOK, 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 project API client.

type CreateProjectConflict

type CreateProjectConflict struct {
	Payload *models.Error
}
CreateProjectConflict describes a response with status code 409, with default header values.

Create Project Failed, cause project exist

func NewCreateProjectConflict

func NewCreateProjectConflict() *CreateProjectConflict

NewCreateProjectConflict creates a CreateProjectConflict with default headers values

func (*CreateProjectConflict) Error

func (o *CreateProjectConflict) Error() string

func (*CreateProjectConflict) GetPayload

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

type CreateProjectCreated

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

Create Project Success, return project info.

func NewCreateProjectCreated

func NewCreateProjectCreated() *CreateProjectCreated

NewCreateProjectCreated creates a CreateProjectCreated with default headers values

func (*CreateProjectCreated) Error

func (o *CreateProjectCreated) Error() string

func (*CreateProjectCreated) GetPayload

func (o *CreateProjectCreated) GetPayload() *models.ProjectInfo

type CreateProjectInternalServerError

type CreateProjectInternalServerError struct {
	Payload *models.Error
}
CreateProjectInternalServerError describes a response with status code 500, with default header values.

Server Error

func NewCreateProjectInternalServerError

func NewCreateProjectInternalServerError() *CreateProjectInternalServerError

NewCreateProjectInternalServerError creates a CreateProjectInternalServerError with default headers values

func (*CreateProjectInternalServerError) Error

func (*CreateProjectInternalServerError) GetPayload

type CreateProjectParams

type CreateProjectParams struct {

	// Body.
	Body *models.ProjectInfo

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

CreateProjectParams contains all the parameters to send to the API endpoint

for the create project operation.

Typically these are written to a http.Request.

func NewCreateProjectParams

func NewCreateProjectParams() *CreateProjectParams

NewCreateProjectParams creates a new CreateProjectParams 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 NewCreateProjectParamsWithContext

func NewCreateProjectParamsWithContext(ctx context.Context) *CreateProjectParams

NewCreateProjectParamsWithContext creates a new CreateProjectParams object with the ability to set a context for a request.

func NewCreateProjectParamsWithHTTPClient

func NewCreateProjectParamsWithHTTPClient(client *http.Client) *CreateProjectParams

NewCreateProjectParamsWithHTTPClient creates a new CreateProjectParams object with the ability to set a custom HTTPClient for a request.

func NewCreateProjectParamsWithTimeout

func NewCreateProjectParamsWithTimeout(timeout time.Duration) *CreateProjectParams

NewCreateProjectParamsWithTimeout creates a new CreateProjectParams object with the ability to set a timeout on a request.

func (*CreateProjectParams) SetBody

func (o *CreateProjectParams) SetBody(body *models.ProjectInfo)

SetBody adds the body to the create project params

func (*CreateProjectParams) SetContext

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

SetContext adds the context to the create project params

func (*CreateProjectParams) SetDefaults

func (o *CreateProjectParams) SetDefaults()

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

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

func (*CreateProjectParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the create project params

func (*CreateProjectParams) SetTimeout

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

SetTimeout adds the timeout to the create project params

func (*CreateProjectParams) WithBody

WithBody adds the body to the create project params

func (*CreateProjectParams) WithContext

WithContext adds the context to the create project params

func (*CreateProjectParams) WithDefaults

func (o *CreateProjectParams) WithDefaults() *CreateProjectParams

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

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

func (*CreateProjectParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the create project params

func (*CreateProjectParams) WithTimeout

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

WithTimeout adds the timeout to the create project params

func (*CreateProjectParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type CreateProjectReader

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

CreateProjectReader is a Reader for the CreateProject structure.

func (*CreateProjectReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type GetProjectInternalServerError

type GetProjectInternalServerError struct {
	Payload *models.Error
}
GetProjectInternalServerError describes a response with status code 500, with default header values.

Server Error

func NewGetProjectInternalServerError

func NewGetProjectInternalServerError() *GetProjectInternalServerError

NewGetProjectInternalServerError creates a GetProjectInternalServerError with default headers values

func (*GetProjectInternalServerError) Error

func (*GetProjectInternalServerError) GetPayload

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

type GetProjectNotFound

type GetProjectNotFound struct {
	Payload *models.Error
}
GetProjectNotFound describes a response with status code 404, with default header values.

Get Project Failed, cause project not exist

func NewGetProjectNotFound

func NewGetProjectNotFound() *GetProjectNotFound

NewGetProjectNotFound creates a GetProjectNotFound with default headers values

func (*GetProjectNotFound) Error

func (o *GetProjectNotFound) Error() string

func (*GetProjectNotFound) GetPayload

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

type GetProjectOK

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

List All Projects Success, return project info. (project name, project id, project description)

func NewGetProjectOK

func NewGetProjectOK() *GetProjectOK

NewGetProjectOK creates a GetProjectOK with default headers values

func (*GetProjectOK) Error

func (o *GetProjectOK) Error() string

func (*GetProjectOK) GetPayload

func (o *GetProjectOK) GetPayload() *models.ProjectInfo

type GetProjectParams

type GetProjectParams struct {

	// ID.
	ID int64

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

GetProjectParams contains all the parameters to send to the API endpoint

for the get project operation.

Typically these are written to a http.Request.

func NewGetProjectParams

func NewGetProjectParams() *GetProjectParams

NewGetProjectParams creates a new GetProjectParams 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 NewGetProjectParamsWithContext

func NewGetProjectParamsWithContext(ctx context.Context) *GetProjectParams

NewGetProjectParamsWithContext creates a new GetProjectParams object with the ability to set a context for a request.

func NewGetProjectParamsWithHTTPClient

func NewGetProjectParamsWithHTTPClient(client *http.Client) *GetProjectParams

NewGetProjectParamsWithHTTPClient creates a new GetProjectParams object with the ability to set a custom HTTPClient for a request.

func NewGetProjectParamsWithTimeout

func NewGetProjectParamsWithTimeout(timeout time.Duration) *GetProjectParams

NewGetProjectParamsWithTimeout creates a new GetProjectParams object with the ability to set a timeout on a request.

func (*GetProjectParams) SetContext

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

SetContext adds the context to the get project params

func (*GetProjectParams) SetDefaults

func (o *GetProjectParams) SetDefaults()

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

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

func (*GetProjectParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get project params

func (*GetProjectParams) SetID

func (o *GetProjectParams) SetID(id int64)

SetID adds the id to the get project params

func (*GetProjectParams) SetTimeout

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

SetTimeout adds the timeout to the get project params

func (*GetProjectParams) WithContext

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

WithContext adds the context to the get project params

func (*GetProjectParams) WithDefaults

func (o *GetProjectParams) WithDefaults() *GetProjectParams

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

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

func (*GetProjectParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get project params

func (*GetProjectParams) WithID

func (o *GetProjectParams) WithID(id int64) *GetProjectParams

WithID adds the id to the get project params

func (*GetProjectParams) WithTimeout

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

WithTimeout adds the timeout to the get project params

func (*GetProjectParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetProjectReader

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

GetProjectReader is a Reader for the GetProject structure.

func (*GetProjectReader) ReadResponse

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