consensus

package
v0.5.9 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 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 consensus API

func (*Client) GetConsensus

func (a *Client) GetConsensus(params *GetConsensusParams, authInfo runtime.ClientAuthInfoWriter) (*GetConsensusOK, error)

GetConsensus returns information about the consensus set, such as the current block height.

func (*Client) PostConsensusValidateTransactionset

PostConsensusValidateTransactionset validates a set of transactions using the current utxo set.

func (*Client) SetTransport

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

SetTransport changes the transport on the client

type ClientService added in v0.5.9

type ClientService interface {
	GetConsensus(params *GetConsensusParams, authInfo runtime.ClientAuthInfoWriter) (*GetConsensusOK, error)

	PostConsensusValidateTransactionset(params *PostConsensusValidateTransactionsetParams, authInfo runtime.ClientAuthInfoWriter) (*PostConsensusValidateTransactionsetNoContent, 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 GetConsensusDefault

type GetConsensusDefault struct {
	Payload *models.StandardError
	// contains filtered or unexported fields
}
GetConsensusDefault describes a response with status code -1, with default header values.

Error Response

func NewGetConsensusDefault

func NewGetConsensusDefault(code int) *GetConsensusDefault

NewGetConsensusDefault creates a GetConsensusDefault with default headers values

func (*GetConsensusDefault) Code

func (o *GetConsensusDefault) Code() int

Code gets the status code for the get consensus default response

func (*GetConsensusDefault) Error

func (o *GetConsensusDefault) Error() string

func (*GetConsensusDefault) GetPayload added in v0.5.4

func (o *GetConsensusDefault) GetPayload() *models.StandardError

type GetConsensusOK

type GetConsensusOK struct {
	Payload *GetConsensusOKBody
}
GetConsensusOK describes a response with status code 200, with default header values.

Successful Response

func NewGetConsensusOK

func NewGetConsensusOK() *GetConsensusOK

NewGetConsensusOK creates a GetConsensusOK with default headers values

func (*GetConsensusOK) Error

func (o *GetConsensusOK) Error() string

func (*GetConsensusOK) GetPayload added in v0.5.4

func (o *GetConsensusOK) GetPayload() *GetConsensusOKBody

type GetConsensusOKBody

type GetConsensusOKBody struct {

	// currentblock
	Currentblock string `json:"currentblock,omitempty"`

	// Number of blocks preceding the current block.
	// Example: 62248
	Height int64 `json:"height,omitempty"`

	// True if the consensus set is synced with the network, i.e. it has downloaded the entire blockchain.
	Synced bool `json:"synced,omitempty"`
}

GetConsensusOKBody get consensus o k body swagger:model GetConsensusOKBody

func (*GetConsensusOKBody) ContextValidate added in v0.5.9

func (o *GetConsensusOKBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this get consensus o k body based on context it is used

func (*GetConsensusOKBody) MarshalBinary

func (o *GetConsensusOKBody) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*GetConsensusOKBody) UnmarshalBinary

func (o *GetConsensusOKBody) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*GetConsensusOKBody) Validate

func (o *GetConsensusOKBody) Validate(formats strfmt.Registry) error

Validate validates this get consensus o k body

type GetConsensusParams

type GetConsensusParams struct {
	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

GetConsensusParams contains all the parameters to send to the API endpoint

for the get consensus operation.

Typically these are written to a http.Request.

func NewGetConsensusParams

func NewGetConsensusParams() *GetConsensusParams

NewGetConsensusParams creates a new GetConsensusParams 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 NewGetConsensusParamsWithContext

func NewGetConsensusParamsWithContext(ctx context.Context) *GetConsensusParams

NewGetConsensusParamsWithContext creates a new GetConsensusParams object with the ability to set a context for a request.

func NewGetConsensusParamsWithHTTPClient

func NewGetConsensusParamsWithHTTPClient(client *http.Client) *GetConsensusParams

NewGetConsensusParamsWithHTTPClient creates a new GetConsensusParams object with the ability to set a custom HTTPClient for a request.

func NewGetConsensusParamsWithTimeout

func NewGetConsensusParamsWithTimeout(timeout time.Duration) *GetConsensusParams

NewGetConsensusParamsWithTimeout creates a new GetConsensusParams object with the ability to set a timeout on a request.

func (*GetConsensusParams) SetContext

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

SetContext adds the context to the get consensus params

func (*GetConsensusParams) SetDefaults added in v0.5.9

func (o *GetConsensusParams) SetDefaults()

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

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

func (*GetConsensusParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get consensus params

func (*GetConsensusParams) SetTimeout

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

SetTimeout adds the timeout to the get consensus params

func (*GetConsensusParams) WithContext

WithContext adds the context to the get consensus params

func (*GetConsensusParams) WithDefaults added in v0.5.9

func (o *GetConsensusParams) WithDefaults() *GetConsensusParams

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

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

func (*GetConsensusParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get consensus params

func (*GetConsensusParams) WithTimeout

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

WithTimeout adds the timeout to the get consensus params

func (*GetConsensusParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetConsensusReader

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

GetConsensusReader is a Reader for the GetConsensus structure.

func (*GetConsensusReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type PostConsensusValidateTransactionsetDefault

type PostConsensusValidateTransactionsetDefault struct {
	Payload *models.StandardError
	// contains filtered or unexported fields
}
PostConsensusValidateTransactionsetDefault describes a response with status code -1, with default header values.

Error Response

func NewPostConsensusValidateTransactionsetDefault

func NewPostConsensusValidateTransactionsetDefault(code int) *PostConsensusValidateTransactionsetDefault

NewPostConsensusValidateTransactionsetDefault creates a PostConsensusValidateTransactionsetDefault with default headers values

func (*PostConsensusValidateTransactionsetDefault) Code

Code gets the status code for the post consensus validate transactionset default response

func (*PostConsensusValidateTransactionsetDefault) Error

func (*PostConsensusValidateTransactionsetDefault) GetPayload added in v0.5.4

type PostConsensusValidateTransactionsetNoContent

type PostConsensusValidateTransactionsetNoContent struct {
}
PostConsensusValidateTransactionsetNoContent describes a response with status code 204, with default header values.

Successful Response

func NewPostConsensusValidateTransactionsetNoContent

func NewPostConsensusValidateTransactionsetNoContent() *PostConsensusValidateTransactionsetNoContent

NewPostConsensusValidateTransactionsetNoContent creates a PostConsensusValidateTransactionsetNoContent with default headers values

func (*PostConsensusValidateTransactionsetNoContent) Error

type PostConsensusValidateTransactionsetParams

type PostConsensusValidateTransactionsetParams struct {

	// Body.
	Body models.TransactionSet

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

PostConsensusValidateTransactionsetParams contains all the parameters to send to the API endpoint

for the post consensus validate transactionset operation.

Typically these are written to a http.Request.

func NewPostConsensusValidateTransactionsetParams

func NewPostConsensusValidateTransactionsetParams() *PostConsensusValidateTransactionsetParams

NewPostConsensusValidateTransactionsetParams creates a new PostConsensusValidateTransactionsetParams 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 NewPostConsensusValidateTransactionsetParamsWithContext

func NewPostConsensusValidateTransactionsetParamsWithContext(ctx context.Context) *PostConsensusValidateTransactionsetParams

NewPostConsensusValidateTransactionsetParamsWithContext creates a new PostConsensusValidateTransactionsetParams object with the ability to set a context for a request.

func NewPostConsensusValidateTransactionsetParamsWithHTTPClient

func NewPostConsensusValidateTransactionsetParamsWithHTTPClient(client *http.Client) *PostConsensusValidateTransactionsetParams

NewPostConsensusValidateTransactionsetParamsWithHTTPClient creates a new PostConsensusValidateTransactionsetParams object with the ability to set a custom HTTPClient for a request.

func NewPostConsensusValidateTransactionsetParamsWithTimeout

func NewPostConsensusValidateTransactionsetParamsWithTimeout(timeout time.Duration) *PostConsensusValidateTransactionsetParams

NewPostConsensusValidateTransactionsetParamsWithTimeout creates a new PostConsensusValidateTransactionsetParams object with the ability to set a timeout on a request.

func (*PostConsensusValidateTransactionsetParams) SetBody

SetBody adds the body to the post consensus validate transactionset params

func (*PostConsensusValidateTransactionsetParams) SetContext

SetContext adds the context to the post consensus validate transactionset params

func (*PostConsensusValidateTransactionsetParams) SetDefaults added in v0.5.9

SetDefaults hydrates default values in the post consensus validate transactionset params (not the query body).

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

func (*PostConsensusValidateTransactionsetParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the post consensus validate transactionset params

func (*PostConsensusValidateTransactionsetParams) SetTimeout

SetTimeout adds the timeout to the post consensus validate transactionset params

func (*PostConsensusValidateTransactionsetParams) WithBody

WithBody adds the body to the post consensus validate transactionset params

func (*PostConsensusValidateTransactionsetParams) WithContext

WithContext adds the context to the post consensus validate transactionset params

func (*PostConsensusValidateTransactionsetParams) WithDefaults added in v0.5.9

WithDefaults hydrates default values in the post consensus validate transactionset params (not the query body).

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

func (*PostConsensusValidateTransactionsetParams) WithHTTPClient

WithHTTPClient adds the HTTPClient to the post consensus validate transactionset params

func (*PostConsensusValidateTransactionsetParams) WithTimeout

WithTimeout adds the timeout to the post consensus validate transactionset params

func (*PostConsensusValidateTransactionsetParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type PostConsensusValidateTransactionsetReader

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

PostConsensusValidateTransactionsetReader is a Reader for the PostConsensusValidateTransactionset structure.

func (*PostConsensusValidateTransactionsetReader) ReadResponse

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