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: 12 Imported by: 0

Documentation

Index

Constants

View Source
const GetBallotsByPeriodIDNotFoundCode int = 404

GetBallotsByPeriodIDNotFoundCode is the HTTP code returned for type GetBallotsByPeriodIDNotFound

View Source
const GetBallotsByPeriodIDOKCode int = 200

GetBallotsByPeriodIDOKCode is the HTTP code returned for type GetBallotsByPeriodIDOK

View Source
const GetNonVotersByPeriodIDNotFoundCode int = 404

GetNonVotersByPeriodIDNotFoundCode is the HTTP code returned for type GetNonVotersByPeriodIDNotFound

View Source
const GetNonVotersByPeriodIDOKCode int = 200

GetNonVotersByPeriodIDOKCode is the HTTP code returned for type GetNonVotersByPeriodIDOK

View Source
const GetPeriodBadRequestCode int = 400

GetPeriodBadRequestCode is the HTTP code returned for type GetPeriodBadRequest

View Source
const GetPeriodNotFoundCode int = 404

GetPeriodNotFoundCode is the HTTP code returned for type GetPeriodNotFound

View Source
const GetPeriodOKCode int = 200

GetPeriodOKCode is the HTTP code returned for type GetPeriodOK

View Source
const GetPeriodsListBadRequestCode int = 400

GetPeriodsListBadRequestCode is the HTTP code returned for type GetPeriodsListBadRequest

View Source
const GetPeriodsListNotFoundCode int = 404

GetPeriodsListNotFoundCode is the HTTP code returned for type GetPeriodsListNotFound

View Source
const GetPeriodsListOKCode int = 200

GetPeriodsListOKCode is the HTTP code returned for type GetPeriodsListOK

View Source
const GetProposalVotesListNotFoundCode int = 404

GetProposalVotesListNotFoundCode is the HTTP code returned for type GetProposalVotesListNotFound

View Source
const GetProposalVotesListOKCode int = 200

GetProposalVotesListOKCode is the HTTP code returned for type GetProposalVotesListOK

View Source
const GetProposalsByPeriodIDNotFoundCode int = 404

GetProposalsByPeriodIDNotFoundCode is the HTTP code returned for type GetProposalsByPeriodIDNotFound

View Source
const GetProposalsByPeriodIDOKCode int = 200

GetProposalsByPeriodIDOKCode is the HTTP code returned for type GetProposalsByPeriodIDOK

View Source
const GetProtocolsListNotFoundCode int = 404

GetProtocolsListNotFoundCode is the HTTP code returned for type GetProtocolsListNotFound

View Source
const GetProtocolsListOKCode int = 200

GetProtocolsListOKCode is the HTTP code returned for type GetProtocolsListOK

Variables

This section is empty.

Functions

This section is empty.

Types

type GetBallotsByPeriodID

type GetBallotsByPeriodID struct {
	Context *middleware.Context
	Handler GetBallotsByPeriodIDHandler
}

GetBallotsByPeriodID swagger:route GET /v2/data/{network}/ballots/{id} Voting getBallotsByPeriodId

GetBallotsByPeriodID get ballots by period ID API

func NewGetBallotsByPeriodID

func NewGetBallotsByPeriodID(ctx *middleware.Context, handler GetBallotsByPeriodIDHandler) *GetBallotsByPeriodID

NewGetBallotsByPeriodID creates a new http.Handler for the get ballots by period ID operation

func (*GetBallotsByPeriodID) ServeHTTP

func (o *GetBallotsByPeriodID) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type GetBallotsByPeriodIDHandler

type GetBallotsByPeriodIDHandler interface {
	Handle(GetBallotsByPeriodIDParams) middleware.Responder
}

GetBallotsByPeriodIDHandler interface for that can handle valid get ballots by period ID params

type GetBallotsByPeriodIDHandlerFunc

type GetBallotsByPeriodIDHandlerFunc func(GetBallotsByPeriodIDParams) middleware.Responder

GetBallotsByPeriodIDHandlerFunc turns a function with the right signature into a get ballots by period ID handler

func (GetBallotsByPeriodIDHandlerFunc) Handle

Handle executing the request and returning a response

type GetBallotsByPeriodIDNotFound

type GetBallotsByPeriodIDNotFound struct {
}

GetBallotsByPeriodIDNotFound Not Found

swagger:response getBallotsByPeriodIdNotFound

func NewGetBallotsByPeriodIDNotFound

func NewGetBallotsByPeriodIDNotFound() *GetBallotsByPeriodIDNotFound

NewGetBallotsByPeriodIDNotFound creates GetBallotsByPeriodIDNotFound with default headers values

func (*GetBallotsByPeriodIDNotFound) WriteResponse

func (o *GetBallotsByPeriodIDNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetBallotsByPeriodIDOK

type GetBallotsByPeriodIDOK struct {
	/*The total number of data entries.

	 */
	XTotalCount int64 `json:"X-Total-Count"`

	/*
	  In: Body
	*/
	Payload []*models.BallotVoter `json:"body,omitempty"`
}

GetBallotsByPeriodIDOK Query compatibility endpoint for ballots

swagger:response getBallotsByPeriodIdOK

func NewGetBallotsByPeriodIDOK

func NewGetBallotsByPeriodIDOK() *GetBallotsByPeriodIDOK

NewGetBallotsByPeriodIDOK creates GetBallotsByPeriodIDOK with default headers values

func (*GetBallotsByPeriodIDOK) SetPayload

func (o *GetBallotsByPeriodIDOK) SetPayload(payload []*models.BallotVoter)

SetPayload sets the payload to the get ballots by period Id o k response

func (*GetBallotsByPeriodIDOK) SetXTotalCount

func (o *GetBallotsByPeriodIDOK) SetXTotalCount(xTotalCount int64)

SetXTotalCount sets the xTotalCount to the get ballots by period Id o k response

func (*GetBallotsByPeriodIDOK) WithPayload

WithPayload adds the payload to the get ballots by period Id o k response

func (*GetBallotsByPeriodIDOK) WithXTotalCount

func (o *GetBallotsByPeriodIDOK) WithXTotalCount(xTotalCount int64) *GetBallotsByPeriodIDOK

WithXTotalCount adds the xTotalCount to the get ballots by period Id o k response

func (*GetBallotsByPeriodIDOK) WriteResponse

func (o *GetBallotsByPeriodIDOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetBallotsByPeriodIDParams

type GetBallotsByPeriodIDParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*
	  Required: true
	  In: path
	*/
	ID string
	/*
	  Maximum: 300
	  Minimum: 1
	  In: query
	  Default: 20
	*/
	Limit *int64
	/*
	  Required: true
	  In: path
	*/
	Network string
	/*
	  Minimum: 0
	  In: query
	  Default: 0
	*/
	Offset *int64
}

GetBallotsByPeriodIDParams contains all the bound params for the get ballots by period ID operation typically these are obtained from a http.Request

swagger:parameters getBallotsByPeriodID

func NewGetBallotsByPeriodIDParams

func NewGetBallotsByPeriodIDParams() GetBallotsByPeriodIDParams

NewGetBallotsByPeriodIDParams creates a new GetBallotsByPeriodIDParams object with the default values initialized.

func (*GetBallotsByPeriodIDParams) BindRequest

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewGetBallotsByPeriodIDParams() beforehand.

type GetBallotsByPeriodIDURL

type GetBallotsByPeriodIDURL struct {
	ID      string
	Network string

	Limit  *int64
	Offset *int64
	// contains filtered or unexported fields
}

GetBallotsByPeriodIDURL generates an URL for the get ballots by period ID operation

func (*GetBallotsByPeriodIDURL) Build

func (o *GetBallotsByPeriodIDURL) Build() (*url.URL, error)

Build a url path and query string

func (*GetBallotsByPeriodIDURL) BuildFull

func (o *GetBallotsByPeriodIDURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*GetBallotsByPeriodIDURL) Must

func (o *GetBallotsByPeriodIDURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*GetBallotsByPeriodIDURL) SetBasePath

func (o *GetBallotsByPeriodIDURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*GetBallotsByPeriodIDURL) String

func (o *GetBallotsByPeriodIDURL) String() string

String returns the string representation of the path with query string

func (*GetBallotsByPeriodIDURL) StringFull

func (o *GetBallotsByPeriodIDURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*GetBallotsByPeriodIDURL) WithBasePath

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type GetNonVotersByPeriodID

type GetNonVotersByPeriodID struct {
	Context *middleware.Context
	Handler GetNonVotersByPeriodIDHandler
}

GetNonVotersByPeriodID swagger:route GET /v2/data/{network}/non_voters/{id} Voting getNonVotersByPeriodId

GetNonVotersByPeriodID get non voters by period ID API

func NewGetNonVotersByPeriodID

func NewGetNonVotersByPeriodID(ctx *middleware.Context, handler GetNonVotersByPeriodIDHandler) *GetNonVotersByPeriodID

NewGetNonVotersByPeriodID creates a new http.Handler for the get non voters by period ID operation

func (*GetNonVotersByPeriodID) ServeHTTP

func (o *GetNonVotersByPeriodID) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type GetNonVotersByPeriodIDHandler

type GetNonVotersByPeriodIDHandler interface {
	Handle(GetNonVotersByPeriodIDParams) middleware.Responder
}

GetNonVotersByPeriodIDHandler interface for that can handle valid get non voters by period ID params

type GetNonVotersByPeriodIDHandlerFunc

type GetNonVotersByPeriodIDHandlerFunc func(GetNonVotersByPeriodIDParams) middleware.Responder

GetNonVotersByPeriodIDHandlerFunc turns a function with the right signature into a get non voters by period ID handler

func (GetNonVotersByPeriodIDHandlerFunc) Handle

Handle executing the request and returning a response

type GetNonVotersByPeriodIDNotFound

type GetNonVotersByPeriodIDNotFound struct {
}

GetNonVotersByPeriodIDNotFound Not Found

swagger:response getNonVotersByPeriodIdNotFound

func NewGetNonVotersByPeriodIDNotFound

func NewGetNonVotersByPeriodIDNotFound() *GetNonVotersByPeriodIDNotFound

NewGetNonVotersByPeriodIDNotFound creates GetNonVotersByPeriodIDNotFound with default headers values

func (*GetNonVotersByPeriodIDNotFound) WriteResponse

func (o *GetNonVotersByPeriodIDNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetNonVotersByPeriodIDOK

type GetNonVotersByPeriodIDOK struct {
	/*The total number of data entries.

	 */
	XTotalCount int64 `json:"X-Total-Count"`

	/*
	  In: Body
	*/
	Payload []*models.NonVoter `json:"body,omitempty"`
}

GetNonVotersByPeriodIDOK Query compatibility endpoint for ballots

swagger:response getNonVotersByPeriodIdOK

func NewGetNonVotersByPeriodIDOK

func NewGetNonVotersByPeriodIDOK() *GetNonVotersByPeriodIDOK

NewGetNonVotersByPeriodIDOK creates GetNonVotersByPeriodIDOK with default headers values

func (*GetNonVotersByPeriodIDOK) SetPayload

func (o *GetNonVotersByPeriodIDOK) SetPayload(payload []*models.NonVoter)

SetPayload sets the payload to the get non voters by period Id o k response

func (*GetNonVotersByPeriodIDOK) SetXTotalCount

func (o *GetNonVotersByPeriodIDOK) SetXTotalCount(xTotalCount int64)

SetXTotalCount sets the xTotalCount to the get non voters by period Id o k response

func (*GetNonVotersByPeriodIDOK) WithPayload

WithPayload adds the payload to the get non voters by period Id o k response

func (*GetNonVotersByPeriodIDOK) WithXTotalCount

func (o *GetNonVotersByPeriodIDOK) WithXTotalCount(xTotalCount int64) *GetNonVotersByPeriodIDOK

WithXTotalCount adds the xTotalCount to the get non voters by period Id o k response

func (*GetNonVotersByPeriodIDOK) WriteResponse

func (o *GetNonVotersByPeriodIDOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetNonVotersByPeriodIDParams

type GetNonVotersByPeriodIDParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*
	  Required: true
	  In: path
	*/
	ID string
	/*
	  Maximum: 300
	  Minimum: 1
	  In: query
	  Default: 20
	*/
	Limit *int64
	/*
	  Required: true
	  In: path
	*/
	Network string
	/*
	  Minimum: 0
	  In: query
	  Default: 0
	*/
	Offset *int64
}

GetNonVotersByPeriodIDParams contains all the bound params for the get non voters by period ID operation typically these are obtained from a http.Request

swagger:parameters getNonVotersByPeriodID

func NewGetNonVotersByPeriodIDParams

func NewGetNonVotersByPeriodIDParams() GetNonVotersByPeriodIDParams

NewGetNonVotersByPeriodIDParams creates a new GetNonVotersByPeriodIDParams object with the default values initialized.

func (*GetNonVotersByPeriodIDParams) BindRequest

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewGetNonVotersByPeriodIDParams() beforehand.

type GetNonVotersByPeriodIDURL

type GetNonVotersByPeriodIDURL struct {
	ID      string
	Network string

	Limit  *int64
	Offset *int64
	// contains filtered or unexported fields
}

GetNonVotersByPeriodIDURL generates an URL for the get non voters by period ID operation

func (*GetNonVotersByPeriodIDURL) Build

func (o *GetNonVotersByPeriodIDURL) Build() (*url.URL, error)

Build a url path and query string

func (*GetNonVotersByPeriodIDURL) BuildFull

func (o *GetNonVotersByPeriodIDURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*GetNonVotersByPeriodIDURL) Must

func (o *GetNonVotersByPeriodIDURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*GetNonVotersByPeriodIDURL) SetBasePath

func (o *GetNonVotersByPeriodIDURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*GetNonVotersByPeriodIDURL) String

func (o *GetNonVotersByPeriodIDURL) String() string

String returns the string representation of the path with query string

func (*GetNonVotersByPeriodIDURL) StringFull

func (o *GetNonVotersByPeriodIDURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*GetNonVotersByPeriodIDURL) WithBasePath

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type GetPeriod

type GetPeriod struct {
	Context *middleware.Context
	Handler GetPeriodHandler
}

GetPeriod swagger:route GET /v2/data/{network}/period Voting getPeriod

GetPeriod get period API

func NewGetPeriod

func NewGetPeriod(ctx *middleware.Context, handler GetPeriodHandler) *GetPeriod

NewGetPeriod creates a new http.Handler for the get period operation

func (*GetPeriod) ServeHTTP

func (o *GetPeriod) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type GetPeriodBadRequest

type GetPeriodBadRequest struct {
}

GetPeriodBadRequest Bad request

swagger:response getPeriodBadRequest

func NewGetPeriodBadRequest

func NewGetPeriodBadRequest() *GetPeriodBadRequest

NewGetPeriodBadRequest creates GetPeriodBadRequest with default headers values

func (*GetPeriodBadRequest) WriteResponse

func (o *GetPeriodBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetPeriodHandler

type GetPeriodHandler interface {
	Handle(GetPeriodParams) middleware.Responder
}

GetPeriodHandler interface for that can handle valid get period params

type GetPeriodHandlerFunc

type GetPeriodHandlerFunc func(GetPeriodParams) middleware.Responder

GetPeriodHandlerFunc turns a function with the right signature into a get period handler

func (GetPeriodHandlerFunc) Handle

Handle executing the request and returning a response

type GetPeriodNotFound

type GetPeriodNotFound struct {
}

GetPeriodNotFound Not Found

swagger:response getPeriodNotFound

func NewGetPeriodNotFound

func NewGetPeriodNotFound() *GetPeriodNotFound

NewGetPeriodNotFound creates GetPeriodNotFound with default headers values

func (*GetPeriodNotFound) WriteResponse

func (o *GetPeriodNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetPeriodOK

type GetPeriodOK struct {

	/*
	  In: Body
	*/
	Payload *models.PeriodInfo `json:"body,omitempty"`
}

GetPeriodOK Query compatibility endpoint for periods

swagger:response getPeriodOK

func NewGetPeriodOK

func NewGetPeriodOK() *GetPeriodOK

NewGetPeriodOK creates GetPeriodOK with default headers values

func (*GetPeriodOK) SetPayload

func (o *GetPeriodOK) SetPayload(payload *models.PeriodInfo)

SetPayload sets the payload to the get period o k response

func (*GetPeriodOK) WithPayload

func (o *GetPeriodOK) WithPayload(payload *models.PeriodInfo) *GetPeriodOK

WithPayload adds the payload to the get period o k response

func (*GetPeriodOK) WriteResponse

func (o *GetPeriodOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetPeriodParams

type GetPeriodParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*
	  In: query
	*/
	ID *string
	/*
	  Required: true
	  In: path
	*/
	Network string
}

GetPeriodParams contains all the bound params for the get period operation typically these are obtained from a http.Request

swagger:parameters getPeriod

func NewGetPeriodParams

func NewGetPeriodParams() GetPeriodParams

NewGetPeriodParams creates a new GetPeriodParams object no default values defined in spec.

func (*GetPeriodParams) BindRequest

func (o *GetPeriodParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewGetPeriodParams() beforehand.

type GetPeriodURL

type GetPeriodURL struct {
	Network string

	ID *string
	// contains filtered or unexported fields
}

GetPeriodURL generates an URL for the get period operation

func (*GetPeriodURL) Build

func (o *GetPeriodURL) Build() (*url.URL, error)

Build a url path and query string

func (*GetPeriodURL) BuildFull

func (o *GetPeriodURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*GetPeriodURL) Must

func (o *GetPeriodURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*GetPeriodURL) SetBasePath

func (o *GetPeriodURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*GetPeriodURL) String

func (o *GetPeriodURL) String() string

String returns the string representation of the path with query string

func (*GetPeriodURL) StringFull

func (o *GetPeriodURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*GetPeriodURL) WithBasePath

func (o *GetPeriodURL) WithBasePath(bp string) *GetPeriodURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type GetPeriodsList

type GetPeriodsList struct {
	Context *middleware.Context
	Handler GetPeriodsListHandler
}

GetPeriodsList swagger:route GET /v2/data/{network}/periods Voting getPeriodsList

GetPeriodsList get periods list API

func NewGetPeriodsList

func NewGetPeriodsList(ctx *middleware.Context, handler GetPeriodsListHandler) *GetPeriodsList

NewGetPeriodsList creates a new http.Handler for the get periods list operation

func (*GetPeriodsList) ServeHTTP

func (o *GetPeriodsList) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type GetPeriodsListBadRequest

type GetPeriodsListBadRequest struct {
}

GetPeriodsListBadRequest Bad request

swagger:response getPeriodsListBadRequest

func NewGetPeriodsListBadRequest

func NewGetPeriodsListBadRequest() *GetPeriodsListBadRequest

NewGetPeriodsListBadRequest creates GetPeriodsListBadRequest with default headers values

func (*GetPeriodsListBadRequest) WriteResponse

func (o *GetPeriodsListBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetPeriodsListHandler

type GetPeriodsListHandler interface {
	Handle(GetPeriodsListParams) middleware.Responder
}

GetPeriodsListHandler interface for that can handle valid get periods list params

type GetPeriodsListHandlerFunc

type GetPeriodsListHandlerFunc func(GetPeriodsListParams) middleware.Responder

GetPeriodsListHandlerFunc turns a function with the right signature into a get periods list handler

func (GetPeriodsListHandlerFunc) Handle

Handle executing the request and returning a response

type GetPeriodsListNotFound

type GetPeriodsListNotFound struct {
}

GetPeriodsListNotFound Not Found

swagger:response getPeriodsListNotFound

func NewGetPeriodsListNotFound

func NewGetPeriodsListNotFound() *GetPeriodsListNotFound

NewGetPeriodsListNotFound creates GetPeriodsListNotFound with default headers values

func (*GetPeriodsListNotFound) WriteResponse

func (o *GetPeriodsListNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetPeriodsListOK

type GetPeriodsListOK struct {

	/*
	  In: Body
	*/
	Payload []*models.Period `json:"body,omitempty"`
}

GetPeriodsListOK Query compatibility endpoint for periods

swagger:response getPeriodsListOK

func NewGetPeriodsListOK

func NewGetPeriodsListOK() *GetPeriodsListOK

NewGetPeriodsListOK creates GetPeriodsListOK with default headers values

func (*GetPeriodsListOK) SetPayload

func (o *GetPeriodsListOK) SetPayload(payload []*models.Period)

SetPayload sets the payload to the get periods list o k response

func (*GetPeriodsListOK) WithPayload

func (o *GetPeriodsListOK) WithPayload(payload []*models.Period) *GetPeriodsListOK

WithPayload adds the payload to the get periods list o k response

func (*GetPeriodsListOK) WriteResponse

func (o *GetPeriodsListOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetPeriodsListParams

type GetPeriodsListParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*
	  Required: true
	  In: path
	*/
	Network string
}

GetPeriodsListParams contains all the bound params for the get periods list operation typically these are obtained from a http.Request

swagger:parameters getPeriodsList

func NewGetPeriodsListParams

func NewGetPeriodsListParams() GetPeriodsListParams

NewGetPeriodsListParams creates a new GetPeriodsListParams object no default values defined in spec.

func (*GetPeriodsListParams) BindRequest

func (o *GetPeriodsListParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewGetPeriodsListParams() beforehand.

type GetPeriodsListURL

type GetPeriodsListURL struct {
	Network string
	// contains filtered or unexported fields
}

GetPeriodsListURL generates an URL for the get periods list operation

func (*GetPeriodsListURL) Build

func (o *GetPeriodsListURL) Build() (*url.URL, error)

Build a url path and query string

func (*GetPeriodsListURL) BuildFull

func (o *GetPeriodsListURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*GetPeriodsListURL) Must

func (o *GetPeriodsListURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*GetPeriodsListURL) SetBasePath

func (o *GetPeriodsListURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*GetPeriodsListURL) String

func (o *GetPeriodsListURL) String() string

String returns the string representation of the path with query string

func (*GetPeriodsListURL) StringFull

func (o *GetPeriodsListURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*GetPeriodsListURL) WithBasePath

func (o *GetPeriodsListURL) WithBasePath(bp string) *GetPeriodsListURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type GetProposalVotesList

type GetProposalVotesList struct {
	Context *middleware.Context
	Handler GetProposalVotesListHandler
}

GetProposalVotesList swagger:route GET /v2/data/{network}/proposal_votes/{id} Voting getProposalVotesList

GetProposalVotesList get proposal votes list API

func NewGetProposalVotesList

func NewGetProposalVotesList(ctx *middleware.Context, handler GetProposalVotesListHandler) *GetProposalVotesList

NewGetProposalVotesList creates a new http.Handler for the get proposal votes list operation

func (*GetProposalVotesList) ServeHTTP

func (o *GetProposalVotesList) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type GetProposalVotesListHandler

type GetProposalVotesListHandler interface {
	Handle(GetProposalVotesListParams) middleware.Responder
}

GetProposalVotesListHandler interface for that can handle valid get proposal votes list params

type GetProposalVotesListHandlerFunc

type GetProposalVotesListHandlerFunc func(GetProposalVotesListParams) middleware.Responder

GetProposalVotesListHandlerFunc turns a function with the right signature into a get proposal votes list handler

func (GetProposalVotesListHandlerFunc) Handle

Handle executing the request and returning a response

type GetProposalVotesListNotFound

type GetProposalVotesListNotFound struct {
}

GetProposalVotesListNotFound Not Found

swagger:response getProposalVotesListNotFound

func NewGetProposalVotesListNotFound

func NewGetProposalVotesListNotFound() *GetProposalVotesListNotFound

NewGetProposalVotesListNotFound creates GetProposalVotesListNotFound with default headers values

func (*GetProposalVotesListNotFound) WriteResponse

func (o *GetProposalVotesListNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetProposalVotesListOK

type GetProposalVotesListOK struct {
	/*The total number of data entries.

	 */
	XTotalCount int64 `json:"X-Total-Count"`

	/*
	  In: Body
	*/
	Payload []*models.ProposalVoter `json:"body,omitempty"`
}

GetProposalVotesListOK Query compatibility endpoint for proposal votes

swagger:response getProposalVotesListOK

func NewGetProposalVotesListOK

func NewGetProposalVotesListOK() *GetProposalVotesListOK

NewGetProposalVotesListOK creates GetProposalVotesListOK with default headers values

func (*GetProposalVotesListOK) SetPayload

func (o *GetProposalVotesListOK) SetPayload(payload []*models.ProposalVoter)

SetPayload sets the payload to the get proposal votes list o k response

func (*GetProposalVotesListOK) SetXTotalCount

func (o *GetProposalVotesListOK) SetXTotalCount(xTotalCount int64)

SetXTotalCount sets the xTotalCount to the get proposal votes list o k response

func (*GetProposalVotesListOK) WithPayload

WithPayload adds the payload to the get proposal votes list o k response

func (*GetProposalVotesListOK) WithXTotalCount

func (o *GetProposalVotesListOK) WithXTotalCount(xTotalCount int64) *GetProposalVotesListOK

WithXTotalCount adds the xTotalCount to the get proposal votes list o k response

func (*GetProposalVotesListOK) WriteResponse

func (o *GetProposalVotesListOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetProposalVotesListParams

type GetProposalVotesListParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*
	  Required: true
	  In: path
	*/
	ID string
	/*
	  Maximum: 300
	  Minimum: 1
	  In: query
	  Default: 20
	*/
	Limit *int64
	/*
	  Required: true
	  In: path
	*/
	Network string
	/*
	  Minimum: 0
	  In: query
	  Default: 0
	*/
	Offset *int64
}

GetProposalVotesListParams contains all the bound params for the get proposal votes list operation typically these are obtained from a http.Request

swagger:parameters getProposalVotesList

func NewGetProposalVotesListParams

func NewGetProposalVotesListParams() GetProposalVotesListParams

NewGetProposalVotesListParams creates a new GetProposalVotesListParams object with the default values initialized.

func (*GetProposalVotesListParams) BindRequest

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewGetProposalVotesListParams() beforehand.

type GetProposalVotesListURL

type GetProposalVotesListURL struct {
	ID      string
	Network string

	Limit  *int64
	Offset *int64
	// contains filtered or unexported fields
}

GetProposalVotesListURL generates an URL for the get proposal votes list operation

func (*GetProposalVotesListURL) Build

func (o *GetProposalVotesListURL) Build() (*url.URL, error)

Build a url path and query string

func (*GetProposalVotesListURL) BuildFull

func (o *GetProposalVotesListURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*GetProposalVotesListURL) Must

func (o *GetProposalVotesListURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*GetProposalVotesListURL) SetBasePath

func (o *GetProposalVotesListURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*GetProposalVotesListURL) String

func (o *GetProposalVotesListURL) String() string

String returns the string representation of the path with query string

func (*GetProposalVotesListURL) StringFull

func (o *GetProposalVotesListURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*GetProposalVotesListURL) WithBasePath

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type GetProposalsByPeriodID

type GetProposalsByPeriodID struct {
	Context *middleware.Context
	Handler GetProposalsByPeriodIDHandler
}

GetProposalsByPeriodID swagger:route GET /v2/data/{network}/proposals Voting getProposalsByPeriodId

GetProposalsByPeriodID get proposals by period ID API

func NewGetProposalsByPeriodID

func NewGetProposalsByPeriodID(ctx *middleware.Context, handler GetProposalsByPeriodIDHandler) *GetProposalsByPeriodID

NewGetProposalsByPeriodID creates a new http.Handler for the get proposals by period ID operation

func (*GetProposalsByPeriodID) ServeHTTP

func (o *GetProposalsByPeriodID) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type GetProposalsByPeriodIDHandler

type GetProposalsByPeriodIDHandler interface {
	Handle(GetProposalsByPeriodIDParams) middleware.Responder
}

GetProposalsByPeriodIDHandler interface for that can handle valid get proposals by period ID params

type GetProposalsByPeriodIDHandlerFunc

type GetProposalsByPeriodIDHandlerFunc func(GetProposalsByPeriodIDParams) middleware.Responder

GetProposalsByPeriodIDHandlerFunc turns a function with the right signature into a get proposals by period ID handler

func (GetProposalsByPeriodIDHandlerFunc) Handle

Handle executing the request and returning a response

type GetProposalsByPeriodIDNotFound

type GetProposalsByPeriodIDNotFound struct {
}

GetProposalsByPeriodIDNotFound Not Found

swagger:response getProposalsByPeriodIdNotFound

func NewGetProposalsByPeriodIDNotFound

func NewGetProposalsByPeriodIDNotFound() *GetProposalsByPeriodIDNotFound

NewGetProposalsByPeriodIDNotFound creates GetProposalsByPeriodIDNotFound with default headers values

func (*GetProposalsByPeriodIDNotFound) WriteResponse

func (o *GetProposalsByPeriodIDNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetProposalsByPeriodIDOK

type GetProposalsByPeriodIDOK struct {
	/*The total number of data entries.

	 */
	XTotalCount int64 `json:"X-Total-Count"`

	/*
	  In: Body
	*/
	Payload []*models.Proposal `json:"body,omitempty"`
}

GetProposalsByPeriodIDOK Query compatibility endpoint for proposals

swagger:response getProposalsByPeriodIdOK

func NewGetProposalsByPeriodIDOK

func NewGetProposalsByPeriodIDOK() *GetProposalsByPeriodIDOK

NewGetProposalsByPeriodIDOK creates GetProposalsByPeriodIDOK with default headers values

func (*GetProposalsByPeriodIDOK) SetPayload

func (o *GetProposalsByPeriodIDOK) SetPayload(payload []*models.Proposal)

SetPayload sets the payload to the get proposals by period Id o k response

func (*GetProposalsByPeriodIDOK) SetXTotalCount

func (o *GetProposalsByPeriodIDOK) SetXTotalCount(xTotalCount int64)

SetXTotalCount sets the xTotalCount to the get proposals by period Id o k response

func (*GetProposalsByPeriodIDOK) WithPayload

WithPayload adds the payload to the get proposals by period Id o k response

func (*GetProposalsByPeriodIDOK) WithXTotalCount

func (o *GetProposalsByPeriodIDOK) WithXTotalCount(xTotalCount int64) *GetProposalsByPeriodIDOK

WithXTotalCount adds the xTotalCount to the get proposals by period Id o k response

func (*GetProposalsByPeriodIDOK) WriteResponse

func (o *GetProposalsByPeriodIDOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetProposalsByPeriodIDParams

type GetProposalsByPeriodIDParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*
	  Maximum: 20
	  Minimum: 1
	  In: query
	  Default: 10
	*/
	Limit *int64
	/*
	  Required: true
	  In: path
	*/
	Network string
	/*
	  Minimum: 0
	  In: query
	  Default: 0
	*/
	Offset *int64
	/*
	  In: query
	*/
	PeriodID *int64
}

GetProposalsByPeriodIDParams contains all the bound params for the get proposals by period ID operation typically these are obtained from a http.Request

swagger:parameters getProposalsByPeriodID

func NewGetProposalsByPeriodIDParams

func NewGetProposalsByPeriodIDParams() GetProposalsByPeriodIDParams

NewGetProposalsByPeriodIDParams creates a new GetProposalsByPeriodIDParams object with the default values initialized.

func (*GetProposalsByPeriodIDParams) BindRequest

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewGetProposalsByPeriodIDParams() beforehand.

type GetProposalsByPeriodIDURL

type GetProposalsByPeriodIDURL struct {
	Network string

	Limit    *int64
	Offset   *int64
	PeriodID *int64
	// contains filtered or unexported fields
}

GetProposalsByPeriodIDURL generates an URL for the get proposals by period ID operation

func (*GetProposalsByPeriodIDURL) Build

func (o *GetProposalsByPeriodIDURL) Build() (*url.URL, error)

Build a url path and query string

func (*GetProposalsByPeriodIDURL) BuildFull

func (o *GetProposalsByPeriodIDURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*GetProposalsByPeriodIDURL) Must

func (o *GetProposalsByPeriodIDURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*GetProposalsByPeriodIDURL) SetBasePath

func (o *GetProposalsByPeriodIDURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*GetProposalsByPeriodIDURL) String

func (o *GetProposalsByPeriodIDURL) String() string

String returns the string representation of the path with query string

func (*GetProposalsByPeriodIDURL) StringFull

func (o *GetProposalsByPeriodIDURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*GetProposalsByPeriodIDURL) WithBasePath

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type GetProtocolsList

type GetProtocolsList struct {
	Context *middleware.Context
	Handler GetProtocolsListHandler
}

GetProtocolsList swagger:route GET /v2/data/{network}/protocols Voting getProtocolsList

GetProtocolsList get protocols list API

func NewGetProtocolsList

func NewGetProtocolsList(ctx *middleware.Context, handler GetProtocolsListHandler) *GetProtocolsList

NewGetProtocolsList creates a new http.Handler for the get protocols list operation

func (*GetProtocolsList) ServeHTTP

func (o *GetProtocolsList) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type GetProtocolsListHandler

type GetProtocolsListHandler interface {
	Handle(GetProtocolsListParams) middleware.Responder
}

GetProtocolsListHandler interface for that can handle valid get protocols list params

type GetProtocolsListHandlerFunc

type GetProtocolsListHandlerFunc func(GetProtocolsListParams) middleware.Responder

GetProtocolsListHandlerFunc turns a function with the right signature into a get protocols list handler

func (GetProtocolsListHandlerFunc) Handle

Handle executing the request and returning a response

type GetProtocolsListNotFound

type GetProtocolsListNotFound struct {
}

GetProtocolsListNotFound Not Found

swagger:response getProtocolsListNotFound

func NewGetProtocolsListNotFound

func NewGetProtocolsListNotFound() *GetProtocolsListNotFound

NewGetProtocolsListNotFound creates GetProtocolsListNotFound with default headers values

func (*GetProtocolsListNotFound) WriteResponse

func (o *GetProtocolsListNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetProtocolsListOK

type GetProtocolsListOK struct {
	/*The total number of data entries.

	 */
	XTotalCount int64 `json:"X-Total-Count"`

	/*
	  In: Body
	*/
	Payload []*models.Protocol `json:"body,omitempty"`
}

GetProtocolsListOK Query compatibility endpoint for protocols

swagger:response getProtocolsListOK

func NewGetProtocolsListOK

func NewGetProtocolsListOK() *GetProtocolsListOK

NewGetProtocolsListOK creates GetProtocolsListOK with default headers values

func (*GetProtocolsListOK) SetPayload

func (o *GetProtocolsListOK) SetPayload(payload []*models.Protocol)

SetPayload sets the payload to the get protocols list o k response

func (*GetProtocolsListOK) SetXTotalCount

func (o *GetProtocolsListOK) SetXTotalCount(xTotalCount int64)

SetXTotalCount sets the xTotalCount to the get protocols list o k response

func (*GetProtocolsListOK) WithPayload

func (o *GetProtocolsListOK) WithPayload(payload []*models.Protocol) *GetProtocolsListOK

WithPayload adds the payload to the get protocols list o k response

func (*GetProtocolsListOK) WithXTotalCount

func (o *GetProtocolsListOK) WithXTotalCount(xTotalCount int64) *GetProtocolsListOK

WithXTotalCount adds the xTotalCount to the get protocols list o k response

func (*GetProtocolsListOK) WriteResponse

func (o *GetProtocolsListOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetProtocolsListParams

type GetProtocolsListParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*
	  Maximum: 300
	  Minimum: 1
	  In: query
	  Default: 20
	*/
	Limit *int64
	/*
	  Required: true
	  In: path
	*/
	Network string
	/*
	  Minimum: 0
	  In: query
	  Default: 0
	*/
	Offset *int64
}

GetProtocolsListParams contains all the bound params for the get protocols list operation typically these are obtained from a http.Request

swagger:parameters getProtocolsList

func NewGetProtocolsListParams

func NewGetProtocolsListParams() GetProtocolsListParams

NewGetProtocolsListParams creates a new GetProtocolsListParams object with the default values initialized.

func (*GetProtocolsListParams) BindRequest

func (o *GetProtocolsListParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewGetProtocolsListParams() beforehand.

type GetProtocolsListURL

type GetProtocolsListURL struct {
	Network string

	Limit  *int64
	Offset *int64
	// contains filtered or unexported fields
}

GetProtocolsListURL generates an URL for the get protocols list operation

func (*GetProtocolsListURL) Build

func (o *GetProtocolsListURL) Build() (*url.URL, error)

Build a url path and query string

func (*GetProtocolsListURL) BuildFull

func (o *GetProtocolsListURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*GetProtocolsListURL) Must

func (o *GetProtocolsListURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*GetProtocolsListURL) SetBasePath

func (o *GetProtocolsListURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*GetProtocolsListURL) String

func (o *GetProtocolsListURL) String() string

String returns the string representation of the path with query string

func (*GetProtocolsListURL) StringFull

func (o *GetProtocolsListURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*GetProtocolsListURL) WithBasePath

func (o *GetProtocolsListURL) WithBasePath(bp string) *GetProtocolsListURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL