package
0.3.0-beta.9
Repository: https://github.com/openmeterio/openmeter.git
Documentation: pkg.go.dev

# README

OpenMeter Go SDK

Install

go get github.com/openmeterio/openmeter

Usage

func main() {
    // Initialize OpenMeter client
    om, err := openmeter.NewClient("http://localhost:8888")
    if err != nil {
        panic(err.Error())
    }

    // Use OpenMeter client
    // ...
}

# Functions

GetSwagger returns the Swagger specification corresponding to the generated code in this file.
Creates a new Client, with reasonable defaults.
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling.
NewCreateMeterRequest calls the generic CreateMeter builder with application/json body.
NewCreateMeterRequestWithBody generates requests for CreateMeter with any type of body.
NewCreateNamespaceRequest calls the generic CreateNamespace builder with application/json body.
NewCreateNamespaceRequestWithBody generates requests for CreateNamespace with any type of body.
NewDeleteMeterRequest generates requests for DeleteMeter.
NewGetMeterRequest generates requests for GetMeter.
NewGetMeterValuesRequest generates requests for GetMeterValues.
NewIngestEventsRequest calls the generic IngestEvents builder with application/cloudevents+json body.
NewIngestEventsRequestWithBody generates requests for IngestEvents with any type of body.
NewListMetersRequest generates requests for ListMeters.
ParseCreateMeterResponse parses an HTTP response from a CreateMeterWithResponse call.
ParseCreateNamespaceResponse parses an HTTP response from a CreateNamespaceWithResponse call.
ParseDeleteMeterResponse parses an HTTP response from a DeleteMeterWithResponse call.
ParseGetMeterResponse parses an HTTP response from a GetMeterWithResponse call.
ParseGetMeterValuesResponse parses an HTTP response from a GetMeterValuesWithResponse call.
ParseIngestEventsResponse parses an HTTP response from a IngestEventsWithResponse call.
ParseListMetersResponse parses an HTTP response from a ListMetersWithResponse call.
Constructs a synthetic filesystem for resolving external references when loading openapi specifications.
WithBaseURL overrides the baseURL.
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client.
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request.

# Structs

Client which conforms to the OpenAPI3 specification for this service.
ClientWithResponses builds on ClientInterface to offer response payloads.
CreateMeterParams defines parameters for CreateMeter.
No description provided by the author
No description provided by the author
DeleteMeterParams defines parameters for DeleteMeter.
No description provided by the author
ErrResponse renderer type for handling all sorts of errors.
GetMeterParams defines parameters for GetMeter.
No description provided by the author
GetMeterValuesParams defines parameters for GetMeterValues.
No description provided by the author
IngestEventsParams defines parameters for IngestEvents.
No description provided by the author
ListMetersParams defines parameters for ListMeters.
No description provided by the author
Namespace defines model for Namespace.

# Interfaces

The interface specification for the client above.
ClientWithResponsesInterface is the interface specification for the client with responses above.
Doer performs HTTP requests.

# Type aliases

ClientOption allows setting custom parameters during construction.
CreateMeterJSONRequestBody defines body for CreateMeter for application/json ContentType.
CreateNamespaceJSONRequestBody defines body for CreateNamespace for application/json ContentType.
Event CloudEvents Specification JSON Schema.
IdOrSlug defines model for IdOrSlug.
IngestEventsJSONRequestBody defines body for IngestEvents for application/cloudevents+json ContentType.
Meter defines model for Meter.
MeterAggregation The aggregation type to use for the meter.
MeterIdOrSlug defines model for meterIdOrSlug.
MeterValue defines model for MeterValue.
NamespaceInput defines model for namespaceParam.
Problem A Problem Details object (RFC 7807).
RequestEditorFn is the function signature for the RequestEditor callback function.
WindowSize defines model for WindowSize.