metrics

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: MPL-2.0 Imports: 10 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 metrics API

func (*Client) GetBucketMetrics

func (a *Client) GetBucketMetrics(params *GetBucketMetricsParams, authInfo runtime.ClientAuthInfoWriter) (*GetBucketMetricsOK, error)
GetBucketMetrics gets all daily utilizations for specific bucket

When the start & end dates are not provided, the metrics for the last day will be returned.

The date range used must be at least a day apart, and only beginning times are allowed (e.g. 2019-01-01T00:00:00)

func (*Client) GetStackMetrics

func (a *Client) GetStackMetrics(params *GetStackMetricsParams, authInfo runtime.ClientAuthInfoWriter) (*GetStackMetricsOK, error)
GetStackMetrics gets all daily utilizations for all buckets on a stack

When the start & end dates are not provided, the metrics for the last day will be returned.

The date range used must be at least a day apart, and only beginning times are allowed (e.g. 2019-01-01T00:00:00)

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

type ClientService

type ClientService interface {
	GetBucketMetrics(params *GetBucketMetricsParams, authInfo runtime.ClientAuthInfoWriter) (*GetBucketMetricsOK, error)

	GetStackMetrics(params *GetStackMetricsParams, authInfo runtime.ClientAuthInfoWriter) (*GetStackMetricsOK, 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 GetBucketMetricsDefault

type GetBucketMetricsDefault struct {
	Payload *storage_models.StackpathapiStatus
	// contains filtered or unexported fields
}

GetBucketMetricsDefault handles this case with default header values.

Default error structure.

func NewGetBucketMetricsDefault

func NewGetBucketMetricsDefault(code int) *GetBucketMetricsDefault

NewGetBucketMetricsDefault creates a GetBucketMetricsDefault with default headers values

func (*GetBucketMetricsDefault) Code

func (o *GetBucketMetricsDefault) Code() int

Code gets the status code for the get bucket metrics default response

func (*GetBucketMetricsDefault) Error

func (o *GetBucketMetricsDefault) Error() string

func (*GetBucketMetricsDefault) GetPayload

type GetBucketMetricsInternalServerError

type GetBucketMetricsInternalServerError struct {
	Payload *storage_models.StackpathapiStatus
}

GetBucketMetricsInternalServerError handles this case with default header values.

Internal server error.

func NewGetBucketMetricsInternalServerError

func NewGetBucketMetricsInternalServerError() *GetBucketMetricsInternalServerError

NewGetBucketMetricsInternalServerError creates a GetBucketMetricsInternalServerError with default headers values

func (*GetBucketMetricsInternalServerError) Error

func (*GetBucketMetricsInternalServerError) GetPayload

type GetBucketMetricsOK

type GetBucketMetricsOK struct {
	Payload *storage_models.PrometheusMetrics
}

GetBucketMetricsOK handles this case with default header values.

GetBucketMetricsOK get bucket metrics o k

func NewGetBucketMetricsOK

func NewGetBucketMetricsOK() *GetBucketMetricsOK

NewGetBucketMetricsOK creates a GetBucketMetricsOK with default headers values

func (*GetBucketMetricsOK) Error

func (o *GetBucketMetricsOK) Error() string

func (*GetBucketMetricsOK) GetPayload

type GetBucketMetricsParams

type GetBucketMetricsParams struct {

	/*BucketID
	  The ID for the bucket to retrieve metrics for

	*/
	BucketID string
	/*EndTime
	  The end date for the range of metrics.

	*/
	EndTime *strfmt.DateTime
	/*StackID
	  The ID for the stack on which the bucket belongs to

	*/
	StackID string
	/*StartTime
	  The start date for the range of metrics.

	*/
	StartTime *strfmt.DateTime

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

GetBucketMetricsParams contains all the parameters to send to the API endpoint for the get bucket metrics operation typically these are written to a http.Request

func NewGetBucketMetricsParams

func NewGetBucketMetricsParams() *GetBucketMetricsParams

NewGetBucketMetricsParams creates a new GetBucketMetricsParams object with the default values initialized.

func NewGetBucketMetricsParamsWithContext

func NewGetBucketMetricsParamsWithContext(ctx context.Context) *GetBucketMetricsParams

NewGetBucketMetricsParamsWithContext creates a new GetBucketMetricsParams object with the default values initialized, and the ability to set a context for a request

func NewGetBucketMetricsParamsWithHTTPClient

func NewGetBucketMetricsParamsWithHTTPClient(client *http.Client) *GetBucketMetricsParams

NewGetBucketMetricsParamsWithHTTPClient creates a new GetBucketMetricsParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewGetBucketMetricsParamsWithTimeout

func NewGetBucketMetricsParamsWithTimeout(timeout time.Duration) *GetBucketMetricsParams

NewGetBucketMetricsParamsWithTimeout creates a new GetBucketMetricsParams object with the default values initialized, and the ability to set a timeout on a request

func (*GetBucketMetricsParams) SetBucketID

func (o *GetBucketMetricsParams) SetBucketID(bucketID string)

SetBucketID adds the bucketId to the get bucket metrics params

func (*GetBucketMetricsParams) SetContext

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

SetContext adds the context to the get bucket metrics params

func (*GetBucketMetricsParams) SetEndTime

func (o *GetBucketMetricsParams) SetEndTime(endTime *strfmt.DateTime)

SetEndTime adds the endTime to the get bucket metrics params

func (*GetBucketMetricsParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get bucket metrics params

func (*GetBucketMetricsParams) SetStackID

func (o *GetBucketMetricsParams) SetStackID(stackID string)

SetStackID adds the stackId to the get bucket metrics params

func (*GetBucketMetricsParams) SetStartTime

func (o *GetBucketMetricsParams) SetStartTime(startTime *strfmt.DateTime)

SetStartTime adds the startTime to the get bucket metrics params

func (*GetBucketMetricsParams) SetTimeout

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

SetTimeout adds the timeout to the get bucket metrics params

func (*GetBucketMetricsParams) WithBucketID

func (o *GetBucketMetricsParams) WithBucketID(bucketID string) *GetBucketMetricsParams

WithBucketID adds the bucketID to the get bucket metrics params

func (*GetBucketMetricsParams) WithContext

WithContext adds the context to the get bucket metrics params

func (*GetBucketMetricsParams) WithEndTime

WithEndTime adds the endTime to the get bucket metrics params

func (*GetBucketMetricsParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get bucket metrics params

func (*GetBucketMetricsParams) WithStackID

func (o *GetBucketMetricsParams) WithStackID(stackID string) *GetBucketMetricsParams

WithStackID adds the stackID to the get bucket metrics params

func (*GetBucketMetricsParams) WithStartTime

func (o *GetBucketMetricsParams) WithStartTime(startTime *strfmt.DateTime) *GetBucketMetricsParams

WithStartTime adds the startTime to the get bucket metrics params

func (*GetBucketMetricsParams) WithTimeout

WithTimeout adds the timeout to the get bucket metrics params

func (*GetBucketMetricsParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type GetBucketMetricsReader

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

GetBucketMetricsReader is a Reader for the GetBucketMetrics structure.

func (*GetBucketMetricsReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type GetBucketMetricsUnauthorized

type GetBucketMetricsUnauthorized struct {
	Payload *storage_models.StackpathapiStatus
}

GetBucketMetricsUnauthorized handles this case with default header values.

Returned when an unauthorized request is attempted.

func NewGetBucketMetricsUnauthorized

func NewGetBucketMetricsUnauthorized() *GetBucketMetricsUnauthorized

NewGetBucketMetricsUnauthorized creates a GetBucketMetricsUnauthorized with default headers values

func (*GetBucketMetricsUnauthorized) Error

func (*GetBucketMetricsUnauthorized) GetPayload

type GetStackMetricsDefault

type GetStackMetricsDefault struct {
	Payload *storage_models.StackpathapiStatus
	// contains filtered or unexported fields
}

GetStackMetricsDefault handles this case with default header values.

Default error structure.

func NewGetStackMetricsDefault

func NewGetStackMetricsDefault(code int) *GetStackMetricsDefault

NewGetStackMetricsDefault creates a GetStackMetricsDefault with default headers values

func (*GetStackMetricsDefault) Code

func (o *GetStackMetricsDefault) Code() int

Code gets the status code for the get stack metrics default response

func (*GetStackMetricsDefault) Error

func (o *GetStackMetricsDefault) Error() string

func (*GetStackMetricsDefault) GetPayload

type GetStackMetricsInternalServerError

type GetStackMetricsInternalServerError struct {
	Payload *storage_models.StackpathapiStatus
}

GetStackMetricsInternalServerError handles this case with default header values.

Internal server error.

func NewGetStackMetricsInternalServerError

func NewGetStackMetricsInternalServerError() *GetStackMetricsInternalServerError

NewGetStackMetricsInternalServerError creates a GetStackMetricsInternalServerError with default headers values

func (*GetStackMetricsInternalServerError) Error

func (*GetStackMetricsInternalServerError) GetPayload

type GetStackMetricsOK

type GetStackMetricsOK struct {
	Payload *storage_models.PrometheusMetrics
}

GetStackMetricsOK handles this case with default header values.

GetStackMetricsOK get stack metrics o k

func NewGetStackMetricsOK

func NewGetStackMetricsOK() *GetStackMetricsOK

NewGetStackMetricsOK creates a GetStackMetricsOK with default headers values

func (*GetStackMetricsOK) Error

func (o *GetStackMetricsOK) Error() string

func (*GetStackMetricsOK) GetPayload

type GetStackMetricsParams

type GetStackMetricsParams struct {

	/*EndTime
	  The end date for the range of metrics.

	*/
	EndTime *strfmt.DateTime
	/*StackID
	  The ID for the stack to collect metrics on

	*/
	StackID string
	/*StartTime
	  The start date for the range of metrics.

	*/
	StartTime *strfmt.DateTime

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

GetStackMetricsParams contains all the parameters to send to the API endpoint for the get stack metrics operation typically these are written to a http.Request

func NewGetStackMetricsParams

func NewGetStackMetricsParams() *GetStackMetricsParams

NewGetStackMetricsParams creates a new GetStackMetricsParams object with the default values initialized.

func NewGetStackMetricsParamsWithContext

func NewGetStackMetricsParamsWithContext(ctx context.Context) *GetStackMetricsParams

NewGetStackMetricsParamsWithContext creates a new GetStackMetricsParams object with the default values initialized, and the ability to set a context for a request

func NewGetStackMetricsParamsWithHTTPClient

func NewGetStackMetricsParamsWithHTTPClient(client *http.Client) *GetStackMetricsParams

NewGetStackMetricsParamsWithHTTPClient creates a new GetStackMetricsParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewGetStackMetricsParamsWithTimeout

func NewGetStackMetricsParamsWithTimeout(timeout time.Duration) *GetStackMetricsParams

NewGetStackMetricsParamsWithTimeout creates a new GetStackMetricsParams object with the default values initialized, and the ability to set a timeout on a request

func (*GetStackMetricsParams) SetContext

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

SetContext adds the context to the get stack metrics params

func (*GetStackMetricsParams) SetEndTime

func (o *GetStackMetricsParams) SetEndTime(endTime *strfmt.DateTime)

SetEndTime adds the endTime to the get stack metrics params

func (*GetStackMetricsParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the get stack metrics params

func (*GetStackMetricsParams) SetStackID

func (o *GetStackMetricsParams) SetStackID(stackID string)

SetStackID adds the stackId to the get stack metrics params

func (*GetStackMetricsParams) SetStartTime

func (o *GetStackMetricsParams) SetStartTime(startTime *strfmt.DateTime)

SetStartTime adds the startTime to the get stack metrics params

func (*GetStackMetricsParams) SetTimeout

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

SetTimeout adds the timeout to the get stack metrics params

func (*GetStackMetricsParams) WithContext

WithContext adds the context to the get stack metrics params

func (*GetStackMetricsParams) WithEndTime

func (o *GetStackMetricsParams) WithEndTime(endTime *strfmt.DateTime) *GetStackMetricsParams

WithEndTime adds the endTime to the get stack metrics params

func (*GetStackMetricsParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the get stack metrics params

func (*GetStackMetricsParams) WithStackID

func (o *GetStackMetricsParams) WithStackID(stackID string) *GetStackMetricsParams

WithStackID adds the stackID to the get stack metrics params

func (*GetStackMetricsParams) WithStartTime

func (o *GetStackMetricsParams) WithStartTime(startTime *strfmt.DateTime) *GetStackMetricsParams

WithStartTime adds the startTime to the get stack metrics params

func (*GetStackMetricsParams) WithTimeout

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

WithTimeout adds the timeout to the get stack metrics params

func (*GetStackMetricsParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type GetStackMetricsReader

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

GetStackMetricsReader is a Reader for the GetStackMetrics structure.

func (*GetStackMetricsReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type GetStackMetricsUnauthorized

type GetStackMetricsUnauthorized struct {
	Payload *storage_models.StackpathapiStatus
}

GetStackMetricsUnauthorized handles this case with default header values.

Returned when an unauthorized request is attempted.

func NewGetStackMetricsUnauthorized

func NewGetStackMetricsUnauthorized() *GetStackMetricsUnauthorized

NewGetStackMetricsUnauthorized creates a GetStackMetricsUnauthorized with default headers values

func (*GetStackMetricsUnauthorized) Error

func (*GetStackMetricsUnauthorized) GetPayload

Jump to

Keyboard shortcuts

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