deal

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: Apache-2.0, 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 deal API

func (*Client) PostDeal

func (a *Client) PostDeal(params *PostDealParams, opts ...ClientOption) (*PostDealOK, error)

PostDeal lists all deals

List all deals

func (*Client) PostSendDeal

func (a *Client) PostSendDeal(params *PostSendDealParams, opts ...ClientOption) (*PostSendDealOK, error)

PostSendDeal sends a manual deal proposal

Send a manual deal proposal

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 {
	PostDeal(params *PostDealParams, opts ...ClientOption) (*PostDealOK, error)

	PostSendDeal(params *PostSendDealParams, opts ...ClientOption) (*PostSendDealOK, 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 deal API client.

type PostDealBadRequest

type PostDealBadRequest struct {
	Payload *models.APIHTTPError
}

PostDealBadRequest describes a response with status code 400, with default header values.

Bad Request

func NewPostDealBadRequest

func NewPostDealBadRequest() *PostDealBadRequest

NewPostDealBadRequest creates a PostDealBadRequest with default headers values

func (*PostDealBadRequest) Code

func (o *PostDealBadRequest) Code() int

Code gets the status code for the post deal bad request response

func (*PostDealBadRequest) Error

func (o *PostDealBadRequest) Error() string

func (*PostDealBadRequest) GetPayload

func (o *PostDealBadRequest) GetPayload() *models.APIHTTPError

func (*PostDealBadRequest) IsClientError

func (o *PostDealBadRequest) IsClientError() bool

IsClientError returns true when this post deal bad request response has a 4xx status code

func (*PostDealBadRequest) IsCode

func (o *PostDealBadRequest) IsCode(code int) bool

IsCode returns true when this post deal bad request response a status code equal to that given

func (*PostDealBadRequest) IsRedirect

func (o *PostDealBadRequest) IsRedirect() bool

IsRedirect returns true when this post deal bad request response has a 3xx status code

func (*PostDealBadRequest) IsServerError

func (o *PostDealBadRequest) IsServerError() bool

IsServerError returns true when this post deal bad request response has a 5xx status code

func (*PostDealBadRequest) IsSuccess

func (o *PostDealBadRequest) IsSuccess() bool

IsSuccess returns true when this post deal bad request response has a 2xx status code

func (*PostDealBadRequest) String

func (o *PostDealBadRequest) String() string

type PostDealInternalServerError

type PostDealInternalServerError struct {
	Payload *models.APIHTTPError
}

PostDealInternalServerError describes a response with status code 500, with default header values.

Internal Server Error

func NewPostDealInternalServerError

func NewPostDealInternalServerError() *PostDealInternalServerError

NewPostDealInternalServerError creates a PostDealInternalServerError with default headers values

func (*PostDealInternalServerError) Code

func (o *PostDealInternalServerError) Code() int

Code gets the status code for the post deal internal server error response

func (*PostDealInternalServerError) Error

func (*PostDealInternalServerError) GetPayload

func (*PostDealInternalServerError) IsClientError

func (o *PostDealInternalServerError) IsClientError() bool

IsClientError returns true when this post deal internal server error response has a 4xx status code

func (*PostDealInternalServerError) IsCode

func (o *PostDealInternalServerError) IsCode(code int) bool

IsCode returns true when this post deal internal server error response a status code equal to that given

func (*PostDealInternalServerError) IsRedirect

func (o *PostDealInternalServerError) IsRedirect() bool

IsRedirect returns true when this post deal internal server error response has a 3xx status code

func (*PostDealInternalServerError) IsServerError

func (o *PostDealInternalServerError) IsServerError() bool

IsServerError returns true when this post deal internal server error response has a 5xx status code

func (*PostDealInternalServerError) IsSuccess

func (o *PostDealInternalServerError) IsSuccess() bool

IsSuccess returns true when this post deal internal server error response has a 2xx status code

func (*PostDealInternalServerError) String

func (o *PostDealInternalServerError) String() string

type PostDealOK

type PostDealOK struct {
	Payload []*models.ModelDeal
}

PostDealOK describes a response with status code 200, with default header values.

OK

func NewPostDealOK

func NewPostDealOK() *PostDealOK

NewPostDealOK creates a PostDealOK with default headers values

func (*PostDealOK) Code

func (o *PostDealOK) Code() int

Code gets the status code for the post deal o k response

func (*PostDealOK) Error

func (o *PostDealOK) Error() string

func (*PostDealOK) GetPayload

func (o *PostDealOK) GetPayload() []*models.ModelDeal

func (*PostDealOK) IsClientError

func (o *PostDealOK) IsClientError() bool

IsClientError returns true when this post deal o k response has a 4xx status code

func (*PostDealOK) IsCode

func (o *PostDealOK) IsCode(code int) bool

IsCode returns true when this post deal o k response a status code equal to that given

func (*PostDealOK) IsRedirect

func (o *PostDealOK) IsRedirect() bool

IsRedirect returns true when this post deal o k response has a 3xx status code

func (*PostDealOK) IsServerError

func (o *PostDealOK) IsServerError() bool

IsServerError returns true when this post deal o k response has a 5xx status code

func (*PostDealOK) IsSuccess

func (o *PostDealOK) IsSuccess() bool

IsSuccess returns true when this post deal o k response has a 2xx status code

func (*PostDealOK) String

func (o *PostDealOK) String() string

type PostDealParams

type PostDealParams struct {

	/* Request.

	   ListDealRequest
	*/
	Request *models.DealListDealRequest

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

PostDealParams contains all the parameters to send to the API endpoint

for the post deal operation.

Typically these are written to a http.Request.

func NewPostDealParams

func NewPostDealParams() *PostDealParams

NewPostDealParams creates a new PostDealParams 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 NewPostDealParamsWithContext

func NewPostDealParamsWithContext(ctx context.Context) *PostDealParams

NewPostDealParamsWithContext creates a new PostDealParams object with the ability to set a context for a request.

func NewPostDealParamsWithHTTPClient

func NewPostDealParamsWithHTTPClient(client *http.Client) *PostDealParams

NewPostDealParamsWithHTTPClient creates a new PostDealParams object with the ability to set a custom HTTPClient for a request.

func NewPostDealParamsWithTimeout

func NewPostDealParamsWithTimeout(timeout time.Duration) *PostDealParams

NewPostDealParamsWithTimeout creates a new PostDealParams object with the ability to set a timeout on a request.

func (*PostDealParams) SetContext

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

SetContext adds the context to the post deal params

func (*PostDealParams) SetDefaults

func (o *PostDealParams) SetDefaults()

SetDefaults hydrates default values in the post deal params (not the query body).

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

func (*PostDealParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the post deal params

func (*PostDealParams) SetRequest

func (o *PostDealParams) SetRequest(request *models.DealListDealRequest)

SetRequest adds the request to the post deal params

func (*PostDealParams) SetTimeout

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

SetTimeout adds the timeout to the post deal params

func (*PostDealParams) WithContext

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

WithContext adds the context to the post deal params

func (*PostDealParams) WithDefaults

func (o *PostDealParams) WithDefaults() *PostDealParams

WithDefaults hydrates default values in the post deal params (not the query body).

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

func (*PostDealParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the post deal params

func (*PostDealParams) WithRequest

func (o *PostDealParams) WithRequest(request *models.DealListDealRequest) *PostDealParams

WithRequest adds the request to the post deal params

func (*PostDealParams) WithTimeout

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

WithTimeout adds the timeout to the post deal params

func (*PostDealParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type PostDealReader

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

PostDealReader is a Reader for the PostDeal structure.

func (*PostDealReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type PostSendDealBadRequest

type PostSendDealBadRequest struct {
	Payload *models.APIHTTPError
}

PostSendDealBadRequest describes a response with status code 400, with default header values.

Bad Request

func NewPostSendDealBadRequest

func NewPostSendDealBadRequest() *PostSendDealBadRequest

NewPostSendDealBadRequest creates a PostSendDealBadRequest with default headers values

func (*PostSendDealBadRequest) Code

func (o *PostSendDealBadRequest) Code() int

Code gets the status code for the post send deal bad request response

func (*PostSendDealBadRequest) Error

func (o *PostSendDealBadRequest) Error() string

func (*PostSendDealBadRequest) GetPayload

func (o *PostSendDealBadRequest) GetPayload() *models.APIHTTPError

func (*PostSendDealBadRequest) IsClientError

func (o *PostSendDealBadRequest) IsClientError() bool

IsClientError returns true when this post send deal bad request response has a 4xx status code

func (*PostSendDealBadRequest) IsCode

func (o *PostSendDealBadRequest) IsCode(code int) bool

IsCode returns true when this post send deal bad request response a status code equal to that given

func (*PostSendDealBadRequest) IsRedirect

func (o *PostSendDealBadRequest) IsRedirect() bool

IsRedirect returns true when this post send deal bad request response has a 3xx status code

func (*PostSendDealBadRequest) IsServerError

func (o *PostSendDealBadRequest) IsServerError() bool

IsServerError returns true when this post send deal bad request response has a 5xx status code

func (*PostSendDealBadRequest) IsSuccess

func (o *PostSendDealBadRequest) IsSuccess() bool

IsSuccess returns true when this post send deal bad request response has a 2xx status code

func (*PostSendDealBadRequest) String

func (o *PostSendDealBadRequest) String() string

type PostSendDealInternalServerError

type PostSendDealInternalServerError struct {
	Payload *models.APIHTTPError
}

PostSendDealInternalServerError describes a response with status code 500, with default header values.

Internal Server Error

func NewPostSendDealInternalServerError

func NewPostSendDealInternalServerError() *PostSendDealInternalServerError

NewPostSendDealInternalServerError creates a PostSendDealInternalServerError with default headers values

func (*PostSendDealInternalServerError) Code

Code gets the status code for the post send deal internal server error response

func (*PostSendDealInternalServerError) Error

func (*PostSendDealInternalServerError) GetPayload

func (*PostSendDealInternalServerError) IsClientError

func (o *PostSendDealInternalServerError) IsClientError() bool

IsClientError returns true when this post send deal internal server error response has a 4xx status code

func (*PostSendDealInternalServerError) IsCode

func (o *PostSendDealInternalServerError) IsCode(code int) bool

IsCode returns true when this post send deal internal server error response a status code equal to that given

func (*PostSendDealInternalServerError) IsRedirect

func (o *PostSendDealInternalServerError) IsRedirect() bool

IsRedirect returns true when this post send deal internal server error response has a 3xx status code

func (*PostSendDealInternalServerError) IsServerError

func (o *PostSendDealInternalServerError) IsServerError() bool

IsServerError returns true when this post send deal internal server error response has a 5xx status code

func (*PostSendDealInternalServerError) IsSuccess

func (o *PostSendDealInternalServerError) IsSuccess() bool

IsSuccess returns true when this post send deal internal server error response has a 2xx status code

func (*PostSendDealInternalServerError) String

type PostSendDealOK

type PostSendDealOK struct {
	Payload *models.ModelDeal
}

PostSendDealOK describes a response with status code 200, with default header values.

OK

func NewPostSendDealOK

func NewPostSendDealOK() *PostSendDealOK

NewPostSendDealOK creates a PostSendDealOK with default headers values

func (*PostSendDealOK) Code

func (o *PostSendDealOK) Code() int

Code gets the status code for the post send deal o k response

func (*PostSendDealOK) Error

func (o *PostSendDealOK) Error() string

func (*PostSendDealOK) GetPayload

func (o *PostSendDealOK) GetPayload() *models.ModelDeal

func (*PostSendDealOK) IsClientError

func (o *PostSendDealOK) IsClientError() bool

IsClientError returns true when this post send deal o k response has a 4xx status code

func (*PostSendDealOK) IsCode

func (o *PostSendDealOK) IsCode(code int) bool

IsCode returns true when this post send deal o k response a status code equal to that given

func (*PostSendDealOK) IsRedirect

func (o *PostSendDealOK) IsRedirect() bool

IsRedirect returns true when this post send deal o k response has a 3xx status code

func (*PostSendDealOK) IsServerError

func (o *PostSendDealOK) IsServerError() bool

IsServerError returns true when this post send deal o k response has a 5xx status code

func (*PostSendDealOK) IsSuccess

func (o *PostSendDealOK) IsSuccess() bool

IsSuccess returns true when this post send deal o k response has a 2xx status code

func (*PostSendDealOK) String

func (o *PostSendDealOK) String() string

type PostSendDealParams

type PostSendDealParams struct {

	/* Proposal.

	   Proposal
	*/
	Proposal *models.DealProposal

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

PostSendDealParams contains all the parameters to send to the API endpoint

for the post send deal operation.

Typically these are written to a http.Request.

func NewPostSendDealParams

func NewPostSendDealParams() *PostSendDealParams

NewPostSendDealParams creates a new PostSendDealParams 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 NewPostSendDealParamsWithContext

func NewPostSendDealParamsWithContext(ctx context.Context) *PostSendDealParams

NewPostSendDealParamsWithContext creates a new PostSendDealParams object with the ability to set a context for a request.

func NewPostSendDealParamsWithHTTPClient

func NewPostSendDealParamsWithHTTPClient(client *http.Client) *PostSendDealParams

NewPostSendDealParamsWithHTTPClient creates a new PostSendDealParams object with the ability to set a custom HTTPClient for a request.

func NewPostSendDealParamsWithTimeout

func NewPostSendDealParamsWithTimeout(timeout time.Duration) *PostSendDealParams

NewPostSendDealParamsWithTimeout creates a new PostSendDealParams object with the ability to set a timeout on a request.

func (*PostSendDealParams) SetContext

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

SetContext adds the context to the post send deal params

func (*PostSendDealParams) SetDefaults

func (o *PostSendDealParams) SetDefaults()

SetDefaults hydrates default values in the post send deal params (not the query body).

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

func (*PostSendDealParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the post send deal params

func (*PostSendDealParams) SetProposal

func (o *PostSendDealParams) SetProposal(proposal *models.DealProposal)

SetProposal adds the proposal to the post send deal params

func (*PostSendDealParams) SetTimeout

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

SetTimeout adds the timeout to the post send deal params

func (*PostSendDealParams) WithContext

WithContext adds the context to the post send deal params

func (*PostSendDealParams) WithDefaults

func (o *PostSendDealParams) WithDefaults() *PostSendDealParams

WithDefaults hydrates default values in the post send deal params (not the query body).

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

func (*PostSendDealParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the post send deal params

func (*PostSendDealParams) WithProposal

func (o *PostSendDealParams) WithProposal(proposal *models.DealProposal) *PostSendDealParams

WithProposal adds the proposal to the post send deal params

func (*PostSendDealParams) WithTimeout

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

WithTimeout adds the timeout to the post send deal params

func (*PostSendDealParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type PostSendDealReader

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

PostSendDealReader is a Reader for the PostSendDeal structure.

func (*PostSendDealReader) ReadResponse

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