usage_management

package
v0.0.0-...-33e56a9 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const GetSystemUsageInternalServerErrorCode int = 500

GetSystemUsageInternalServerErrorCode is the HTTP code returned for type GetSystemUsageInternalServerError

View Source
const GetSystemUsageOKCode int = 200

GetSystemUsageOKCode is the HTTP code returned for type GetSystemUsageOK

View Source
const GetUsageInternalServerErrorCode int = 500

GetUsageInternalServerErrorCode is the HTTP code returned for type GetUsageInternalServerError

View Source
const GetUsageNotFoundCode int = 404

GetUsageNotFoundCode is the HTTP code returned for type GetUsageNotFound

View Source
const GetUsageOKCode int = 200

GetUsageOKCode is the HTTP code returned for type GetUsageOK

Variables

This section is empty.

Functions

This section is empty.

Types

type GetSystemUsage

type GetSystemUsage struct {
	Context *middleware.Context
	Handler GetSystemUsageHandler
}

GetSystemUsage swagger:route GET /usage usageManagement getSystemUsage

Generates an aggregated response by account of the usage recorded in the system during the time-window specified

func NewGetSystemUsage

func NewGetSystemUsage(ctx *middleware.Context, handler GetSystemUsageHandler) *GetSystemUsage

NewGetSystemUsage creates a new http.Handler for the get system usage operation

func (*GetSystemUsage) ServeHTTP

func (o *GetSystemUsage) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type GetSystemUsageHandler

type GetSystemUsageHandler interface {
	Handle(GetSystemUsageParams, interface{}) middleware.Responder
}

GetSystemUsageHandler interface for that can handle valid get system usage params

type GetSystemUsageHandlerFunc

type GetSystemUsageHandlerFunc func(GetSystemUsageParams, interface{}) middleware.Responder

GetSystemUsageHandlerFunc turns a function with the right signature into a get system usage handler

func (GetSystemUsageHandlerFunc) Handle

func (fn GetSystemUsageHandlerFunc) Handle(params GetSystemUsageParams, principal interface{}) middleware.Responder

Handle executing the request and returning a response

type GetSystemUsageInternalServerError

type GetSystemUsageInternalServerError struct {

	/*
	  In: Body
	*/
	Payload *models.ErrorResponse `json:"body,omitempty"`
}

GetSystemUsageInternalServerError Something unexpected happend, error raised

swagger:response getSystemUsageInternalServerError

func NewGetSystemUsageInternalServerError

func NewGetSystemUsageInternalServerError() *GetSystemUsageInternalServerError

NewGetSystemUsageInternalServerError creates GetSystemUsageInternalServerError with default headers values

func (*GetSystemUsageInternalServerError) SetPayload

func (o *GetSystemUsageInternalServerError) SetPayload(payload *models.ErrorResponse)

SetPayload sets the payload to the get system usage internal server error response

func (*GetSystemUsageInternalServerError) WithPayload

WithPayload adds the payload to the get system usage internal server error response

func (*GetSystemUsageInternalServerError) WriteResponse

func (o *GetSystemUsageInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetSystemUsageOK

type GetSystemUsageOK struct {

	/*
	  In: Body
	*/
	Payload []*models.Usage `json:"body,omitempty"`
}

GetSystemUsageOK Description of a successfully operation

swagger:response getSystemUsageOK

func NewGetSystemUsageOK

func NewGetSystemUsageOK() *GetSystemUsageOK

NewGetSystemUsageOK creates GetSystemUsageOK with default headers values

func (*GetSystemUsageOK) SetPayload

func (o *GetSystemUsageOK) SetPayload(payload []*models.Usage)

SetPayload sets the payload to the get system usage o k response

func (*GetSystemUsageOK) WithPayload

func (o *GetSystemUsageOK) WithPayload(payload []*models.Usage) *GetSystemUsageOK

WithPayload adds the payload to the get system usage o k response

func (*GetSystemUsageOK) WriteResponse

func (o *GetSystemUsageOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetSystemUsageParams

type GetSystemUsageParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*Datetime from which to get the usage report
	  In: query
	*/
	From *int64
	/*Resource region to filter the usage
	  In: query
	*/
	Region *string
	/*Resource type to filter the usage
	  In: query
	*/
	Resource *string
	/*Datetime until which to get the usage report
	  In: query
	*/
	To *int64
}

GetSystemUsageParams contains all the bound params for the get system usage operation typically these are obtained from a http.Request

swagger:parameters getSystemUsage

func NewGetSystemUsageParams

func NewGetSystemUsageParams() GetSystemUsageParams

NewGetSystemUsageParams creates a new GetSystemUsageParams object no default values defined in spec.

func (*GetSystemUsageParams) BindRequest

func (o *GetSystemUsageParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewGetSystemUsageParams() beforehand.

type GetSystemUsageURL

type GetSystemUsageURL struct {
	From     *int64
	Region   *string
	Resource *string
	To       *int64
	// contains filtered or unexported fields
}

GetSystemUsageURL generates an URL for the get system usage operation

func (*GetSystemUsageURL) Build

func (o *GetSystemUsageURL) Build() (*url.URL, error)

Build a url path and query string

func (*GetSystemUsageURL) BuildFull

func (o *GetSystemUsageURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*GetSystemUsageURL) Must

func (o *GetSystemUsageURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*GetSystemUsageURL) SetBasePath

func (o *GetSystemUsageURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*GetSystemUsageURL) String

func (o *GetSystemUsageURL) String() string

String returns the string representation of the path with query string

func (*GetSystemUsageURL) StringFull

func (o *GetSystemUsageURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*GetSystemUsageURL) WithBasePath

func (o *GetSystemUsageURL) WithBasePath(bp string) *GetSystemUsageURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type GetUsage

type GetUsage struct {
	Context *middleware.Context
	Handler GetUsageHandler
}

GetUsage swagger:route GET /usage/{id} usageManagement getUsage

Generates an aggregated response of the usage recorded in the system during the time-window specified for the selected account

func NewGetUsage

func NewGetUsage(ctx *middleware.Context, handler GetUsageHandler) *GetUsage

NewGetUsage creates a new http.Handler for the get usage operation

func (*GetUsage) ServeHTTP

func (o *GetUsage) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type GetUsageHandler

type GetUsageHandler interface {
	Handle(GetUsageParams, interface{}) middleware.Responder
}

GetUsageHandler interface for that can handle valid get usage params

type GetUsageHandlerFunc

type GetUsageHandlerFunc func(GetUsageParams, interface{}) middleware.Responder

GetUsageHandlerFunc turns a function with the right signature into a get usage handler

func (GetUsageHandlerFunc) Handle

func (fn GetUsageHandlerFunc) Handle(params GetUsageParams, principal interface{}) middleware.Responder

Handle executing the request and returning a response

type GetUsageInternalServerError

type GetUsageInternalServerError struct {

	/*
	  In: Body
	*/
	Payload *models.ErrorResponse `json:"body,omitempty"`
}

GetUsageInternalServerError Something unexpected happend, error raised

swagger:response getUsageInternalServerError

func NewGetUsageInternalServerError

func NewGetUsageInternalServerError() *GetUsageInternalServerError

NewGetUsageInternalServerError creates GetUsageInternalServerError with default headers values

func (*GetUsageInternalServerError) SetPayload

func (o *GetUsageInternalServerError) SetPayload(payload *models.ErrorResponse)

SetPayload sets the payload to the get usage internal server error response

func (*GetUsageInternalServerError) WithPayload

WithPayload adds the payload to the get usage internal server error response

func (*GetUsageInternalServerError) WriteResponse

func (o *GetUsageInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetUsageNotFound

type GetUsageNotFound struct {

	/*
	  In: Body
	*/
	Payload *models.ErrorResponse `json:"body,omitempty"`
}

GetUsageNotFound Item not found in the system

swagger:response getUsageNotFound

func NewGetUsageNotFound

func NewGetUsageNotFound() *GetUsageNotFound

NewGetUsageNotFound creates GetUsageNotFound with default headers values

func (*GetUsageNotFound) SetPayload

func (o *GetUsageNotFound) SetPayload(payload *models.ErrorResponse)

SetPayload sets the payload to the get usage not found response

func (*GetUsageNotFound) WithPayload

func (o *GetUsageNotFound) WithPayload(payload *models.ErrorResponse) *GetUsageNotFound

WithPayload adds the payload to the get usage not found response

func (*GetUsageNotFound) WriteResponse

func (o *GetUsageNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetUsageOK

type GetUsageOK struct {

	/*
	  In: Body
	*/
	Payload *models.Usage `json:"body,omitempty"`
}

GetUsageOK Description of a successfully operation

swagger:response getUsageOK

func NewGetUsageOK

func NewGetUsageOK() *GetUsageOK

NewGetUsageOK creates GetUsageOK with default headers values

func (*GetUsageOK) SetPayload

func (o *GetUsageOK) SetPayload(payload *models.Usage)

SetPayload sets the payload to the get usage o k response

func (*GetUsageOK) WithPayload

func (o *GetUsageOK) WithPayload(payload *models.Usage) *GetUsageOK

WithPayload adds the payload to the get usage o k response

func (*GetUsageOK) WriteResponse

func (o *GetUsageOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetUsageParams

type GetUsageParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*Datetime from which to get the usage report
	  In: query
	*/
	From *int64
	/*Id of the account to be checked
	  Required: true
	  In: path
	*/
	ID string
	/*Resource region to filter the usage
	  In: query
	*/
	Region *string
	/*Resource type to filter the usage
	  In: query
	*/
	Resource *string
	/*Datetime until which to get the usage report
	  In: query
	*/
	To *int64
}

GetUsageParams contains all the bound params for the get usage operation typically these are obtained from a http.Request

swagger:parameters getUsage

func NewGetUsageParams

func NewGetUsageParams() GetUsageParams

NewGetUsageParams creates a new GetUsageParams object no default values defined in spec.

func (*GetUsageParams) BindRequest

func (o *GetUsageParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewGetUsageParams() beforehand.

type GetUsageURL

type GetUsageURL struct {
	ID string

	From     *int64
	Region   *string
	Resource *string
	To       *int64
	// contains filtered or unexported fields
}

GetUsageURL generates an URL for the get usage operation

func (*GetUsageURL) Build

func (o *GetUsageURL) Build() (*url.URL, error)

Build a url path and query string

func (*GetUsageURL) BuildFull

func (o *GetUsageURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*GetUsageURL) Must

func (o *GetUsageURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*GetUsageURL) SetBasePath

func (o *GetUsageURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*GetUsageURL) String

func (o *GetUsageURL) String() string

String returns the string representation of the path with query string

func (*GetUsageURL) StringFull

func (o *GetUsageURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*GetUsageURL) WithBasePath

func (o *GetUsageURL) WithBasePath(bp string) *GetUsageURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

Jump to

Keyboard shortcuts

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