Documentation
¶
Index ¶
- type Client
- type ClientOption
- type ClientService
- type GetMetricsDefault
- func (o *GetMetricsDefault) Code() int
- func (o *GetMetricsDefault) Error() string
- func (o *GetMetricsDefault) GetPayload() *workload_models.StackpathapiStatus
- func (o *GetMetricsDefault) IsClientError() bool
- func (o *GetMetricsDefault) IsCode(code int) bool
- func (o *GetMetricsDefault) IsRedirect() bool
- func (o *GetMetricsDefault) IsServerError() bool
- func (o *GetMetricsDefault) IsSuccess() bool
- func (o *GetMetricsDefault) String() string
- type GetMetricsInternalServerError
- func (o *GetMetricsInternalServerError) Code() int
- func (o *GetMetricsInternalServerError) Error() string
- func (o *GetMetricsInternalServerError) GetPayload() *workload_models.StackpathapiStatus
- func (o *GetMetricsInternalServerError) IsClientError() bool
- func (o *GetMetricsInternalServerError) IsCode(code int) bool
- func (o *GetMetricsInternalServerError) IsRedirect() bool
- func (o *GetMetricsInternalServerError) IsServerError() bool
- func (o *GetMetricsInternalServerError) IsSuccess() bool
- func (o *GetMetricsInternalServerError) String() string
- type GetMetricsOK
- func (o *GetMetricsOK) Code() int
- func (o *GetMetricsOK) Error() string
- func (o *GetMetricsOK) GetPayload() *workload_models.PrometheusMetrics
- func (o *GetMetricsOK) IsClientError() bool
- func (o *GetMetricsOK) IsCode(code int) bool
- func (o *GetMetricsOK) IsRedirect() bool
- func (o *GetMetricsOK) IsServerError() bool
- func (o *GetMetricsOK) IsSuccess() bool
- func (o *GetMetricsOK) String() string
- type GetMetricsParams
- func (o *GetMetricsParams) SetContext(ctx context.Context)
- func (o *GetMetricsParams) SetDefaults()
- func (o *GetMetricsParams) SetEndDate(endDate *strfmt.DateTime)
- func (o *GetMetricsParams) SetGranularity(granularity *string)
- func (o *GetMetricsParams) SetGroupBy(groupBy *string)
- func (o *GetMetricsParams) SetGrouping(grouping []string)
- func (o *GetMetricsParams) SetHTTPClient(client *http.Client)
- func (o *GetMetricsParams) SetInstanceName(instanceName *string)
- func (o *GetMetricsParams) SetPop(pop *string)
- func (o *GetMetricsParams) SetRegion(region *string)
- func (o *GetMetricsParams) SetStackID(stackID string)
- func (o *GetMetricsParams) SetStartDate(startDate *strfmt.DateTime)
- func (o *GetMetricsParams) SetTimeout(timeout time.Duration)
- func (o *GetMetricsParams) SetType(typeVar *string)
- func (o *GetMetricsParams) SetWorkloadID(workloadID *string)
- func (o *GetMetricsParams) WithContext(ctx context.Context) *GetMetricsParams
- func (o *GetMetricsParams) WithDefaults() *GetMetricsParams
- func (o *GetMetricsParams) WithEndDate(endDate *strfmt.DateTime) *GetMetricsParams
- func (o *GetMetricsParams) WithGranularity(granularity *string) *GetMetricsParams
- func (o *GetMetricsParams) WithGroupBy(groupBy *string) *GetMetricsParams
- func (o *GetMetricsParams) WithGrouping(grouping []string) *GetMetricsParams
- func (o *GetMetricsParams) WithHTTPClient(client *http.Client) *GetMetricsParams
- func (o *GetMetricsParams) WithInstanceName(instanceName *string) *GetMetricsParams
- func (o *GetMetricsParams) WithPop(pop *string) *GetMetricsParams
- func (o *GetMetricsParams) WithRegion(region *string) *GetMetricsParams
- func (o *GetMetricsParams) WithStackID(stackID string) *GetMetricsParams
- func (o *GetMetricsParams) WithStartDate(startDate *strfmt.DateTime) *GetMetricsParams
- func (o *GetMetricsParams) WithTimeout(timeout time.Duration) *GetMetricsParams
- func (o *GetMetricsParams) WithType(typeVar *string) *GetMetricsParams
- func (o *GetMetricsParams) WithWorkloadID(workloadID *string) *GetMetricsParams
- func (o *GetMetricsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type GetMetricsReader
- type GetMetricsUnauthorized
- func (o *GetMetricsUnauthorized) Code() int
- func (o *GetMetricsUnauthorized) Error() string
- func (o *GetMetricsUnauthorized) GetPayload() *workload_models.StackpathapiStatus
- func (o *GetMetricsUnauthorized) IsClientError() bool
- func (o *GetMetricsUnauthorized) IsCode(code int) bool
- func (o *GetMetricsUnauthorized) IsRedirect() bool
- func (o *GetMetricsUnauthorized) IsServerError() bool
- func (o *GetMetricsUnauthorized) IsSuccess() bool
- func (o *GetMetricsUnauthorized) String() string
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 metrics API
func (*Client) GetMetrics ¶
func (a *Client) GetMetrics(params *GetMetricsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetMetricsOK, error)
GetMetrics retrieves usage metrics for all workloads in a stack a specific workload or a specific instance in a workload
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 { GetMetrics(params *GetMetricsParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetMetricsOK, 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 metrics API client.
type GetMetricsDefault ¶
type GetMetricsDefault struct { Payload *workload_models.StackpathapiStatus // contains filtered or unexported fields }
GetMetricsDefault describes a response with status code -1, with default header values.
Default error structure.
func NewGetMetricsDefault ¶
func NewGetMetricsDefault(code int) *GetMetricsDefault
NewGetMetricsDefault creates a GetMetricsDefault with default headers values
func (*GetMetricsDefault) Code ¶
func (o *GetMetricsDefault) Code() int
Code gets the status code for the get metrics default response
func (*GetMetricsDefault) Error ¶
func (o *GetMetricsDefault) Error() string
func (*GetMetricsDefault) GetPayload ¶
func (o *GetMetricsDefault) GetPayload() *workload_models.StackpathapiStatus
func (*GetMetricsDefault) IsClientError ¶
func (o *GetMetricsDefault) IsClientError() bool
IsClientError returns true when this get metrics default response has a 4xx status code
func (*GetMetricsDefault) IsCode ¶
func (o *GetMetricsDefault) IsCode(code int) bool
IsCode returns true when this get metrics default response a status code equal to that given
func (*GetMetricsDefault) IsRedirect ¶
func (o *GetMetricsDefault) IsRedirect() bool
IsRedirect returns true when this get metrics default response has a 3xx status code
func (*GetMetricsDefault) IsServerError ¶
func (o *GetMetricsDefault) IsServerError() bool
IsServerError returns true when this get metrics default response has a 5xx status code
func (*GetMetricsDefault) IsSuccess ¶
func (o *GetMetricsDefault) IsSuccess() bool
IsSuccess returns true when this get metrics default response has a 2xx status code
func (*GetMetricsDefault) String ¶
func (o *GetMetricsDefault) String() string
type GetMetricsInternalServerError ¶
type GetMetricsInternalServerError struct {
Payload *workload_models.StackpathapiStatus
}
GetMetricsInternalServerError describes a response with status code 500, with default header values.
Internal server error.
func NewGetMetricsInternalServerError ¶
func NewGetMetricsInternalServerError() *GetMetricsInternalServerError
NewGetMetricsInternalServerError creates a GetMetricsInternalServerError with default headers values
func (*GetMetricsInternalServerError) Code ¶
func (o *GetMetricsInternalServerError) Code() int
Code gets the status code for the get metrics internal server error response
func (*GetMetricsInternalServerError) Error ¶
func (o *GetMetricsInternalServerError) Error() string
func (*GetMetricsInternalServerError) GetPayload ¶
func (o *GetMetricsInternalServerError) GetPayload() *workload_models.StackpathapiStatus
func (*GetMetricsInternalServerError) IsClientError ¶
func (o *GetMetricsInternalServerError) IsClientError() bool
IsClientError returns true when this get metrics internal server error response has a 4xx status code
func (*GetMetricsInternalServerError) IsCode ¶
func (o *GetMetricsInternalServerError) IsCode(code int) bool
IsCode returns true when this get metrics internal server error response a status code equal to that given
func (*GetMetricsInternalServerError) IsRedirect ¶
func (o *GetMetricsInternalServerError) IsRedirect() bool
IsRedirect returns true when this get metrics internal server error response has a 3xx status code
func (*GetMetricsInternalServerError) IsServerError ¶
func (o *GetMetricsInternalServerError) IsServerError() bool
IsServerError returns true when this get metrics internal server error response has a 5xx status code
func (*GetMetricsInternalServerError) IsSuccess ¶
func (o *GetMetricsInternalServerError) IsSuccess() bool
IsSuccess returns true when this get metrics internal server error response has a 2xx status code
func (*GetMetricsInternalServerError) String ¶
func (o *GetMetricsInternalServerError) String() string
type GetMetricsOK ¶
type GetMetricsOK struct {
Payload *workload_models.PrometheusMetrics
}
GetMetricsOK describes a response with status code 200, with default header values.
GetMetricsOK get metrics o k
func NewGetMetricsOK ¶
func NewGetMetricsOK() *GetMetricsOK
NewGetMetricsOK creates a GetMetricsOK with default headers values
func (*GetMetricsOK) Code ¶
func (o *GetMetricsOK) Code() int
Code gets the status code for the get metrics o k response
func (*GetMetricsOK) Error ¶
func (o *GetMetricsOK) Error() string
func (*GetMetricsOK) GetPayload ¶
func (o *GetMetricsOK) GetPayload() *workload_models.PrometheusMetrics
func (*GetMetricsOK) IsClientError ¶
func (o *GetMetricsOK) IsClientError() bool
IsClientError returns true when this get metrics o k response has a 4xx status code
func (*GetMetricsOK) IsCode ¶
func (o *GetMetricsOK) IsCode(code int) bool
IsCode returns true when this get metrics o k response a status code equal to that given
func (*GetMetricsOK) IsRedirect ¶
func (o *GetMetricsOK) IsRedirect() bool
IsRedirect returns true when this get metrics o k response has a 3xx status code
func (*GetMetricsOK) IsServerError ¶
func (o *GetMetricsOK) IsServerError() bool
IsServerError returns true when this get metrics o k response has a 5xx status code
func (*GetMetricsOK) IsSuccess ¶
func (o *GetMetricsOK) IsSuccess() bool
IsSuccess returns true when this get metrics o k response has a 2xx status code
func (*GetMetricsOK) String ¶
func (o *GetMetricsOK) String() string
type GetMetricsParams ¶
type GetMetricsParams struct { /* EndDate. An upper bound date to search metrics for. Format: date-time */ EndDate *strfmt.DateTime // Granularity. // // Default: "DEFAULT" Granularity *string // GroupBy. // // Default: "NONE" GroupBy *string /* Grouping. List of fields to group by. */ Grouping []string /* InstanceName. The name of instance name within a workload to filter metrics for. */ InstanceName *string /* Pop. A StackPath POP to filter traffic metrics for. This field does not apply when retrieving INSTANCE type metrics */ Pop *string // Region. // // Default: "ALL" Region *string /* StackID. The ID of the stack containing the workloads and instances to retrieve metrics for */ StackID string /* StartDate. A lower bound date to search metrics for. Format: date-time */ StartDate *strfmt.DateTime // Type. // // Default: "BANDWIDTH" Type *string /* WorkloadID. The ID of a workload to filter metrics for. */ WorkloadID *string Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
GetMetricsParams contains all the parameters to send to the API endpoint
for the get metrics operation. Typically these are written to a http.Request.
func NewGetMetricsParams ¶
func NewGetMetricsParams() *GetMetricsParams
NewGetMetricsParams creates a new GetMetricsParams 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 NewGetMetricsParamsWithContext ¶
func NewGetMetricsParamsWithContext(ctx context.Context) *GetMetricsParams
NewGetMetricsParamsWithContext creates a new GetMetricsParams object with the ability to set a context for a request.
func NewGetMetricsParamsWithHTTPClient ¶
func NewGetMetricsParamsWithHTTPClient(client *http.Client) *GetMetricsParams
NewGetMetricsParamsWithHTTPClient creates a new GetMetricsParams object with the ability to set a custom HTTPClient for a request.
func NewGetMetricsParamsWithTimeout ¶
func NewGetMetricsParamsWithTimeout(timeout time.Duration) *GetMetricsParams
NewGetMetricsParamsWithTimeout creates a new GetMetricsParams object with the ability to set a timeout on a request.
func (*GetMetricsParams) SetContext ¶
func (o *GetMetricsParams) SetContext(ctx context.Context)
SetContext adds the context to the get metrics params
func (*GetMetricsParams) SetDefaults ¶
func (o *GetMetricsParams) SetDefaults()
SetDefaults hydrates default values in the get metrics params (not the query body).
All values with no default are reset to their zero value.
func (*GetMetricsParams) SetEndDate ¶
func (o *GetMetricsParams) SetEndDate(endDate *strfmt.DateTime)
SetEndDate adds the endDate to the get metrics params
func (*GetMetricsParams) SetGranularity ¶
func (o *GetMetricsParams) SetGranularity(granularity *string)
SetGranularity adds the granularity to the get metrics params
func (*GetMetricsParams) SetGroupBy ¶
func (o *GetMetricsParams) SetGroupBy(groupBy *string)
SetGroupBy adds the groupBy to the get metrics params
func (*GetMetricsParams) SetGrouping ¶
func (o *GetMetricsParams) SetGrouping(grouping []string)
SetGrouping adds the grouping to the get metrics params
func (*GetMetricsParams) SetHTTPClient ¶
func (o *GetMetricsParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the get metrics params
func (*GetMetricsParams) SetInstanceName ¶
func (o *GetMetricsParams) SetInstanceName(instanceName *string)
SetInstanceName adds the instanceName to the get metrics params
func (*GetMetricsParams) SetPop ¶
func (o *GetMetricsParams) SetPop(pop *string)
SetPop adds the pop to the get metrics params
func (*GetMetricsParams) SetRegion ¶
func (o *GetMetricsParams) SetRegion(region *string)
SetRegion adds the region to the get metrics params
func (*GetMetricsParams) SetStackID ¶
func (o *GetMetricsParams) SetStackID(stackID string)
SetStackID adds the stackId to the get metrics params
func (*GetMetricsParams) SetStartDate ¶
func (o *GetMetricsParams) SetStartDate(startDate *strfmt.DateTime)
SetStartDate adds the startDate to the get metrics params
func (*GetMetricsParams) SetTimeout ¶
func (o *GetMetricsParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the get metrics params
func (*GetMetricsParams) SetType ¶
func (o *GetMetricsParams) SetType(typeVar *string)
SetType adds the type to the get metrics params
func (*GetMetricsParams) SetWorkloadID ¶
func (o *GetMetricsParams) SetWorkloadID(workloadID *string)
SetWorkloadID adds the workloadId to the get metrics params
func (*GetMetricsParams) WithContext ¶
func (o *GetMetricsParams) WithContext(ctx context.Context) *GetMetricsParams
WithContext adds the context to the get metrics params
func (*GetMetricsParams) WithDefaults ¶
func (o *GetMetricsParams) WithDefaults() *GetMetricsParams
WithDefaults hydrates default values in the get metrics params (not the query body).
All values with no default are reset to their zero value.
func (*GetMetricsParams) WithEndDate ¶
func (o *GetMetricsParams) WithEndDate(endDate *strfmt.DateTime) *GetMetricsParams
WithEndDate adds the endDate to the get metrics params
func (*GetMetricsParams) WithGranularity ¶
func (o *GetMetricsParams) WithGranularity(granularity *string) *GetMetricsParams
WithGranularity adds the granularity to the get metrics params
func (*GetMetricsParams) WithGroupBy ¶
func (o *GetMetricsParams) WithGroupBy(groupBy *string) *GetMetricsParams
WithGroupBy adds the groupBy to the get metrics params
func (*GetMetricsParams) WithGrouping ¶
func (o *GetMetricsParams) WithGrouping(grouping []string) *GetMetricsParams
WithGrouping adds the grouping to the get metrics params
func (*GetMetricsParams) WithHTTPClient ¶
func (o *GetMetricsParams) WithHTTPClient(client *http.Client) *GetMetricsParams
WithHTTPClient adds the HTTPClient to the get metrics params
func (*GetMetricsParams) WithInstanceName ¶
func (o *GetMetricsParams) WithInstanceName(instanceName *string) *GetMetricsParams
WithInstanceName adds the instanceName to the get metrics params
func (*GetMetricsParams) WithPop ¶
func (o *GetMetricsParams) WithPop(pop *string) *GetMetricsParams
WithPop adds the pop to the get metrics params
func (*GetMetricsParams) WithRegion ¶
func (o *GetMetricsParams) WithRegion(region *string) *GetMetricsParams
WithRegion adds the region to the get metrics params
func (*GetMetricsParams) WithStackID ¶
func (o *GetMetricsParams) WithStackID(stackID string) *GetMetricsParams
WithStackID adds the stackID to the get metrics params
func (*GetMetricsParams) WithStartDate ¶
func (o *GetMetricsParams) WithStartDate(startDate *strfmt.DateTime) *GetMetricsParams
WithStartDate adds the startDate to the get metrics params
func (*GetMetricsParams) WithTimeout ¶
func (o *GetMetricsParams) WithTimeout(timeout time.Duration) *GetMetricsParams
WithTimeout adds the timeout to the get metrics params
func (*GetMetricsParams) WithType ¶
func (o *GetMetricsParams) WithType(typeVar *string) *GetMetricsParams
WithType adds the typeVar to the get metrics params
func (*GetMetricsParams) WithWorkloadID ¶
func (o *GetMetricsParams) WithWorkloadID(workloadID *string) *GetMetricsParams
WithWorkloadID adds the workloadID to the get metrics params
func (*GetMetricsParams) WriteToRequest ¶
func (o *GetMetricsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type GetMetricsReader ¶
type GetMetricsReader struct {
// contains filtered or unexported fields
}
GetMetricsReader is a Reader for the GetMetrics structure.
func (*GetMetricsReader) ReadResponse ¶
func (o *GetMetricsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.
type GetMetricsUnauthorized ¶
type GetMetricsUnauthorized struct {
}GetMetricsUnauthorized describes a response with status code 401, with default header values.
Returned when an unauthorized request is attempted.
func NewGetMetricsUnauthorized ¶
func NewGetMetricsUnauthorized() *GetMetricsUnauthorized
NewGetMetricsUnauthorized creates a GetMetricsUnauthorized with default headers values
func (*GetMetricsUnauthorized) Code ¶
func (o *GetMetricsUnauthorized) Code() int
Code gets the status code for the get metrics unauthorized response
func (*GetMetricsUnauthorized) Error ¶
func (o *GetMetricsUnauthorized) Error() string
func (*GetMetricsUnauthorized) GetPayload ¶
func (o *GetMetricsUnauthorized) GetPayload() *workload_models.StackpathapiStatus
func (*GetMetricsUnauthorized) IsClientError ¶
func (o *GetMetricsUnauthorized) IsClientError() bool
IsClientError returns true when this get metrics unauthorized response has a 4xx status code
func (*GetMetricsUnauthorized) IsCode ¶
func (o *GetMetricsUnauthorized) IsCode(code int) bool
IsCode returns true when this get metrics unauthorized response a status code equal to that given
func (*GetMetricsUnauthorized) IsRedirect ¶
func (o *GetMetricsUnauthorized) IsRedirect() bool
IsRedirect returns true when this get metrics unauthorized response has a 3xx status code
func (*GetMetricsUnauthorized) IsServerError ¶
func (o *GetMetricsUnauthorized) IsServerError() bool
IsServerError returns true when this get metrics unauthorized response has a 5xx status code
func (*GetMetricsUnauthorized) IsSuccess ¶
func (o *GetMetricsUnauthorized) IsSuccess() bool
IsSuccess returns true when this get metrics unauthorized response has a 2xx status code
func (*GetMetricsUnauthorized) String ¶
func (o *GetMetricsUnauthorized) String() string