consensus

package
v0.0.0-...-a28b298 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApproveActivityOK

type ApproveActivityOK struct {
	Payload *models.ActivityResponse
}

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

A successful response.

func NewApproveActivityOK

func NewApproveActivityOK() *ApproveActivityOK

NewApproveActivityOK creates a ApproveActivityOK with default headers values

func (*ApproveActivityOK) Code

func (o *ApproveActivityOK) Code() int

Code gets the status code for the approve activity o k response

func (*ApproveActivityOK) Error

func (o *ApproveActivityOK) Error() string

func (*ApproveActivityOK) GetPayload

func (o *ApproveActivityOK) GetPayload() *models.ActivityResponse

func (*ApproveActivityOK) IsClientError

func (o *ApproveActivityOK) IsClientError() bool

IsClientError returns true when this approve activity o k response has a 4xx status code

func (*ApproveActivityOK) IsCode

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

IsCode returns true when this approve activity o k response a status code equal to that given

func (*ApproveActivityOK) IsRedirect

func (o *ApproveActivityOK) IsRedirect() bool

IsRedirect returns true when this approve activity o k response has a 3xx status code

func (*ApproveActivityOK) IsServerError

func (o *ApproveActivityOK) IsServerError() bool

IsServerError returns true when this approve activity o k response has a 5xx status code

func (*ApproveActivityOK) IsSuccess

func (o *ApproveActivityOK) IsSuccess() bool

IsSuccess returns true when this approve activity o k response has a 2xx status code

func (*ApproveActivityOK) String

func (o *ApproveActivityOK) String() string

type ApproveActivityParams

type ApproveActivityParams struct {

	// Body.
	Body *models.ApproveActivityRequest

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

ApproveActivityParams contains all the parameters to send to the API endpoint

for the approve activity operation.

Typically these are written to a http.Request.

func NewApproveActivityParams

func NewApproveActivityParams() *ApproveActivityParams

NewApproveActivityParams creates a new ApproveActivityParams 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 NewApproveActivityParamsWithContext

func NewApproveActivityParamsWithContext(ctx context.Context) *ApproveActivityParams

NewApproveActivityParamsWithContext creates a new ApproveActivityParams object with the ability to set a context for a request.

func NewApproveActivityParamsWithHTTPClient

func NewApproveActivityParamsWithHTTPClient(client *http.Client) *ApproveActivityParams

NewApproveActivityParamsWithHTTPClient creates a new ApproveActivityParams object with the ability to set a custom HTTPClient for a request.

func NewApproveActivityParamsWithTimeout

func NewApproveActivityParamsWithTimeout(timeout time.Duration) *ApproveActivityParams

NewApproveActivityParamsWithTimeout creates a new ApproveActivityParams object with the ability to set a timeout on a request.

func (*ApproveActivityParams) SetBody

SetBody adds the body to the approve activity params

func (*ApproveActivityParams) SetContext

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

SetContext adds the context to the approve activity params

func (*ApproveActivityParams) SetDefaults

func (o *ApproveActivityParams) SetDefaults()

SetDefaults hydrates default values in the approve activity params (not the query body).

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

func (*ApproveActivityParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the approve activity params

func (*ApproveActivityParams) SetTimeout

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

SetTimeout adds the timeout to the approve activity params

func (*ApproveActivityParams) WithBody

WithBody adds the body to the approve activity params

func (*ApproveActivityParams) WithContext

WithContext adds the context to the approve activity params

func (*ApproveActivityParams) WithDefaults

func (o *ApproveActivityParams) WithDefaults() *ApproveActivityParams

WithDefaults hydrates default values in the approve activity params (not the query body).

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

func (*ApproveActivityParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the approve activity params

func (*ApproveActivityParams) WithTimeout

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

WithTimeout adds the timeout to the approve activity params

func (*ApproveActivityParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type ApproveActivityReader

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

ApproveActivityReader is a Reader for the ApproveActivity structure.

func (*ApproveActivityReader) ReadResponse

func (o *ApproveActivityReader) 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 consensus API

func (*Client) ApproveActivity

func (a *Client) ApproveActivity(params *ApproveActivityParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ApproveActivityOK, error)

ApproveActivity approves activity

Approve an Activity

func (*Client) RejectActivity

func (a *Client) RejectActivity(params *RejectActivityParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RejectActivityOK, error)

RejectActivity rejects activity

Reject an Activity

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 {
	ApproveActivity(params *ApproveActivityParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*ApproveActivityOK, error)

	RejectActivity(params *RejectActivityParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*RejectActivityOK, 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 consensus API client.

type RejectActivityOK

type RejectActivityOK struct {
	Payload *models.ActivityResponse
}

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

A successful response.

func NewRejectActivityOK

func NewRejectActivityOK() *RejectActivityOK

NewRejectActivityOK creates a RejectActivityOK with default headers values

func (*RejectActivityOK) Code

func (o *RejectActivityOK) Code() int

Code gets the status code for the reject activity o k response

func (*RejectActivityOK) Error

func (o *RejectActivityOK) Error() string

func (*RejectActivityOK) GetPayload

func (o *RejectActivityOK) GetPayload() *models.ActivityResponse

func (*RejectActivityOK) IsClientError

func (o *RejectActivityOK) IsClientError() bool

IsClientError returns true when this reject activity o k response has a 4xx status code

func (*RejectActivityOK) IsCode

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

IsCode returns true when this reject activity o k response a status code equal to that given

func (*RejectActivityOK) IsRedirect

func (o *RejectActivityOK) IsRedirect() bool

IsRedirect returns true when this reject activity o k response has a 3xx status code

func (*RejectActivityOK) IsServerError

func (o *RejectActivityOK) IsServerError() bool

IsServerError returns true when this reject activity o k response has a 5xx status code

func (*RejectActivityOK) IsSuccess

func (o *RejectActivityOK) IsSuccess() bool

IsSuccess returns true when this reject activity o k response has a 2xx status code

func (*RejectActivityOK) String

func (o *RejectActivityOK) String() string

type RejectActivityParams

type RejectActivityParams struct {

	// Body.
	Body *models.RejectActivityRequest

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

RejectActivityParams contains all the parameters to send to the API endpoint

for the reject activity operation.

Typically these are written to a http.Request.

func NewRejectActivityParams

func NewRejectActivityParams() *RejectActivityParams

NewRejectActivityParams creates a new RejectActivityParams 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 NewRejectActivityParamsWithContext

func NewRejectActivityParamsWithContext(ctx context.Context) *RejectActivityParams

NewRejectActivityParamsWithContext creates a new RejectActivityParams object with the ability to set a context for a request.

func NewRejectActivityParamsWithHTTPClient

func NewRejectActivityParamsWithHTTPClient(client *http.Client) *RejectActivityParams

NewRejectActivityParamsWithHTTPClient creates a new RejectActivityParams object with the ability to set a custom HTTPClient for a request.

func NewRejectActivityParamsWithTimeout

func NewRejectActivityParamsWithTimeout(timeout time.Duration) *RejectActivityParams

NewRejectActivityParamsWithTimeout creates a new RejectActivityParams object with the ability to set a timeout on a request.

func (*RejectActivityParams) SetBody

SetBody adds the body to the reject activity params

func (*RejectActivityParams) SetContext

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

SetContext adds the context to the reject activity params

func (*RejectActivityParams) SetDefaults

func (o *RejectActivityParams) SetDefaults()

SetDefaults hydrates default values in the reject activity params (not the query body).

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

func (*RejectActivityParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the reject activity params

func (*RejectActivityParams) SetTimeout

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

SetTimeout adds the timeout to the reject activity params

func (*RejectActivityParams) WithBody

WithBody adds the body to the reject activity params

func (*RejectActivityParams) WithContext

WithContext adds the context to the reject activity params

func (*RejectActivityParams) WithDefaults

func (o *RejectActivityParams) WithDefaults() *RejectActivityParams

WithDefaults hydrates default values in the reject activity params (not the query body).

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

func (*RejectActivityParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the reject activity params

func (*RejectActivityParams) WithTimeout

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

WithTimeout adds the timeout to the reject activity params

func (*RejectActivityParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type RejectActivityReader

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

RejectActivityReader is a Reader for the RejectActivity structure.

func (*RejectActivityReader) ReadResponse

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