Documentation ¶
Index ¶
- type Client
- type ClientOption
- type ClientService
- type ElapseForbidden
- func (o *ElapseForbidden) Code() int
- func (o *ElapseForbidden) Error() string
- func (o *ElapseForbidden) IsClientError() bool
- func (o *ElapseForbidden) IsCode(code int) bool
- func (o *ElapseForbidden) IsRedirect() bool
- func (o *ElapseForbidden) IsServerError() bool
- func (o *ElapseForbidden) IsSuccess() bool
- func (o *ElapseForbidden) String() string
- type ElapseOK
- func (o *ElapseOK) Code() int
- func (o *ElapseOK) Error() string
- func (o *ElapseOK) GetPayload() io.Writer
- func (o *ElapseOK) IsClientError() bool
- func (o *ElapseOK) IsCode(code int) bool
- func (o *ElapseOK) IsRedirect() bool
- func (o *ElapseOK) IsServerError() bool
- func (o *ElapseOK) IsSuccess() bool
- func (o *ElapseOK) String() string
- type ElapseParams
- func (o *ElapseParams) SetContext(ctx context.Context)
- func (o *ElapseParams) SetDefaults()
- func (o *ElapseParams) SetHTTPClient(client *http.Client)
- func (o *ElapseParams) SetLength(length int64)
- func (o *ElapseParams) SetTimeout(timeout time.Duration)
- func (o *ElapseParams) WithContext(ctx context.Context) *ElapseParams
- func (o *ElapseParams) WithDefaults() *ElapseParams
- func (o *ElapseParams) WithHTTPClient(client *http.Client) *ElapseParams
- func (o *ElapseParams) WithLength(length int64) *ElapseParams
- func (o *ElapseParams) WithTimeout(timeout time.Duration) *ElapseParams
- func (o *ElapseParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type ElapseReader
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 operations API
func (*Client) Elapse ¶
func (a *Client) Elapse(params *ElapseParams, writer io.Writer, opts ...ClientOption) (*ElapseOK, error)
Elapse counts down the number of seconds
Count down the seconds remaining
func (*Client) SetTransport ¶
func (a *Client) SetTransport(transport runtime.ClientTransport)
SetTransport changes the transport on the client
type ClientOption ¶
type ClientOption func(*runtime.ClientOperation)
ClientOption is the option for Client methods
type ClientService ¶
type ClientService interface { Elapse(params *ElapseParams, writer io.Writer, opts ...ClientOption) (*ElapseOK, 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 operations API client.
func NewClientWithBasicAuth ¶
func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService
New creates a new operations 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 operations 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 ElapseForbidden ¶
type ElapseForbidden struct { }
ElapseForbidden describes a response with status code 403, with default header values.
Contrived - thrown when length of 11 is chosen
func NewElapseForbidden ¶
func NewElapseForbidden() *ElapseForbidden
NewElapseForbidden creates a ElapseForbidden with default headers values
func (*ElapseForbidden) Code ¶
func (o *ElapseForbidden) Code() int
Code gets the status code for the elapse forbidden response
func (*ElapseForbidden) Error ¶
func (o *ElapseForbidden) Error() string
func (*ElapseForbidden) IsClientError ¶
func (o *ElapseForbidden) IsClientError() bool
IsClientError returns true when this elapse forbidden response has a 4xx status code
func (*ElapseForbidden) IsCode ¶
func (o *ElapseForbidden) IsCode(code int) bool
IsCode returns true when this elapse forbidden response a status code equal to that given
func (*ElapseForbidden) IsRedirect ¶
func (o *ElapseForbidden) IsRedirect() bool
IsRedirect returns true when this elapse forbidden response has a 3xx status code
func (*ElapseForbidden) IsServerError ¶
func (o *ElapseForbidden) IsServerError() bool
IsServerError returns true when this elapse forbidden response has a 5xx status code
func (*ElapseForbidden) IsSuccess ¶
func (o *ElapseForbidden) IsSuccess() bool
IsSuccess returns true when this elapse forbidden response has a 2xx status code
func (*ElapseForbidden) String ¶
func (o *ElapseForbidden) String() string
type ElapseOK ¶
ElapseOK describes a response with status code 200, with default header values.
Secondly update on remaining time
func NewElapseOK ¶
NewElapseOK creates a ElapseOK with default headers values
func (*ElapseOK) GetPayload ¶
func (*ElapseOK) IsClientError ¶
IsClientError returns true when this elapse o k response has a 4xx status code
func (*ElapseOK) IsCode ¶
IsCode returns true when this elapse o k response a status code equal to that given
func (*ElapseOK) IsRedirect ¶
IsRedirect returns true when this elapse o k response has a 3xx status code
func (*ElapseOK) IsServerError ¶
IsServerError returns true when this elapse o k response has a 5xx status code
type ElapseParams ¶
type ElapseParams struct { /* Length. How many seconds to count down */ Length int64 Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
ElapseParams contains all the parameters to send to the API endpoint
for the elapse operation. Typically these are written to a http.Request.
func NewElapseParams ¶
func NewElapseParams() *ElapseParams
NewElapseParams creates a new ElapseParams 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 NewElapseParamsWithContext ¶
func NewElapseParamsWithContext(ctx context.Context) *ElapseParams
NewElapseParamsWithContext creates a new ElapseParams object with the ability to set a context for a request.
func NewElapseParamsWithHTTPClient ¶
func NewElapseParamsWithHTTPClient(client *http.Client) *ElapseParams
NewElapseParamsWithHTTPClient creates a new ElapseParams object with the ability to set a custom HTTPClient for a request.
func NewElapseParamsWithTimeout ¶
func NewElapseParamsWithTimeout(timeout time.Duration) *ElapseParams
NewElapseParamsWithTimeout creates a new ElapseParams object with the ability to set a timeout on a request.
func (*ElapseParams) SetContext ¶
func (o *ElapseParams) SetContext(ctx context.Context)
SetContext adds the context to the elapse params
func (*ElapseParams) SetDefaults ¶
func (o *ElapseParams) SetDefaults()
SetDefaults hydrates default values in the elapse params (not the query body).
All values with no default are reset to their zero value.
func (*ElapseParams) SetHTTPClient ¶
func (o *ElapseParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the elapse params
func (*ElapseParams) SetLength ¶
func (o *ElapseParams) SetLength(length int64)
SetLength adds the length to the elapse params
func (*ElapseParams) SetTimeout ¶
func (o *ElapseParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the elapse params
func (*ElapseParams) WithContext ¶
func (o *ElapseParams) WithContext(ctx context.Context) *ElapseParams
WithContext adds the context to the elapse params
func (*ElapseParams) WithDefaults ¶
func (o *ElapseParams) WithDefaults() *ElapseParams
WithDefaults hydrates default values in the elapse params (not the query body).
All values with no default are reset to their zero value.
func (*ElapseParams) WithHTTPClient ¶
func (o *ElapseParams) WithHTTPClient(client *http.Client) *ElapseParams
WithHTTPClient adds the HTTPClient to the elapse params
func (*ElapseParams) WithLength ¶
func (o *ElapseParams) WithLength(length int64) *ElapseParams
WithLength adds the length to the elapse params
func (*ElapseParams) WithTimeout ¶
func (o *ElapseParams) WithTimeout(timeout time.Duration) *ElapseParams
WithTimeout adds the timeout to the elapse params
func (*ElapseParams) WriteToRequest ¶
func (o *ElapseParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type ElapseReader ¶
type ElapseReader struct {
// contains filtered or unexported fields
}
ElapseReader is a Reader for the Elapse structure.
func (*ElapseReader) ReadResponse ¶
func (o *ElapseReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.