Documentation
¶
Index ¶
- type Client
- type ClientOption
- type ClientService
- type MOTDOK
- func (o *MOTDOK) Code() int
- func (o *MOTDOK) Error() string
- func (o *MOTDOK) GetPayload() *models.MotdMotdResponse
- func (o *MOTDOK) IsClientError() bool
- func (o *MOTDOK) IsCode(code int) bool
- func (o *MOTDOK) IsRedirect() bool
- func (o *MOTDOK) IsServerError() bool
- func (o *MOTDOK) IsSuccess() bool
- func (o *MOTDOK) String() string
- type MOTDParams
- func (o *MOTDParams) SetContext(ctx context.Context)
- func (o *MOTDParams) SetDefaults()
- func (o *MOTDParams) SetHTTPClient(client *http.Client)
- func (o *MOTDParams) SetTimeout(timeout time.Duration)
- func (o *MOTDParams) WithContext(ctx context.Context) *MOTDParams
- func (o *MOTDParams) WithDefaults() *MOTDParams
- func (o *MOTDParams) WithHTTPClient(client *http.Client) *MOTDParams
- func (o *MOTDParams) WithTimeout(timeout time.Duration) *MOTDParams
- func (o *MOTDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type MOTDReader
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 motd API
func (*Client) MOTD ¶
func (a *Client) MOTD(params *MOTDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*MOTDOK, error)
MOTD fetches the message of the day
**Access policy**: restricted
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 {
MOTD(params *MOTDParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*MOTDOK, 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 motd API client.
func NewClientWithBasicAuth ¶
func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService
New creates a new motd 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 motd 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 MOTDOK ¶
type MOTDOK struct {
Payload *models.MotdMotdResponse
}
MOTDOK describes a response with status code 200, with default header values.
OK
func (*MOTDOK) GetPayload ¶
func (o *MOTDOK) GetPayload() *models.MotdMotdResponse
func (*MOTDOK) IsClientError ¶
IsClientError returns true when this m o t d o k response has a 4xx status code
func (*MOTDOK) IsCode ¶
IsCode returns true when this m o t d o k response a status code equal to that given
func (*MOTDOK) IsRedirect ¶
IsRedirect returns true when this m o t d o k response has a 3xx status code
func (*MOTDOK) IsServerError ¶
IsServerError returns true when this m o t d o k response has a 5xx status code
type MOTDParams ¶
type MOTDParams struct {
Context context.Context
HTTPClient *http.Client
// contains filtered or unexported fields
}
MOTDParams contains all the parameters to send to the API endpoint
for the m o t d operation. Typically these are written to a http.Request.
func NewMOTDParams ¶
func NewMOTDParams() *MOTDParams
NewMOTDParams creates a new MOTDParams 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 NewMOTDParamsWithContext ¶
func NewMOTDParamsWithContext(ctx context.Context) *MOTDParams
NewMOTDParamsWithContext creates a new MOTDParams object with the ability to set a context for a request.
func NewMOTDParamsWithHTTPClient ¶
func NewMOTDParamsWithHTTPClient(client *http.Client) *MOTDParams
NewMOTDParamsWithHTTPClient creates a new MOTDParams object with the ability to set a custom HTTPClient for a request.
func NewMOTDParamsWithTimeout ¶
func NewMOTDParamsWithTimeout(timeout time.Duration) *MOTDParams
NewMOTDParamsWithTimeout creates a new MOTDParams object with the ability to set a timeout on a request.
func (*MOTDParams) SetContext ¶
func (o *MOTDParams) SetContext(ctx context.Context)
SetContext adds the context to the m o t d params
func (*MOTDParams) SetDefaults ¶
func (o *MOTDParams) SetDefaults()
SetDefaults hydrates default values in the m o t d params (not the query body).
All values with no default are reset to their zero value.
func (*MOTDParams) SetHTTPClient ¶
func (o *MOTDParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the m o t d params
func (*MOTDParams) SetTimeout ¶
func (o *MOTDParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the m o t d params
func (*MOTDParams) WithContext ¶
func (o *MOTDParams) WithContext(ctx context.Context) *MOTDParams
WithContext adds the context to the m o t d params
func (*MOTDParams) WithDefaults ¶
func (o *MOTDParams) WithDefaults() *MOTDParams
WithDefaults hydrates default values in the m o t d params (not the query body).
All values with no default are reset to their zero value.
func (*MOTDParams) WithHTTPClient ¶
func (o *MOTDParams) WithHTTPClient(client *http.Client) *MOTDParams
WithHTTPClient adds the HTTPClient to the m o t d params
func (*MOTDParams) WithTimeout ¶
func (o *MOTDParams) WithTimeout(timeout time.Duration) *MOTDParams
WithTimeout adds the timeout to the m o t d params
func (*MOTDParams) WriteToRequest ¶
func (o *MOTDParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type MOTDReader ¶
type MOTDReader struct {
// contains filtered or unexported fields
}
MOTDReader is a Reader for the MOTD structure.
func (*MOTDReader) ReadResponse ¶
func (o *MOTDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.