voting

package
v0.0.0-...-80b2b3e Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2021 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 Client

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

Client for voting API

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client

New creates a new voting API client.

func (*Client) GetCurrentVotingPeriod

func (a *Client) GetCurrentVotingPeriod(params *GetCurrentVotingPeriodParams) (*GetCurrentVotingPeriodOK, error)

GetCurrentVotingPeriod get current voting period API

func (*Client) GetVotingRolls

func (a *Client) GetVotingRolls(params *GetVotingRollsParams) (*GetVotingRollsOK, error)

GetVotingRolls get voting rolls API

func (*Client) SetTransport

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

SetTransport changes the transport on the client

type GetCurrentVotingPeriodInternalServerError

type GetCurrentVotingPeriodInternalServerError struct {
}

GetCurrentVotingPeriodInternalServerError handles this case with default header values.

Internal error

func NewGetCurrentVotingPeriodInternalServerError

func NewGetCurrentVotingPeriodInternalServerError() *GetCurrentVotingPeriodInternalServerError

NewGetCurrentVotingPeriodInternalServerError creates a GetCurrentVotingPeriodInternalServerError with default headers values

func (*GetCurrentVotingPeriodInternalServerError) Error

type GetCurrentVotingPeriodOK

type GetCurrentVotingPeriodOK struct {
	Payload string
}

GetCurrentVotingPeriodOK handles this case with default header values.

Endpoint for current period kind

func NewGetCurrentVotingPeriodOK

func NewGetCurrentVotingPeriodOK() *GetCurrentVotingPeriodOK

NewGetCurrentVotingPeriodOK creates a GetCurrentVotingPeriodOK with default headers values

func (*GetCurrentVotingPeriodOK) Error

func (o *GetCurrentVotingPeriodOK) Error() string

func (*GetCurrentVotingPeriodOK) GetPayload

func (o *GetCurrentVotingPeriodOK) GetPayload() string

type GetCurrentVotingPeriodParams

