Documentation
¶
Overview ¶
Package openmeter provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen/v2 version v2.0.0 DO NOT EDIT.
Index ¶
- func GetSwagger() (swagger *openapi3.T, err error)
- func NewCreateMeterRequest(server string, body CreateMeterJSONRequestBody) (*http.Request, error)
- func NewCreateMeterRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeleteMeterRequest(server string, meterIdOrSlug MeterIdOrSlug) (*http.Request, error)
- func NewGetMeterRequest(server string, meterIdOrSlug MeterIdOrSlug) (*http.Request, error)
- func NewIngestEventsRequestWithApplicationCloudeventsBatchPlusJSONBody(server string, body IngestEventsApplicationCloudeventsBatchPlusJSONRequestBody) (*http.Request, error)
- func NewIngestEventsRequestWithApplicationCloudeventsPlusJSONBody(server string, body IngestEventsApplicationCloudeventsPlusJSONRequestBody) (*http.Request, error)
- func NewIngestEventsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewListEventsRequest(server string, params *ListEventsParams) (*http.Request, error)
- func NewListMeterSubjectsRequest(server string, meterIdOrSlug MeterIdOrSlug) (*http.Request, error)
- func NewListMetersRequest(server string) (*http.Request, error)
- func NewQueryMeterRequest(server string, meterIdOrSlug MeterIdOrSlug, params *QueryMeterParams) (*http.Request, error)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- type BadRequestProblemResponse
- type Client
- func (c *Client) CreateMeter(ctx context.Context, body CreateMeterJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateMeterWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) DeleteMeter(ctx context.Context, meterIdOrSlug MeterIdOrSlug, ...) (*http.Response, error)
- func (c *Client) GetMeter(ctx context.Context, meterIdOrSlug MeterIdOrSlug, ...) (*http.Response, error)
- func (c *Client) IngestEventsWithApplicationCloudeventsBatchPlusJSONBody(ctx context.Context, ...) (*http.Response, error)
- func (c *Client) IngestEventsWithApplicationCloudeventsPlusJSONBody(ctx context.Context, ...) (*http.Response, error)
- func (c *Client) IngestEventsWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) ListEvents(ctx context.Context, params *ListEventsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListMeterSubjects(ctx context.Context, meterIdOrSlug MeterIdOrSlug, ...) (*http.Response, error)
- func (c *Client) ListMeters(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) QueryMeter(ctx context.Context, meterIdOrSlug MeterIdOrSlug, params *QueryMeterParams, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) CreateMeterWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateMeterResponse, error)
- func (c *ClientWithResponses) CreateMeterWithResponse(ctx context.Context, body CreateMeterJSONRequestBody, ...) (*CreateMeterResponse, error)
- func (c *ClientWithResponses) DeleteMeterWithResponse(ctx context.Context, meterIdOrSlug MeterIdOrSlug, ...) (*DeleteMeterResponse, error)
- func (c *ClientWithResponses) GetMeterWithResponse(ctx context.Context, meterIdOrSlug MeterIdOrSlug, ...) (*GetMeterResponse, error)
- func (c *ClientWithResponses) IngestEventsWithApplicationCloudeventsBatchPlusJSONBodyWithResponse(ctx context.Context, ...) (*IngestEventsResponse, error)
- func (c *ClientWithResponses) IngestEventsWithApplicationCloudeventsPlusJSONBodyWithResponse(ctx context.Context, ...) (*IngestEventsResponse, error)
- func (c *ClientWithResponses) IngestEventsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*IngestEventsResponse, error)
- func (c *ClientWithResponses) ListEventsWithResponse(ctx context.Context, params *ListEventsParams, reqEditors ...RequestEditorFn) (*ListEventsResponse, error)
- func (c *ClientWithResponses) ListMeterSubjectsWithResponse(ctx context.Context, meterIdOrSlug MeterIdOrSlug, ...) (*ListMeterSubjectsResponse, error)
- func (c *ClientWithResponses) ListMetersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListMetersResponse, error)
- func (c *ClientWithResponses) QueryMeterWithResponse(ctx context.Context, meterIdOrSlug MeterIdOrSlug, params *QueryMeterParams, ...) (*QueryMeterResponse, error)
- type ClientWithResponsesInterface
- type CreateMeterJSONRequestBody
- type CreateMeterResponse
- type DeleteMeterResponse
- type ErrResponse
- type Event
- type GetMeterResponse
- type HttpRequestDoer
- type IdOrSlug
- type IngestEventsApplicationCloudeventsBatchPlusJSONBody
- type IngestEventsApplicationCloudeventsBatchPlusJSONRequestBody
- type IngestEventsApplicationCloudeventsPlusJSONRequestBody
- type IngestEventsResponse
- type ListEventsParams
- type ListEventsResponse
- type ListMeterSubjectsResponse
- type ListMetersResponse
- type Meter
- type MeterAggregation
- type MeterIdOrSlug
- type MeterQueryRow
- type NotFoundProblemResponse
- type NotImplementedProblemResponse
- type Problem
- type QueryFrom
- type QueryGroupBy
- type QueryMeterParams
- type QueryMeterResponse
- type QuerySubject
- type QueryTo
- type QueryWindowSize
- type RequestEditorFn
- type UnexpectedProblemResponse
- type WindowSize
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.
func NewCreateMeterRequest ¶
func NewCreateMeterRequest(server string, body CreateMeterJSONRequestBody) (*http.Request, error)
NewCreateMeterRequest calls the generic CreateMeter builder with application/json body
func NewCreateMeterRequestWithBody ¶
func NewCreateMeterRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewCreateMeterRequestWithBody generates requests for CreateMeter with any type of body
func NewDeleteMeterRequest ¶
func NewDeleteMeterRequest(server string, meterIdOrSlug MeterIdOrSlug) (*http.Request, error)
NewDeleteMeterRequest generates requests for DeleteMeter
func NewGetMeterRequest ¶
func NewGetMeterRequest(server string, meterIdOrSlug MeterIdOrSlug) (*http.Request, error)
NewGetMeterRequest generates requests for GetMeter
func NewIngestEventsRequestWithApplicationCloudeventsBatchPlusJSONBody ¶
func NewIngestEventsRequestWithApplicationCloudeventsBatchPlusJSONBody(server string, body IngestEventsApplicationCloudeventsBatchPlusJSONRequestBody) (*http.Request, error)
NewIngestEventsRequestWithApplicationCloudeventsBatchPlusJSONBody calls the generic IngestEvents builder with application/cloudevents-batch+json body
func NewIngestEventsRequestWithApplicationCloudeventsPlusJSONBody ¶
func NewIngestEventsRequestWithApplicationCloudeventsPlusJSONBody(server string, body IngestEventsApplicationCloudeventsPlusJSONRequestBody) (*http.Request, error)
NewIngestEventsRequestWithApplicationCloudeventsPlusJSONBody calls the generic IngestEvents builder with application/cloudevents+json body
func NewIngestEventsRequestWithBody ¶
func NewIngestEventsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewIngestEventsRequestWithBody generates requests for IngestEvents with any type of body
func NewListEventsRequest ¶
func NewListEventsRequest(server string, params *ListEventsParams) (*http.Request, error)
NewListEventsRequest generates requests for ListEvents
func NewListMeterSubjectsRequest ¶
func NewListMeterSubjectsRequest(server string, meterIdOrSlug MeterIdOrSlug) (*http.Request, error)
NewListMeterSubjectsRequest generates requests for ListMeterSubjects
func NewListMetersRequest ¶
NewListMetersRequest generates requests for ListMeters
func NewQueryMeterRequest ¶
func NewQueryMeterRequest(server string, meterIdOrSlug MeterIdOrSlug, params *QueryMeterParams) (*http.Request, error)
NewQueryMeterRequest generates requests for QueryMeter
Types ¶
type BadRequestProblemResponse ¶
type BadRequestProblemResponse = Problem
BadRequestProblemResponse A Problem Details object (RFC 7807)
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) CreateMeter ¶
func (c *Client) CreateMeter(ctx context.Context, body CreateMeterJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateMeterWithBody ¶
func (*Client) DeleteMeter ¶
func (c *Client) DeleteMeter(ctx context.Context, meterIdOrSlug MeterIdOrSlug, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetMeter ¶
func (c *Client) GetMeter(ctx context.Context, meterIdOrSlug MeterIdOrSlug, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) IngestEventsWithApplicationCloudeventsBatchPlusJSONBody ¶
func (c *Client) IngestEventsWithApplicationCloudeventsBatchPlusJSONBody(ctx context.Context, body IngestEventsApplicationCloudeventsBatchPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) IngestEventsWithApplicationCloudeventsPlusJSONBody ¶
func (c *Client) IngestEventsWithApplicationCloudeventsPlusJSONBody(ctx context.Context, body IngestEventsApplicationCloudeventsPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) IngestEventsWithBody ¶
func (*Client) ListEvents ¶
func (c *Client) ListEvents(ctx context.Context, params *ListEventsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListMeterSubjects ¶
func (c *Client) ListMeterSubjects(ctx context.Context, meterIdOrSlug MeterIdOrSlug, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListMeters ¶
func (*Client) QueryMeter ¶
func (c *Client) QueryMeter(ctx context.Context, meterIdOrSlug MeterIdOrSlug, params *QueryMeterParams, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface {
// ListEvents request
ListEvents(ctx context.Context, params *ListEventsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// IngestEventsWithBody request with any body
IngestEventsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
IngestEventsWithApplicationCloudeventsPlusJSONBody(ctx context.Context, body IngestEventsApplicationCloudeventsPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
IngestEventsWithApplicationCloudeventsBatchPlusJSONBody(ctx context.Context, body IngestEventsApplicationCloudeventsBatchPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListMeters request
ListMeters(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateMeterWithBody request with any body
CreateMeterWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateMeter(ctx context.Context, body CreateMeterJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteMeter request
DeleteMeter(ctx context.Context, meterIdOrSlug MeterIdOrSlug, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetMeter request
GetMeter(ctx context.Context, meterIdOrSlug MeterIdOrSlug, reqEditors ...RequestEditorFn) (*http.Response, error)
// QueryMeter request
QueryMeter(ctx context.Context, meterIdOrSlug MeterIdOrSlug, params *QueryMeterParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListMeterSubjects request
ListMeterSubjects(ctx context.Context, meterIdOrSlug MeterIdOrSlug, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) CreateMeterWithBodyWithResponse ¶
func (c *ClientWithResponses) CreateMeterWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateMeterResponse, error)
CreateMeterWithBodyWithResponse request with arbitrary body returning *CreateMeterResponse
func (*ClientWithResponses) CreateMeterWithResponse ¶
func (c *ClientWithResponses) CreateMeterWithResponse(ctx context.Context, body CreateMeterJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMeterResponse, error)
func (*ClientWithResponses) DeleteMeterWithResponse ¶
func (c *ClientWithResponses) DeleteMeterWithResponse(ctx context.Context, meterIdOrSlug MeterIdOrSlug, reqEditors ...RequestEditorFn) (*DeleteMeterResponse, error)
DeleteMeterWithResponse request returning *DeleteMeterResponse
func (*ClientWithResponses) GetMeterWithResponse ¶
func (c *ClientWithResponses) GetMeterWithResponse(ctx context.Context, meterIdOrSlug MeterIdOrSlug, reqEditors ...RequestEditorFn) (*GetMeterResponse, error)
GetMeterWithResponse request returning *GetMeterResponse
func (*ClientWithResponses) IngestEventsWithApplicationCloudeventsBatchPlusJSONBodyWithResponse ¶
func (c *ClientWithResponses) IngestEventsWithApplicationCloudeventsBatchPlusJSONBodyWithResponse(ctx context.Context, body IngestEventsApplicationCloudeventsBatchPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*IngestEventsResponse, error)
func (*ClientWithResponses) IngestEventsWithApplicationCloudeventsPlusJSONBodyWithResponse ¶
func (c *ClientWithResponses) IngestEventsWithApplicationCloudeventsPlusJSONBodyWithResponse(ctx context.Context, body IngestEventsApplicationCloudeventsPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*IngestEventsResponse, error)
func (*ClientWithResponses) IngestEventsWithBodyWithResponse ¶
func (c *ClientWithResponses) IngestEventsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IngestEventsResponse, error)
IngestEventsWithBodyWithResponse request with arbitrary body returning *IngestEventsResponse
func (*ClientWithResponses) ListEventsWithResponse ¶
func (c *ClientWithResponses) ListEventsWithResponse(ctx context.Context, params *ListEventsParams, reqEditors ...RequestEditorFn) (*ListEventsResponse, error)
ListEventsWithResponse request returning *ListEventsResponse
func (*ClientWithResponses) ListMeterSubjectsWithResponse ¶
func (c *ClientWithResponses) ListMeterSubjectsWithResponse(ctx context.Context, meterIdOrSlug MeterIdOrSlug, reqEditors ...RequestEditorFn) (*ListMeterSubjectsResponse, error)
ListMeterSubjectsWithResponse request returning *ListMeterSubjectsResponse
func (*ClientWithResponses) ListMetersWithResponse ¶
func (c *ClientWithResponses) ListMetersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListMetersResponse, error)
ListMetersWithResponse request returning *ListMetersResponse
func (*ClientWithResponses) QueryMeterWithResponse ¶
func (c *ClientWithResponses) QueryMeterWithResponse(ctx context.Context, meterIdOrSlug MeterIdOrSlug, params *QueryMeterParams, reqEditors ...RequestEditorFn) (*QueryMeterResponse, error)
QueryMeterWithResponse request returning *QueryMeterResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// ListEventsWithResponse request
ListEventsWithResponse(ctx context.Context, params *ListEventsParams, reqEditors ...RequestEditorFn) (*ListEventsResponse, error)
// IngestEventsWithBodyWithResponse request with any body
IngestEventsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*IngestEventsResponse, error)
IngestEventsWithApplicationCloudeventsPlusJSONBodyWithResponse(ctx context.Context, body IngestEventsApplicationCloudeventsPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*IngestEventsResponse, error)
IngestEventsWithApplicationCloudeventsBatchPlusJSONBodyWithResponse(ctx context.Context, body IngestEventsApplicationCloudeventsBatchPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*IngestEventsResponse, error)
// ListMetersWithResponse request
ListMetersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListMetersResponse, error)
// CreateMeterWithBodyWithResponse request with any body
CreateMeterWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateMeterResponse, error)
CreateMeterWithResponse(ctx context.Context, body CreateMeterJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateMeterResponse, error)
// DeleteMeterWithResponse request
DeleteMeterWithResponse(ctx context.Context, meterIdOrSlug MeterIdOrSlug, reqEditors ...RequestEditorFn) (*DeleteMeterResponse, error)
// GetMeterWithResponse request
GetMeterWithResponse(ctx context.Context, meterIdOrSlug MeterIdOrSlug, reqEditors ...RequestEditorFn) (*GetMeterResponse, error)
// QueryMeterWithResponse request
QueryMeterWithResponse(ctx context.Context, meterIdOrSlug MeterIdOrSlug, params *QueryMeterParams, reqEditors ...RequestEditorFn) (*QueryMeterResponse, error)
// ListMeterSubjectsWithResponse request
ListMeterSubjectsWithResponse(ctx context.Context, meterIdOrSlug MeterIdOrSlug, reqEditors ...RequestEditorFn) (*ListMeterSubjectsResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type CreateMeterJSONRequestBody ¶
type CreateMeterJSONRequestBody = Meter
CreateMeterJSONRequestBody defines body for CreateMeter for application/json ContentType.
type CreateMeterResponse ¶
type CreateMeterResponse struct {
Body []byte
HTTPResponse *http.Response
JSON201 *Meter
ApplicationproblemJSON400 *BadRequestProblemResponse
ApplicationproblemJSON501 *NotImplementedProblemResponse
ApplicationproblemJSONDefault *UnexpectedProblemResponse
}
func ParseCreateMeterResponse ¶
func ParseCreateMeterResponse(rsp *http.Response) (*CreateMeterResponse, error)
ParseCreateMeterResponse parses an HTTP response from a CreateMeterWithResponse call
func (CreateMeterResponse) Status ¶
func (r CreateMeterResponse) Status() string
Status returns HTTPResponse.Status
func (CreateMeterResponse) StatusCode ¶
func (r CreateMeterResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type DeleteMeterResponse ¶
type DeleteMeterResponse struct {
Body []byte
HTTPResponse *http.Response
ApplicationproblemJSON404 *NotFoundProblemResponse
ApplicationproblemJSON501 *NotImplementedProblemResponse
ApplicationproblemJSONDefault *UnexpectedProblemResponse
}
func ParseDeleteMeterResponse ¶
func ParseDeleteMeterResponse(rsp *http.Response) (*DeleteMeterResponse, error)
ParseDeleteMeterResponse parses an HTTP response from a DeleteMeterWithResponse call
func (DeleteMeterResponse) Status ¶
func (r DeleteMeterResponse) Status() string
Status returns HTTPResponse.Status
func (DeleteMeterResponse) StatusCode ¶
func (r DeleteMeterResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ErrResponse ¶
type ErrResponse struct {
Err error `json:"-"` // low-level runtime error
StatusCode int `json:"statusCode"` // http response status code
StatusText string `json:"status"` // user-level status message
AppCode int64 `json:"code,omitempty"` // application-specific error code
Message string `json:"message,omitempty"` // application-level error message, for debugging
}
ErrResponse renderer type for handling all sorts of errors. In the best case scenario, the excellent github.com/pkg/errors package helps reveal information on the error, setting it on Err, and in the Render() method, using it to set the application-specific error code in AppCode.
type GetMeterResponse ¶
type GetMeterResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Meter
ApplicationproblemJSON404 *NotFoundProblemResponse
ApplicationproblemJSONDefault *UnexpectedProblemResponse
}
func ParseGetMeterResponse ¶
func ParseGetMeterResponse(rsp *http.Response) (*GetMeterResponse, error)
ParseGetMeterResponse parses an HTTP response from a GetMeterWithResponse call
func (GetMeterResponse) Status ¶
func (r GetMeterResponse) Status() string
Status returns HTTPResponse.Status
func (GetMeterResponse) StatusCode ¶
func (r GetMeterResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type IngestEventsApplicationCloudeventsBatchPlusJSONBody ¶
type IngestEventsApplicationCloudeventsBatchPlusJSONBody = []Event
IngestEventsApplicationCloudeventsBatchPlusJSONBody defines parameters for IngestEvents.
type IngestEventsApplicationCloudeventsBatchPlusJSONRequestBody ¶
type IngestEventsApplicationCloudeventsBatchPlusJSONRequestBody = IngestEventsApplicationCloudeventsBatchPlusJSONBody
IngestEventsApplicationCloudeventsBatchPlusJSONRequestBody defines body for IngestEvents for application/cloudevents-batch+json ContentType.
type IngestEventsApplicationCloudeventsPlusJSONRequestBody ¶
type IngestEventsApplicationCloudeventsPlusJSONRequestBody = Event
IngestEventsApplicationCloudeventsPlusJSONRequestBody defines body for IngestEvents for application/cloudevents+json ContentType.
type IngestEventsResponse ¶
type IngestEventsResponse struct {
Body []byte
HTTPResponse *http.Response
ApplicationproblemJSON400 *BadRequestProblemResponse
ApplicationproblemJSONDefault *UnexpectedProblemResponse
}
func ParseIngestEventsResponse ¶
func ParseIngestEventsResponse(rsp *http.Response) (*IngestEventsResponse, error)
ParseIngestEventsResponse parses an HTTP response from a IngestEventsWithResponse call
func (IngestEventsResponse) Status ¶
func (r IngestEventsResponse) Status() string
Status returns HTTPResponse.Status
func (IngestEventsResponse) StatusCode ¶
func (r IngestEventsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListEventsParams ¶
type ListEventsParams struct {
// Limit Number of events to return.
Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}
ListEventsParams defines parameters for ListEvents.
type ListEventsResponse ¶
type ListEventsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *[]Event
ApplicationproblemJSON400 *BadRequestProblemResponse
ApplicationproblemJSONDefault *UnexpectedProblemResponse
}
func ParseListEventsResponse ¶
func ParseListEventsResponse(rsp *http.Response) (*ListEventsResponse, error)
ParseListEventsResponse parses an HTTP response from a ListEventsWithResponse call
func (ListEventsResponse) Status ¶
func (r ListEventsResponse) Status() string
Status returns HTTPResponse.Status
func (ListEventsResponse) StatusCode ¶
func (r ListEventsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListMeterSubjectsResponse ¶
type ListMeterSubjectsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *[]string
ApplicationproblemJSON400 *BadRequestProblemResponse
ApplicationproblemJSONDefault *UnexpectedProblemResponse
}
func ParseListMeterSubjectsResponse ¶
func ParseListMeterSubjectsResponse(rsp *http.Response) (*ListMeterSubjectsResponse, error)
ParseListMeterSubjectsResponse parses an HTTP response from a ListMeterSubjectsWithResponse call
func (ListMeterSubjectsResponse) Status ¶
func (r ListMeterSubjectsResponse) Status() string
Status returns HTTPResponse.Status
func (ListMeterSubjectsResponse) StatusCode ¶
func (r ListMeterSubjectsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type ListMetersResponse ¶
type ListMetersResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *[]Meter
ApplicationproblemJSONDefault *UnexpectedProblemResponse
}
func ParseListMetersResponse ¶
func ParseListMetersResponse(rsp *http.Response) (*ListMetersResponse, error)
ParseListMetersResponse parses an HTTP response from a ListMetersWithResponse call
func (ListMetersResponse) Status ¶
func (r ListMetersResponse) Status() string
Status returns HTTPResponse.Status
func (ListMetersResponse) StatusCode ¶
func (r ListMetersResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type MeterAggregation ¶
type MeterAggregation = models.MeterAggregation
MeterAggregation The aggregation type to use for the meter.
type MeterQueryRow ¶
type MeterQueryRow = models.MeterQueryRow
MeterQueryRow defines model for MeterQueryRow.
type NotFoundProblemResponse ¶
type NotFoundProblemResponse = Problem
NotFoundProblemResponse A Problem Details object (RFC 7807)
type NotImplementedProblemResponse ¶
type NotImplementedProblemResponse = Problem
NotImplementedProblemResponse A Problem Details object (RFC 7807)
type QueryMeterParams ¶
type QueryMeterParams struct {
// From Start date-time in RFC 3339 format in UTC timezone.
// Must be aligned with the window size.
// Inclusive.
From *QueryFrom `form:"from,omitempty" json:"from,omitempty"`
// To End date-time in RFC 3339 format in UTC timezone.
// Must be aligned with the window size.
// Inclusive.
To *QueryTo `form:"to,omitempty" json:"to,omitempty"`
// WindowSize If not specified, a single usage aggregate will be returned for the entirety of the specified period for each subject and group.
WindowSize *QueryWindowSize `form:"windowSize,omitempty" json:"windowSize,omitempty"`
Subject *QuerySubject `form:"subject,omitempty" json:"subject,omitempty"`
// GroupBy If not specified a single aggregate will be returned for each subject and time window.
GroupBy *QueryGroupBy `form:"groupBy,omitempty" json:"groupBy,omitempty"`
}
QueryMeterParams defines parameters for QueryMeter.
type QueryMeterResponse ¶
type QueryMeterResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *struct {
Data []MeterQueryRow `json:"data"`
From *time.Time `json:"from,omitempty"`
To *time.Time `json:"to,omitempty"`
WindowSize *WindowSize `json:"windowSize,omitempty"`
}
ApplicationproblemJSON400 *BadRequestProblemResponse
ApplicationproblemJSONDefault *UnexpectedProblemResponse
}
func ParseQueryMeterResponse ¶
func ParseQueryMeterResponse(rsp *http.Response) (*QueryMeterResponse, error)
ParseQueryMeterResponse parses an HTTP response from a QueryMeterWithResponse call
func (QueryMeterResponse) Status ¶
func (r QueryMeterResponse) Status() string
Status returns HTTPResponse.Status
func (QueryMeterResponse) StatusCode ¶
func (r QueryMeterResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type QueryWindowSize ¶
type QueryWindowSize = WindowSize
QueryWindowSize defines model for queryWindowSize.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type UnexpectedProblemResponse ¶
type UnexpectedProblemResponse = Problem
UnexpectedProblemResponse A Problem Details object (RFC 7807)