Documentation ¶
Index ¶
- type Client
- type ClientOption
- type ClientService
- type GetStatsOK
- type GetStatsOKBodyTuple0
- func (o *GetStatsOKBodyTuple0) ContextValidate(ctx context.Context, formats strfmt.Registry) error
- func (o *GetStatsOKBodyTuple0) MarshalBinary() ([]byte, error)
- func (o GetStatsOKBodyTuple0) MarshalJSON() ([]byte, error)
- func (o *GetStatsOKBodyTuple0) UnmarshalBinary(b []byte) error
- func (o *GetStatsOKBodyTuple0) UnmarshalJSON(raw []byte) error
- func (o *GetStatsOKBodyTuple0) Validate(formats strfmt.Registry) error
- type GetStatsParams
- func (o *GetStatsParams) SetContext(ctx context.Context)
- func (o *GetStatsParams) SetDefaults()
- func (o *GetStatsParams) SetHTTPClient(client *http.Client)
- func (o *GetStatsParams) SetIncluderings(includerings *bool)
- func (o *GetStatsParams) SetServerID(serverID string)
- func (o *GetStatsParams) SetStatistic(statistic *string)
- func (o *GetStatsParams) SetTimeout(timeout time.Duration)
- func (o *GetStatsParams) WithContext(ctx context.Context) *GetStatsParams
- func (o *GetStatsParams) WithDefaults() *GetStatsParams
- func (o *GetStatsParams) WithHTTPClient(client *http.Client) *GetStatsParams
- func (o *GetStatsParams) WithIncluderings(includerings *bool) *GetStatsParams
- func (o *GetStatsParams) WithServerID(serverID string) *GetStatsParams
- func (o *GetStatsParams) WithStatistic(statistic *string) *GetStatsParams
- func (o *GetStatsParams) WithTimeout(timeout time.Duration) *GetStatsParams
- func (o *GetStatsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type GetStatsReader
- type GetStatsUnprocessableEntity
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 stats API
func (*Client) GetStats ¶
func (a *Client) GetStats(params *GetStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetStatsOK, error)
GetStats queries statistics
Query PowerDNS internal statistics.
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 { GetStats(params *GetStatsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetStatsOK, 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 stats API client.
type GetStatsOK ¶
type GetStatsOK struct {
Payload *GetStatsOKBodyTuple0
}
GetStatsOK describes a response with status code 200, with default header values.
List of Statistic Items
func NewGetStatsOK ¶
func NewGetStatsOK() *GetStatsOK
NewGetStatsOK creates a GetStatsOK with default headers values
func (*GetStatsOK) Error ¶
func (o *GetStatsOK) Error() string
func (*GetStatsOK) GetPayload ¶
func (o *GetStatsOK) GetPayload() *GetStatsOKBodyTuple0
type GetStatsOKBodyTuple0 ¶
type GetStatsOKBodyTuple0 struct { // p0 // Required: true P0 *models.StatisticItem `json:"-"` // custom serializer // p1 // Required: true P1 *models.MapStatisticItem `json:"-"` // custom serializer // p2 // Required: true P2 *models.RingStatisticItem `json:"-"` // custom serializer }
GetStatsOKBodyTuple0 GetStatsOKBodyTuple0 a representation of an anonymous Tuple type swagger:model GetStatsOKBodyTuple0
func (*GetStatsOKBodyTuple0) ContextValidate ¶
ContextValidate validate this get stats o k body tuple0 based on the context it is used
func (*GetStatsOKBodyTuple0) MarshalBinary ¶
func (o *GetStatsOKBodyTuple0) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (GetStatsOKBodyTuple0) MarshalJSON ¶
func (o GetStatsOKBodyTuple0) MarshalJSON() ([]byte, error)
MarshalJSON marshals this tuple type into a JSON array
func (*GetStatsOKBodyTuple0) UnmarshalBinary ¶
func (o *GetStatsOKBodyTuple0) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
func (*GetStatsOKBodyTuple0) UnmarshalJSON ¶
func (o *GetStatsOKBodyTuple0) UnmarshalJSON(raw []byte) error
UnmarshalJSON unmarshals this tuple type from a JSON array
type GetStatsParams ¶
type GetStatsParams struct { /* Includerings. “true” (default) or “false”, whether to include the Ring items, which can contain thousands of log messages or queried domains. Setting this to ”false” may make the response a lot smaller. Default: true */ Includerings *bool /* ServerID. The id of the server to retrieve */ ServerID string /* Statistic. When set to the name of a specific statistic, only this value is returned. If no statistic with that name exists, the response has a 422 status and an error message. */ Statistic *string Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
GetStatsParams contains all the parameters to send to the API endpoint
for the get stats operation. Typically these are written to a http.Request.
func NewGetStatsParams ¶
func NewGetStatsParams() *GetStatsParams
NewGetStatsParams creates a new GetStatsParams 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 NewGetStatsParamsWithContext ¶
func NewGetStatsParamsWithContext(ctx context.Context) *GetStatsParams
NewGetStatsParamsWithContext creates a new GetStatsParams object with the ability to set a context for a request.
func NewGetStatsParamsWithHTTPClient ¶
func NewGetStatsParamsWithHTTPClient(client *http.Client) *GetStatsParams
NewGetStatsParamsWithHTTPClient creates a new GetStatsParams object with the ability to set a custom HTTPClient for a request.
func NewGetStatsParamsWithTimeout ¶
func NewGetStatsParamsWithTimeout(timeout time.Duration) *GetStatsParams
NewGetStatsParamsWithTimeout creates a new GetStatsParams object with the ability to set a timeout on a request.
func (*GetStatsParams) SetContext ¶
func (o *GetStatsParams) SetContext(ctx context.Context)
SetContext adds the context to the get stats params
func (*GetStatsParams) SetDefaults ¶
func (o *GetStatsParams) SetDefaults()
SetDefaults hydrates default values in the get stats params (not the query body).
All values with no default are reset to their zero value.
func (*GetStatsParams) SetHTTPClient ¶
func (o *GetStatsParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the get stats params
func (*GetStatsParams) SetIncluderings ¶
func (o *GetStatsParams) SetIncluderings(includerings *bool)
SetIncluderings adds the includerings to the get stats params
func (*GetStatsParams) SetServerID ¶
func (o *GetStatsParams) SetServerID(serverID string)
SetServerID adds the serverId to the get stats params
func (*GetStatsParams) SetStatistic ¶
func (o *GetStatsParams) SetStatistic(statistic *string)
SetStatistic adds the statistic to the get stats params
func (*GetStatsParams) SetTimeout ¶
func (o *GetStatsParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the get stats params
func (*GetStatsParams) WithContext ¶
func (o *GetStatsParams) WithContext(ctx context.Context) *GetStatsParams
WithContext adds the context to the get stats params
func (*GetStatsParams) WithDefaults ¶
func (o *GetStatsParams) WithDefaults() *GetStatsParams
WithDefaults hydrates default values in the get stats params (not the query body).
All values with no default are reset to their zero value.
func (*GetStatsParams) WithHTTPClient ¶
func (o *GetStatsParams) WithHTTPClient(client *http.Client) *GetStatsParams
WithHTTPClient adds the HTTPClient to the get stats params
func (*GetStatsParams) WithIncluderings ¶
func (o *GetStatsParams) WithIncluderings(includerings *bool) *GetStatsParams
WithIncluderings adds the includerings to the get stats params
func (*GetStatsParams) WithServerID ¶
func (o *GetStatsParams) WithServerID(serverID string) *GetStatsParams
WithServerID adds the serverID to the get stats params
func (*GetStatsParams) WithStatistic ¶
func (o *GetStatsParams) WithStatistic(statistic *string) *GetStatsParams
WithStatistic adds the statistic to the get stats params
func (*GetStatsParams) WithTimeout ¶
func (o *GetStatsParams) WithTimeout(timeout time.Duration) *GetStatsParams
WithTimeout adds the timeout to the get stats params
func (*GetStatsParams) WriteToRequest ¶
func (o *GetStatsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type GetStatsReader ¶
type GetStatsReader struct {
// contains filtered or unexported fields
}
GetStatsReader is a Reader for the GetStats structure.
func (*GetStatsReader) ReadResponse ¶
func (o *GetStatsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.
type GetStatsUnprocessableEntity ¶
type GetStatsUnprocessableEntity struct { }
GetStatsUnprocessableEntity describes a response with status code 422, with default header values.
Returned when a non-existing statistic name has been requested. Contains an error message
func NewGetStatsUnprocessableEntity ¶
func NewGetStatsUnprocessableEntity() *GetStatsUnprocessableEntity
NewGetStatsUnprocessableEntity creates a GetStatsUnprocessableEntity with default headers values
func (*GetStatsUnprocessableEntity) Error ¶
func (o *GetStatsUnprocessableEntity) Error() string