type GetCurrentVotingPeriodParams struct {

	/*Block*/
	Block string
	/*Network*/
	Network string

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

GetCurrentVotingPeriodParams contains all the parameters to send to the API endpoint for the get current voting period operation typically these are written to a http.Request

func NewGetCurrentVotingPeriodParams

func NewGetCurrentVotingPeriodParams() *GetCurrentVotingPeriodParams

NewGetCurrentVotingPeriodParams creates a new GetCurrentVotingPeriodParams object with the default values initialized.

func NewGetCurrentVotingPeriodParamsWithContext

func NewGetCurrentVotingPeriodParamsWithContext(ctx context.Context) *GetCurrentVotingPeriodParams

NewGetCurrentVotingPeriodParamsWithContext creates a new GetCurrentVotingPeriodParams object with the default values initialized, and the ability to set a context for a request

func NewGetCurrentVotingPeriodParamsWithHTTPClient

func NewGetCurrentVotingPeriodParamsWithHTTPClient(client *http.Client) *GetCurrentVotingPeriodParams

NewGetCurrentVotingPeriodParamsWithHTTPClient creates a new GetCurrentVotingPeriodParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewGetCurrentVotingPeriodParamsWithTimeout

func NewGetCurrentVotingPeriodParamsWithTimeout(timeout time.Duration) *GetCurrentVotingPeriodParams

NewGetCurrentVotingPeriodParamsWithTimeout creates a new GetCurrentVotingPeriodParams object with the default values initialized, and the ability to set a timeout on a request

func (*GetCurrentVotingPeriodParams) SetBlock

func (o *GetCurrentVotingPeriodParams) SetBlock(block string)

SetBlock adds the block to the get current voting period params

func (*GetCurrentVotingPeriodParams) SetContext

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

SetContext adds the context to the get current voting period params

func (*GetCurrentVotingPeriodParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get current voting period params

func (*GetCurrentVotingPeriodParams) SetNetwork

func (o *GetCurrentVotingPeriodParams) SetNetwork(network string)

SetNetwork adds the network to the get current voting period params

func (*GetCurrentVotingPeriodParams) SetTimeout

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

SetTimeout adds the timeout to the get current voting period params

func (*GetCurrentVotingPeriodParams) WithBlock

WithBlock adds the block to the get current voting period params

func (*GetCurrentVotingPeriodParams) WithContext

WithContext adds the context to the get current voting period params

func (*GetCurrentVotingPeriodParams) WithHTTPClient

WithHTTPClient adds the HTTPClient to the get current voting period params

func (*GetCurrentVotingPeriodParams) WithNetwork

WithNetwork adds the network to the get current voting period params

func (*GetCurrentVotingPeriodParams) WithTimeout

WithTimeout adds the timeout to the get current voting period params

func (*GetCurrentVotingPeriodParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type GetCurrentVotingPeriodReader

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

GetCurrentVotingPeriodReader is a Reader for the GetCurrentVotingPeriod structure.

func (*GetCurrentVotingPeriodReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type GetVotingRollsInternalServerError

type GetVotingRollsInternalServerError struct {
}

GetVotingRollsInternalServerError handles this case with default header values.

Internal error

func NewGetVotingRollsInternalServerError

func NewGetVotingRollsInternalServerError() *GetVotingRollsInternalServerError

NewGetVotingRollsInternalServerError creates a GetVotingRollsInternalServerError with default headers values

func (*GetVotingRollsInternalServerError) Error

type GetVotingRollsOK

type GetVotingRollsOK struct {
	Payload []*models.VotingRolls
}

GetVotingRollsOK handles this case with default header values.

Endpoint for voting rolls

func NewGetVotingRollsOK

func NewGetVotingRollsOK() *GetVotingRollsOK

NewGetVotingRollsOK creates a GetVotingRollsOK with default headers values

func (*GetVotingRollsOK) Error

func (o *GetVotingRollsOK) Error() string

func (*GetVotingRollsOK) GetPayload

func (o *GetVotingRollsOK) GetPayload() []*models.VotingRolls

type GetVotingRollsParams

type GetVotingRollsParams struct {

	/*Block*/
	Block string
	/*Network*/
	Network string

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

GetVotingRollsParams contains all the parameters to send to the API endpoint for the get voting rolls operation typically these are written to a http.Request

func NewGetVotingRollsParams

func NewGetVotingRollsParams() *GetVotingRollsParams

NewGetVotingRollsParams creates a new GetVotingRollsParams object with the default values initialized.

func NewGetVotingRollsParamsWithContext

func NewGetVotingRollsParamsWithContext(ctx context.Context) *GetVotingRollsParams

NewGetVotingRollsParamsWithContext creates a new GetVotingRollsParams object with the default values initialized, and the ability to set a context for a request

func NewGetVotingRollsParamsWithHTTPClient

func NewGetVotingRollsParamsWithHTTPClient(client *http.Client) *GetVotingRollsParams

NewGetVotingRollsParamsWithHTTPClient creates a new GetVotingRollsParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewGetVotingRollsParamsWithTimeout

func NewGetVotingRollsParamsWithTimeout(timeout time.Duration) *GetVotingRollsParams

NewGetVotingRollsParamsWithTimeout creates a new GetVotingRollsParams object with the default values initialized, and the ability to set a timeout on a request

func (*GetVotingRollsParams) SetBlock

func (o *GetVotingRollsParams) SetBlock(block string)

SetBlock adds the block to the get voting rolls params

func (*GetVotingRollsParams) SetContext

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

SetContext adds the context to the get voting rolls params

func (*GetVotingRollsParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get voting rolls params

func (*GetVotingRollsParams) SetNetwork

func (o *GetVotingRollsParams) SetNetwork(network string)

SetNetwork adds the network to the get voting rolls params

func (*GetVotingRollsParams) SetTimeout

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

SetTimeout adds the timeout to the get voting rolls params

func (*GetVotingRollsParams) WithBlock

func (o *GetVotingRollsParams) WithBlock(block string) *GetVotingRollsParams

WithBlock adds the block to the get voting rolls params

func (*GetVotingRollsParams) WithContext

WithContext adds the context to the get voting rolls params

func (*GetVotingRollsParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get voting rolls params

func (*GetVotingRollsParams) WithNetwork

func (o *GetVotingRollsParams) WithNetwork(network string) *GetVotingRollsParams

WithNetwork adds the network to the get voting rolls params

func (*GetVotingRollsParams) WithTimeout

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

WithTimeout adds the timeout to the get voting rolls params

func (*GetVotingRollsParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetVotingRollsReader

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

GetVotingRollsReader is a Reader for the GetVotingRolls structure.

func (*GetVotingRollsReader) ReadResponse

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