polls

package
v0.0.0-...-6bd88e3 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: AGPL-3.0-or-later Imports: 12 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 polls API

func (*Client) Poll

func (a *Client) Poll(params *PollParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PollOK, error)

Poll views poll with given ID

func (*Client) PollVote

func (a *Client) PollVote(params *PollVoteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PollVoteOK, error)

PollVote votes with choices in the given poll

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 may be used to customize the behavior of Client methods.

type ClientService

type ClientService interface {
	Poll(params *PollParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PollOK, error)

	PollVote(params *PollVoteParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PollVoteOK, 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 polls API client.

func NewClientWithBasicAuth

func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService

New creates a new polls API client with basic auth credentials. It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - user: user for basic authentication header. - password: password for basic authentication header.

func NewClientWithBearerToken

func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService

New creates a new polls API client with a bearer token for authentication. It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - bearerToken: bearer token for Bearer authentication header.

type PollBadRequest

type PollBadRequest struct {
}

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

bad request

func NewPollBadRequest

func NewPollBadRequest() *PollBadRequest

NewPollBadRequest creates a PollBadRequest with default headers values

func (*PollBadRequest) Code

func (o *PollBadRequest) Code() int

Code gets the status code for the poll bad request response

func (*PollBadRequest) Error

func (o *PollBadRequest) Error() string

func (*PollBadRequest) IsClientError

func (o *PollBadRequest) IsClientError() bool

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

func (*PollBadRequest) IsCode

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

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

func (*PollBadRequest) IsRedirect

func (o *PollBadRequest) IsRedirect() bool

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

func (*PollBadRequest) IsServerError

func (o *PollBadRequest) IsServerError() bool

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

func (*PollBadRequest) IsSuccess

func (o *PollBadRequest) IsSuccess() bool

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

func (*PollBadRequest) String

func (o *PollBadRequest) String() string

type PollForbidden

type PollForbidden struct {
}

PollForbidden describes a response with status code 403, with default header values.

forbidden

func NewPollForbidden

func NewPollForbidden() *PollForbidden

NewPollForbidden creates a PollForbidden with default headers values

func (*PollForbidden) Code

func (o *PollForbidden) Code() int

Code gets the status code for the poll forbidden response

func (*PollForbidden) Error

func (o *PollForbidden) Error() string

func (*PollForbidden) IsClientError

func (o *PollForbidden) IsClientError() bool

IsClientError returns true when this poll forbidden response has a 4xx status code

func (*PollForbidden) IsCode

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

IsCode returns true when this poll forbidden response a status code equal to that given

func (*PollForbidden) IsRedirect

func (o *PollForbidden) IsRedirect() bool

IsRedirect returns true when this poll forbidden response has a 3xx status code

func (*PollForbidden) IsServerError

func (o *PollForbidden) IsServerError() bool

IsServerError returns true when this poll forbidden response has a 5xx status code

func (*PollForbidden) IsSuccess

func (o *PollForbidden) IsSuccess() bool

IsSuccess returns true when this poll forbidden response has a 2xx status code

func (*PollForbidden) String

func (o *PollForbidden) String() string

type PollInternalServerError

type PollInternalServerError struct {
}

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

internal server error

func NewPollInternalServerError

func NewPollInternalServerError() *PollInternalServerError

NewPollInternalServerError creates a PollInternalServerError with default headers values

func (*PollInternalServerError) Code

func (o *PollInternalServerError) Code() int

Code gets the status code for the poll internal server error response

func (*PollInternalServerError) Error

func (o *PollInternalServerError) Error() string

func (*PollInternalServerError) IsClientError

func (o *PollInternalServerError) IsClientError() bool

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

func (*PollInternalServerError) IsCode

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

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

func (*PollInternalServerError) IsRedirect

func (o *PollInternalServerError) IsRedirect() bool

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

func (*PollInternalServerError) IsServerError

func (o *PollInternalServerError) IsServerError() bool

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

func (*PollInternalServerError) IsSuccess

func (o *PollInternalServerError) IsSuccess() bool

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

func (*PollInternalServerError) String

func (o *PollInternalServerError) String() string

type PollNotAcceptable

type PollNotAcceptable struct {
}

PollNotAcceptable describes a response with status code 406, with default header values.

not acceptable

func NewPollNotAcceptable

func NewPollNotAcceptable() *PollNotAcceptable

NewPollNotAcceptable creates a PollNotAcceptable with default headers values

func (*PollNotAcceptable) Code

func (o *PollNotAcceptable) Code() int

Code gets the status code for the poll not acceptable response

func (*PollNotAcceptable) Error

func (o *PollNotAcceptable) Error() string

func (*PollNotAcceptable) IsClientError

func (o *PollNotAcceptable) IsClientError() bool

IsClientError returns true when this poll not acceptable response has a 4xx status code

func (*PollNotAcceptable) IsCode

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

IsCode returns true when this poll not acceptable response a status code equal to that given

func (*PollNotAcceptable) IsRedirect

func (o *PollNotAcceptable) IsRedirect() bool

IsRedirect returns true when this poll not acceptable response has a 3xx status code

func (*PollNotAcceptable) IsServerError

func (o *PollNotAcceptable) IsServerError() bool

IsServerError returns true when this poll not acceptable response has a 5xx status code

func (*PollNotAcceptable) IsSuccess

func (o *PollNotAcceptable) IsSuccess() bool

IsSuccess returns true when this poll not acceptable response has a 2xx status code

func (*PollNotAcceptable) String

func (o *PollNotAcceptable) String() string

type PollNotFound

type PollNotFound struct {
}

PollNotFound describes a response with status code 404, with default header values.

not found

func NewPollNotFound

func NewPollNotFound() *PollNotFound

NewPollNotFound creates a PollNotFound with default headers values

func (*PollNotFound) Code

func (o *PollNotFound) Code() int

Code gets the status code for the poll not found response

func (*PollNotFound) Error

func (o *PollNotFound) Error() string

func (*PollNotFound) IsClientError

func (o *PollNotFound) IsClientError() bool

IsClientError returns true when this poll not found response has a 4xx status code

func (*PollNotFound) IsCode

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

IsCode returns true when this poll not found response a status code equal to that given

func (*PollNotFound) IsRedirect

func (o *PollNotFound) IsRedirect() bool

IsRedirect returns true when this poll not found response has a 3xx status code

func (*PollNotFound) IsServerError

func (o *PollNotFound) IsServerError() bool

IsServerError returns true when this poll not found response has a 5xx status code

func (*PollNotFound) IsSuccess

func (o *PollNotFound) IsSuccess() bool

IsSuccess returns true when this poll not found response has a 2xx status code

func (*PollNotFound) String

func (o *PollNotFound) String() string

type PollOK

type PollOK struct {
	Payload *models.Poll
}

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

The requested poll.

func NewPollOK

func NewPollOK() *PollOK

NewPollOK creates a PollOK with default headers values

func (*PollOK) Code

func (o *PollOK) Code() int

Code gets the status code for the poll o k response

func (*PollOK) Error

func (o *PollOK) Error() string

func (*PollOK) GetPayload

func (o *PollOK) GetPayload() *models.Poll

func (*PollOK) IsClientError

func (o *PollOK) IsClientError() bool

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

func (*PollOK) IsCode

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

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

func (*PollOK) IsRedirect

func (o *PollOK) IsRedirect() bool

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

func (*PollOK) IsServerError

func (o *PollOK) IsServerError() bool

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

func (*PollOK) IsSuccess

func (o *PollOK) IsSuccess() bool

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

func (*PollOK) String

func (o *PollOK) String() string

type PollParams

type PollParams struct {

	/* ID.

	   Target poll ID.
	*/
	ID string

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

PollParams contains all the parameters to send to the API endpoint

for the poll operation.

Typically these are written to a http.Request.

func NewPollParams

func NewPollParams() *PollParams

NewPollParams creates a new PollParams 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 NewPollParamsWithContext

func NewPollParamsWithContext(ctx context.Context) *PollParams

NewPollParamsWithContext creates a new PollParams object with the ability to set a context for a request.

func NewPollParamsWithHTTPClient

func NewPollParamsWithHTTPClient(client *http.Client) *PollParams

NewPollParamsWithHTTPClient creates a new PollParams object with the ability to set a custom HTTPClient for a request.

func NewPollParamsWithTimeout

func NewPollParamsWithTimeout(timeout time.Duration) *PollParams

NewPollParamsWithTimeout creates a new PollParams object with the ability to set a timeout on a request.

func (*PollParams) SetContext

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

SetContext adds the context to the poll params

func (*PollParams) SetDefaults

func (o *PollParams) SetDefaults()

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

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

func (*PollParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the poll params

func (*PollParams) SetID

func (o *PollParams) SetID(id string)

SetID adds the id to the poll params

func (*PollParams) SetTimeout

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

SetTimeout adds the timeout to the poll params

func (*PollParams) WithContext

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

WithContext adds the context to the poll params

func (*PollParams) WithDefaults

func (o *PollParams) WithDefaults() *PollParams

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

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

func (*PollParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the poll params

func (*PollParams) WithID

func (o *PollParams) WithID(id string) *PollParams

WithID adds the id to the poll params

func (*PollParams) WithTimeout

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

WithTimeout adds the timeout to the poll params

func (*PollParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type PollReader

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

PollReader is a Reader for the Poll structure.

func (*PollReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type PollUnauthorized

type PollUnauthorized struct {
}

PollUnauthorized describes a response with status code 401, with default header values.

unauthorized

func NewPollUnauthorized

func NewPollUnauthorized() *PollUnauthorized

NewPollUnauthorized creates a PollUnauthorized with default headers values

func (*PollUnauthorized) Code

func (o *PollUnauthorized) Code() int

Code gets the status code for the poll unauthorized response

func (*PollUnauthorized) Error

func (o *PollUnauthorized) Error() string

func (*PollUnauthorized) IsClientError

func (o *PollUnauthorized) IsClientError() bool

IsClientError returns true when this poll unauthorized response has a 4xx status code

func (*PollUnauthorized) IsCode

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

IsCode returns true when this poll unauthorized response a status code equal to that given

func (*PollUnauthorized) IsRedirect

func (o *PollUnauthorized) IsRedirect() bool

IsRedirect returns true when this poll unauthorized response has a 3xx status code

func (*PollUnauthorized) IsServerError

func (o *PollUnauthorized) IsServerError() bool

IsServerError returns true when this poll unauthorized response has a 5xx status code

func (*PollUnauthorized) IsSuccess

func (o *PollUnauthorized) IsSuccess() bool

IsSuccess returns true when this poll unauthorized response has a 2xx status code

func (*PollUnauthorized) String

func (o *PollUnauthorized) String() string

type PollVoteBadRequest

type PollVoteBadRequest struct {
}

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

bad request

func NewPollVoteBadRequest

func NewPollVoteBadRequest() *PollVoteBadRequest

NewPollVoteBadRequest creates a PollVoteBadRequest with default headers values

func (*PollVoteBadRequest) Code

func (o *PollVoteBadRequest) Code() int

Code gets the status code for the poll vote bad request response

func (*PollVoteBadRequest) Error

func (o *PollVoteBadRequest) Error() string

func (*PollVoteBadRequest) IsClientError

func (o *PollVoteBadRequest) IsClientError() bool

IsClientError returns true when this poll vote bad request response has a 4xx status code

func (*PollVoteBadRequest) IsCode

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

IsCode returns true when this poll vote bad request response a status code equal to that given

func (*PollVoteBadRequest) IsRedirect

func (o *PollVoteBadRequest) IsRedirect() bool

IsRedirect returns true when this poll vote bad request response has a 3xx status code

func (*PollVoteBadRequest) IsServerError

func (o *PollVoteBadRequest) IsServerError() bool

IsServerError returns true when this poll vote bad request response has a 5xx status code

func (*PollVoteBadRequest) IsSuccess

func (o *PollVoteBadRequest) IsSuccess() bool

IsSuccess returns true when this poll vote bad request response has a 2xx status code

func (*PollVoteBadRequest) String

func (o *PollVoteBadRequest) String() string

type PollVoteForbidden

type PollVoteForbidden struct {
}

PollVoteForbidden describes a response with status code 403, with default header values.

forbidden

func NewPollVoteForbidden

func NewPollVoteForbidden() *PollVoteForbidden

NewPollVoteForbidden creates a PollVoteForbidden with default headers values

func (*PollVoteForbidden) Code

func (o *PollVoteForbidden) Code() int

Code gets the status code for the poll vote forbidden response

func (*PollVoteForbidden) Error

func (o *PollVoteForbidden) Error() string

func (*PollVoteForbidden) IsClientError

func (o *PollVoteForbidden) IsClientError() bool

IsClientError returns true when this poll vote forbidden response has a 4xx status code

func (*PollVoteForbidden) IsCode

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

IsCode returns true when this poll vote forbidden response a status code equal to that given

func (*PollVoteForbidden) IsRedirect

func (o *PollVoteForbidden) IsRedirect() bool

IsRedirect returns true when this poll vote forbidden response has a 3xx status code

func (*PollVoteForbidden) IsServerError

func (o *PollVoteForbidden) IsServerError() bool

IsServerError returns true when this poll vote forbidden response has a 5xx status code

func (*PollVoteForbidden) IsSuccess

func (o *PollVoteForbidden) IsSuccess() bool

IsSuccess returns true when this poll vote forbidden response has a 2xx status code

func (*PollVoteForbidden) String

func (o *PollVoteForbidden) String() string

type PollVoteInternalServerError

type PollVoteInternalServerError struct {
}

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

internal server error

func NewPollVoteInternalServerError

func NewPollVoteInternalServerError() *PollVoteInternalServerError

NewPollVoteInternalServerError creates a PollVoteInternalServerError with default headers values

func (*PollVoteInternalServerError) Code

func (o *PollVoteInternalServerError) Code() int

Code gets the status code for the poll vote internal server error response

func (*PollVoteInternalServerError) Error

func (*PollVoteInternalServerError) IsClientError

func (o *PollVoteInternalServerError) IsClientError() bool

IsClientError returns true when this poll vote internal server error response has a 4xx status code

func (*PollVoteInternalServerError) IsCode

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

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

func (*PollVoteInternalServerError) IsRedirect

func (o *PollVoteInternalServerError) IsRedirect() bool

IsRedirect returns true when this poll vote internal server error response has a 3xx status code

func (*PollVoteInternalServerError) IsServerError

func (o *PollVoteInternalServerError) IsServerError() bool

IsServerError returns true when this poll vote internal server error response has a 5xx status code

func (*PollVoteInternalServerError) IsSuccess

func (o *PollVoteInternalServerError) IsSuccess() bool

IsSuccess returns true when this poll vote internal server error response has a 2xx status code

func (*PollVoteInternalServerError) String

func (o *PollVoteInternalServerError) String() string

type PollVoteNotAcceptable

type PollVoteNotAcceptable struct {
}

PollVoteNotAcceptable describes a response with status code 406, with default header values.

not acceptable

func NewPollVoteNotAcceptable

func NewPollVoteNotAcceptable() *PollVoteNotAcceptable

NewPollVoteNotAcceptable creates a PollVoteNotAcceptable with default headers values

func (*PollVoteNotAcceptable) Code

func (o *PollVoteNotAcceptable) Code() int

Code gets the status code for the poll vote not acceptable response

func (*PollVoteNotAcceptable) Error

func (o *PollVoteNotAcceptable) Error() string

func (*PollVoteNotAcceptable) IsClientError

func (o *PollVoteNotAcceptable) IsClientError() bool

IsClientError returns true when this poll vote not acceptable response has a 4xx status code

func (*PollVoteNotAcceptable) IsCode

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

IsCode returns true when this poll vote not acceptable response a status code equal to that given

func (*PollVoteNotAcceptable) IsRedirect

func (o *PollVoteNotAcceptable) IsRedirect() bool

IsRedirect returns true when this poll vote not acceptable response has a 3xx status code

func (*PollVoteNotAcceptable) IsServerError

func (o *PollVoteNotAcceptable) IsServerError() bool

IsServerError returns true when this poll vote not acceptable response has a 5xx status code

func (*PollVoteNotAcceptable) IsSuccess

func (o *PollVoteNotAcceptable) IsSuccess() bool

IsSuccess returns true when this poll vote not acceptable response has a 2xx status code

func (*PollVoteNotAcceptable) String

func (o *PollVoteNotAcceptable) String() string

type PollVoteNotFound

type PollVoteNotFound struct {
}

PollVoteNotFound describes a response with status code 404, with default header values.

not found

func NewPollVoteNotFound

func NewPollVoteNotFound() *PollVoteNotFound

NewPollVoteNotFound creates a PollVoteNotFound with default headers values

func (*PollVoteNotFound) Code

func (o *PollVoteNotFound) Code() int

Code gets the status code for the poll vote not found response

func (*PollVoteNotFound) Error

func (o *PollVoteNotFound) Error() string

func (*PollVoteNotFound) IsClientError

func (o *PollVoteNotFound) IsClientError() bool

IsClientError returns true when this poll vote not found response has a 4xx status code

func (*PollVoteNotFound) IsCode

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

IsCode returns true when this poll vote not found response a status code equal to that given

func (*PollVoteNotFound) IsRedirect

func (o *PollVoteNotFound) IsRedirect() bool

IsRedirect returns true when this poll vote not found response has a 3xx status code

func (*PollVoteNotFound) IsServerError

func (o *PollVoteNotFound) IsServerError() bool

IsServerError returns true when this poll vote not found response has a 5xx status code

func (*PollVoteNotFound) IsSuccess

func (o *PollVoteNotFound) IsSuccess() bool

IsSuccess returns true when this poll vote not found response has a 2xx status code

func (*PollVoteNotFound) String

func (o *PollVoteNotFound) String() string

type PollVoteOK

type PollVoteOK struct {
	Payload *models.Poll
}

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

The updated poll with user vote choices.

func NewPollVoteOK

func NewPollVoteOK() *PollVoteOK

NewPollVoteOK creates a PollVoteOK with default headers values

func (*PollVoteOK) Code

func (o *PollVoteOK) Code() int

Code gets the status code for the poll vote o k response

func (*PollVoteOK) Error

func (o *PollVoteOK) Error() string

func (*PollVoteOK) GetPayload

func (o *PollVoteOK) GetPayload() *models.Poll

func (*PollVoteOK) IsClientError

func (o *PollVoteOK) IsClientError() bool

IsClientError returns true when this poll vote o k response has a 4xx status code

func (*PollVoteOK) IsCode

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

IsCode returns true when this poll vote o k response a status code equal to that given

func (*PollVoteOK) IsRedirect

func (o *PollVoteOK) IsRedirect() bool

IsRedirect returns true when this poll vote o k response has a 3xx status code

func (*PollVoteOK) IsServerError

func (o *PollVoteOK) IsServerError() bool

IsServerError returns true when this poll vote o k response has a 5xx status code

func (*PollVoteOK) IsSuccess

func (o *PollVoteOK) IsSuccess() bool

IsSuccess returns true when this poll vote o k response has a 2xx status code

func (*PollVoteOK) String

func (o *PollVoteOK) String() string

type PollVoteParams

type PollVoteParams struct {

	/* Choices.

	   Poll choice indices on which to vote.
	*/
	Choices []int64

	/* ID.

	   Target poll ID.
	*/
	ID string

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

PollVoteParams contains all the parameters to send to the API endpoint

for the poll vote operation.

Typically these are written to a http.Request.

func NewPollVoteParams

func NewPollVoteParams() *PollVoteParams

NewPollVoteParams creates a new PollVoteParams 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 NewPollVoteParamsWithContext

func NewPollVoteParamsWithContext(ctx context.Context) *PollVoteParams

NewPollVoteParamsWithContext creates a new PollVoteParams object with the ability to set a context for a request.

func NewPollVoteParamsWithHTTPClient

func NewPollVoteParamsWithHTTPClient(client *http.Client) *PollVoteParams

NewPollVoteParamsWithHTTPClient creates a new PollVoteParams object with the ability to set a custom HTTPClient for a request.

func NewPollVoteParamsWithTimeout

func NewPollVoteParamsWithTimeout(timeout time.Duration) *PollVoteParams

NewPollVoteParamsWithTimeout creates a new PollVoteParams object with the ability to set a timeout on a request.

func (*PollVoteParams) SetChoices

func (o *PollVoteParams) SetChoices(choices []int64)

SetChoices adds the choices to the poll vote params

func (*PollVoteParams) SetContext

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

SetContext adds the context to the poll vote params

func (*PollVoteParams) SetDefaults

func (o *PollVoteParams) SetDefaults()

SetDefaults hydrates default values in the poll vote params (not the query body).

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

func (*PollVoteParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the poll vote params

func (*PollVoteParams) SetID

func (o *PollVoteParams) SetID(id string)

SetID adds the id to the poll vote params

func (*PollVoteParams) SetTimeout

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

SetTimeout adds the timeout to the poll vote params

func (*PollVoteParams) WithChoices

func (o *PollVoteParams) WithChoices(choices []int64) *PollVoteParams

WithChoices adds the choices to the poll vote params

func (*PollVoteParams) WithContext

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

WithContext adds the context to the poll vote params

func (*PollVoteParams) WithDefaults

func (o *PollVoteParams) WithDefaults() *PollVoteParams

WithDefaults hydrates default values in the poll vote params (not the query body).

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

func (*PollVoteParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the poll vote params

func (*PollVoteParams) WithID

func (o *PollVoteParams) WithID(id string) *PollVoteParams

WithID adds the id to the poll vote params

func (*PollVoteParams) WithTimeout

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

WithTimeout adds the timeout to the poll vote params

func (*PollVoteParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type PollVoteReader

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

PollVoteReader is a Reader for the PollVote structure.

func (*PollVoteReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type PollVoteUnauthorized

type PollVoteUnauthorized struct {
}

PollVoteUnauthorized describes a response with status code 401, with default header values.

unauthorized

func NewPollVoteUnauthorized

func NewPollVoteUnauthorized() *PollVoteUnauthorized

NewPollVoteUnauthorized creates a PollVoteUnauthorized with default headers values

func (*PollVoteUnauthorized) Code

func (o *PollVoteUnauthorized) Code() int

Code gets the status code for the poll vote unauthorized response

func (*PollVoteUnauthorized) Error

func (o *PollVoteUnauthorized) Error() string

func (*PollVoteUnauthorized) IsClientError

func (o *PollVoteUnauthorized) IsClientError() bool

IsClientError returns true when this poll vote unauthorized response has a 4xx status code

func (*PollVoteUnauthorized) IsCode

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

IsCode returns true when this poll vote unauthorized response a status code equal to that given

func (*PollVoteUnauthorized) IsRedirect

func (o *PollVoteUnauthorized) IsRedirect() bool

IsRedirect returns true when this poll vote unauthorized response has a 3xx status code

func (*PollVoteUnauthorized) IsServerError

func (o *PollVoteUnauthorized) IsServerError() bool

IsServerError returns true when this poll vote unauthorized response has a 5xx status code

func (*PollVoteUnauthorized) IsSuccess

func (o *PollVoteUnauthorized) IsSuccess() bool

IsSuccess returns true when this poll vote unauthorized response has a 2xx status code

func (*PollVoteUnauthorized) String

func (o *PollVoteUnauthorized) String() string

type PollVoteUnprocessableEntity

type PollVoteUnprocessableEntity struct {
}

PollVoteUnprocessableEntity describes a response with status code 422, with default header values.

unprocessable entity

func NewPollVoteUnprocessableEntity

func NewPollVoteUnprocessableEntity() *PollVoteUnprocessableEntity

NewPollVoteUnprocessableEntity creates a PollVoteUnprocessableEntity with default headers values

func (*PollVoteUnprocessableEntity) Code

func (o *PollVoteUnprocessableEntity) Code() int

Code gets the status code for the poll vote unprocessable entity response

func (*PollVoteUnprocessableEntity) Error

func (*PollVoteUnprocessableEntity) IsClientError

func (o *PollVoteUnprocessableEntity) IsClientError() bool

IsClientError returns true when this poll vote unprocessable entity response has a 4xx status code

func (*PollVoteUnprocessableEntity) IsCode

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

IsCode returns true when this poll vote unprocessable entity response a status code equal to that given

func (*PollVoteUnprocessableEntity) IsRedirect

func (o *PollVoteUnprocessableEntity) IsRedirect() bool

IsRedirect returns true when this poll vote unprocessable entity response has a 3xx status code

func (*PollVoteUnprocessableEntity) IsServerError

func (o *PollVoteUnprocessableEntity) IsServerError() bool

IsServerError returns true when this poll vote unprocessable entity response has a 5xx status code

func (*PollVoteUnprocessableEntity) IsSuccess

func (o *PollVoteUnprocessableEntity) IsSuccess() bool

IsSuccess returns true when this poll vote unprocessable entity response has a 2xx status code

func (*PollVoteUnprocessableEntity) String

func (o *PollVoteUnprocessableEntity) String() string

Jump to

Keyboard shortcuts

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