Documentation
¶
Overview ¶
Package v3 provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT.
Index ¶
- func GetSwagger() (swagger *openapi3.T, err error)
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- type BadRequest
- type BadRequestError
- type BaseError
- type BillingAddress
- type BillingCustomer
- type BillingCustomerUsageAttribution
- type BillingEntitlementAccessResult
- type BillingEntitlementType
- type BillingSubscription
- type BillingSubscriptionCancel
- type BillingSubscriptionChange
- type BillingSubscriptionChangeResponse
- type BillingSubscriptionCreate
- type BillingSubscriptionEditTiming
- func (t BillingSubscriptionEditTiming) AsBillingSubscriptionEditTimingEnum() (BillingSubscriptionEditTimingEnum, error)
- func (t BillingSubscriptionEditTiming) AsDateTime() (DateTime, error)
- func (t *BillingSubscriptionEditTiming) FromBillingSubscriptionEditTimingEnum(v BillingSubscriptionEditTimingEnum) error
- func (t *BillingSubscriptionEditTiming) FromDateTime(v DateTime) error
- func (t BillingSubscriptionEditTiming) MarshalJSON() ([]byte, error)
- func (t *BillingSubscriptionEditTiming) MergeBillingSubscriptionEditTimingEnum(v BillingSubscriptionEditTimingEnum) error
- func (t *BillingSubscriptionEditTiming) MergeDateTime(v DateTime) error
- func (t *BillingSubscriptionEditTiming) UnmarshalJSON(b []byte) error
- type BillingSubscriptionEditTimingEnum
- type BillingSubscriptionStatus
- type CancelSubscriptionJSONRequestBody
- type ChangeSubscriptionJSONRequestBody
- type ChiServerOptions
- type Conflict
- type ConflictError
- type CountryCode
- type CreateCustomerJSONRequestBody
- type CreateCustomerRequest
- type CreateMeterJSONRequestBody
- type CreateMeterRequest
- type CreateSubscriptionJSONRequestBody
- type CurrencyCode
- type CustomerPagePaginatedResponse
- type DateTime
- type ExternalResourceKey
- type Forbidden
- type ForbiddenError
- type Gone
- type GoneError
- type IngestMeteringEventsApplicationCloudeventsBatchPlusJSONBody
- type IngestMeteringEventsApplicationCloudeventsBatchPlusJSONRequestBody
- type IngestMeteringEventsApplicationCloudeventsPlusJSONRequestBody
- type IngestMeteringEventsJSONBody
- type IngestMeteringEventsJSONBody1
- type IngestMeteringEventsJSONRequestBody
- type InvalidParamFormatError
- type InvalidParameterChoiceItem
- type InvalidParameterChoiceItemRule
- type InvalidParameterDependentItem
- type InvalidParameterDependentItemRule
- type InvalidParameterMaximumLength
- type InvalidParameterMaximumLengthRule
- type InvalidParameterMinimumLength
- type InvalidParameterMinimumLengthRule
- type InvalidParameterStandard
- type InvalidParameters
- type InvalidParameters_Item
- func (t InvalidParameters_Item) AsInvalidParameterChoiceItem() (InvalidParameterChoiceItem, error)
- func (t InvalidParameters_Item) AsInvalidParameterDependentItem() (InvalidParameterDependentItem, error)
- func (t InvalidParameters_Item) AsInvalidParameterMaximumLength() (InvalidParameterMaximumLength, error)
- func (t InvalidParameters_Item) AsInvalidParameterMinimumLength() (InvalidParameterMinimumLength, error)
- func (t InvalidParameters_Item) AsInvalidParameterStandard() (InvalidParameterStandard, error)
- func (t *InvalidParameters_Item) FromInvalidParameterChoiceItem(v InvalidParameterChoiceItem) error
- func (t *InvalidParameters_Item) FromInvalidParameterDependentItem(v InvalidParameterDependentItem) error
- func (t *InvalidParameters_Item) FromInvalidParameterMaximumLength(v InvalidParameterMaximumLength) error
- func (t *InvalidParameters_Item) FromInvalidParameterMinimumLength(v InvalidParameterMinimumLength) error
- func (t *InvalidParameters_Item) FromInvalidParameterStandard(v InvalidParameterStandard) error
- func (t InvalidParameters_Item) MarshalJSON() ([]byte, error)
- func (t *InvalidParameters_Item) MergeInvalidParameterChoiceItem(v InvalidParameterChoiceItem) error
- func (t *InvalidParameters_Item) MergeInvalidParameterDependentItem(v InvalidParameterDependentItem) error
- func (t *InvalidParameters_Item) MergeInvalidParameterMaximumLength(v InvalidParameterMaximumLength) error
- func (t *InvalidParameters_Item) MergeInvalidParameterMinimumLength(v InvalidParameterMinimumLength) error
- func (t *InvalidParameters_Item) MergeInvalidParameterStandard(v InvalidParameterStandard) error
- func (t *InvalidParameters_Item) UnmarshalJSON(b []byte) error
- type InvalidRules
- type Labels
- type ListCustomerEntitlementAccessResponseData
- type ListCustomersParams
- type ListCustomersParamsFilter
- type ListMetersParams
- type ListSubscriptionsParams
- type Meter
- type MeterAggregation
- type MeterPagePaginatedResponse
- type MeteringEvent
- type MeteringEventDatacontenttype
- type MiddlewareFunc
- type NotFound
- type NotFoundError
- type PageMeta
- type PagePaginationQuery
- type PaginatedMeta
- type RequiredHeaderError
- type RequiredParamError
- type ResourceKey
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) CancelSubscription(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ChangeSubscription(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateCustomer(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateMeter(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateSubscription(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteCustomer(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteMeter(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetCustomer(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetMeter(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetSubscription(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) IngestMeteringEvents(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListCustomerEntitlementAccess(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListCustomers(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListMeters(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListSubscriptions(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UnscheduleCancelation(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpsertCustomer(w http.ResponseWriter, r *http.Request)
- type SortQuery
- type SubscriptionPagePaginatedResponse
- type TooManyValuesForParamError
- type ULID
- type Unauthorized
- type UnauthorizedError
- type UnescapedCookieParamError
- type Unimplemented
- func (_ Unimplemented) CancelSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
- func (_ Unimplemented) ChangeSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
- func (_ Unimplemented) CreateCustomer(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) CreateMeter(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) CreateSubscription(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) DeleteCustomer(w http.ResponseWriter, r *http.Request, customerId ULID)
- func (_ Unimplemented) DeleteMeter(w http.ResponseWriter, r *http.Request, meterId ULID)
- func (_ Unimplemented) GetCustomer(w http.ResponseWriter, r *http.Request, customerId ULID)
- func (_ Unimplemented) GetMeter(w http.ResponseWriter, r *http.Request, meterId ULID)
- func (_ Unimplemented) GetSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
- func (_ Unimplemented) IngestMeteringEvents(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) ListCustomerEntitlementAccess(w http.ResponseWriter, r *http.Request, customerId ULID)
- func (_ Unimplemented) ListCustomers(w http.ResponseWriter, r *http.Request, params ListCustomersParams)
- func (_ Unimplemented) ListMeters(w http.ResponseWriter, r *http.Request, params ListMetersParams)
- func (_ Unimplemented) ListSubscriptions(w http.ResponseWriter, r *http.Request, params ListSubscriptionsParams)
- func (_ Unimplemented) UnscheduleCancelation(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
- func (_ Unimplemented) UpsertCustomer(w http.ResponseWriter, r *http.Request, customerId ULID)
- type UnmarshalingParamError
- type UpsertCustomerJSONRequestBody
- type UpsertCustomerRequest
- type UsageAttributionSubjectKey
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 Handler ¶
func Handler(si ServerInterface) http.Handler
Handler creates http.Handler with routing matching OpenAPI spec.
func HandlerFromMux ¶
func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
Types ¶
type BadRequestError ¶
type BadRequestError struct {
// Detail A human readable explanation specific to this occurence of the problem.
// This field may contain request/entity data to help the user understand
// what went wrong. Enclose variable values in square brackets. Should be
// provided as "Sentence case" for direct use in the UI.
Detail string `json:"detail"`
// Instance Used to return the correlation ID back to the user, in the format
// kong:trace:<correlation_id>. This helps us find the relevant logs
// when a customer reports an issue.
Instance string `json:"instance"`
// InvalidParameters invalid parameters
InvalidParameters InvalidParameters `json:"invalid_parameters"`
// Status The HTTP status code of the error. Useful when passing the response
// body to child properties in a frontend UI. Must be returned as an integer.
Status int `json:"status"`
// Title A short, human-readable summary of the problem. It should not
// change between occurences of a problem, except for localization.
// Should be provided as "Sentence case" for direct use in the UI.
Title string `json:"title"`
// Type The error type.
Type *string `json:"type,omitempty"`
}
BadRequestError defines model for BadRequestError.
type BaseError ¶
type BaseError struct {
// Detail A human readable explanation specific to this occurence of the problem.
// This field may contain request/entity data to help the user understand
// what went wrong. Enclose variable values in square brackets. Should be
// provided as "Sentence case" for direct use in the UI.
Detail string `json:"detail"`
// Instance Used to return the correlation ID back to the user, in the format
// kong:trace:<correlation_id>. This helps us find the relevant logs
// when a customer reports an issue.
Instance string `json:"instance"`
// Status The HTTP status code of the error. Useful when passing the response
// body to child properties in a frontend UI. Must be returned as an integer.
Status int `json:"status"`
// Title A short, human-readable summary of the problem. It should not
// change between occurences of a problem, except for localization.
// Should be provided as "Sentence case" for direct use in the UI.
Title string `json:"title"`
// Type The error type.
Type *string `json:"type,omitempty"`
}
BaseError standard error
type BillingAddress ¶
type BillingAddress struct {
// City City.
City *string `json:"city,omitempty"`
// Country Country code in [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) alpha-2 format.
Country *CountryCode `json:"country,omitempty"`
// Line1 First line of the address.
Line1 *string `json:"line1,omitempty"`
// Line2 Second line of the address.
Line2 *string `json:"line2,omitempty"`
// PhoneNumber Phone number.
PhoneNumber *string `json:"phone_number,omitempty"`
// PostalCode Postal code.
PostalCode *string `json:"postal_code,omitempty"`
// State State or province.
State *string `json:"state,omitempty"`
}
BillingAddress Address
type BillingCustomer ¶
type BillingCustomer struct {
// BillingAddress The billing address of the customer.
// Used for tax and invoicing.
BillingAddress *BillingAddress `json:"billing_address,omitempty"`
// CreatedAt An ISO-8601 timestamp representation of entity creation date.
CreatedAt *DateTime `json:"created_at,omitempty"`
// Currency Currency of the customer.
// Used for billing, tax and invoicing.
Currency *CurrencyCode `json:"currency,omitempty"`
// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
DeletedAt *DateTime `json:"deleted_at,omitempty"`
// Description Optional description of the resource.
//
// Maximum 1024 characters.
Description *string `json:"description,omitempty"`
Id ULID `json:"id"`
// Key ExternalResourceKey is a unique string that is used to identify a resource in an external system.
Key ExternalResourceKey `json:"key"`
// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
//
// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
Labels *Labels `json:"labels,omitempty"`
// Name Display name of the resource.
//
// Between 1 and 256 characters.
Name string `json:"name"`
// PrimaryEmail The primary email address of the customer.
PrimaryEmail *string `json:"primary_email,omitempty"`
// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
UpdatedAt *DateTime `json:"updated_at,omitempty"`
// UsageAttribution Mapping to attribute metered usage to the customer by the event subject.
UsageAttribution *BillingCustomerUsageAttribution `json:"usage_attribution,omitempty"`
}
BillingCustomer Customers can be individuals or organizations that can subscribe to plans and have access to features.
type BillingCustomerUsageAttribution ¶
type BillingCustomerUsageAttribution struct {
// SubjectKeys The subjects that are attributed to the customer.
// Can be empty when no usage event subjects are associated with the customer.
SubjectKeys []UsageAttributionSubjectKey `json:"subject_keys"`
}
BillingCustomerUsageAttribution Mapping to attribute metered usage to the customer. One customer can have zero or more subjects, but one subject can only belong to one customer.
type BillingEntitlementAccessResult ¶
type BillingEntitlementAccessResult struct {
// Config Only available for static entitlements.
// Config is the JSON parsable configuration of the entitlement.
// Useful to describe per customer configuration.
Config *string `json:"config,omitempty"`
// FeatureKey The feature key of the entitlement.
FeatureKey ResourceKey `json:"feature_key"`
// HasAccess Whether the customer has access to the feature.
// Always true for `boolean` and `static` entitlements.
// Depends on balance for `metered` entitlements.
HasAccess bool `json:"has_access"`
// Type The type of the entitlement.
Type BillingEntitlementType `json:"type"`
}
BillingEntitlementAccessResult Entitlement access result.
type BillingEntitlementType ¶
type BillingEntitlementType string
BillingEntitlementType The type of the entitlement.
const ( BillingEntitlementTypeBoolean BillingEntitlementType = "boolean" BillingEntitlementTypeMetered BillingEntitlementType = "metered" BillingEntitlementTypeStatic BillingEntitlementType = "static" )
Defines values for BillingEntitlementType.
type BillingSubscription ¶
type BillingSubscription struct {
// BillingAnchor A billing anchor is the fixed point in time that determines the subscription's recurring billing cycle.
// It affects when charges occur and how prorations are calculated.
// Common anchors:
// - Calendar month (1st of each month): `2025-01-01T00:00:00Z`
// - Subscription anniversary (day customer signed up)
// - Custom date (customer-specified day)
BillingAnchor DateTime `json:"billing_anchor"`
// CreatedAt An ISO-8601 timestamp representation of entity creation date.
CreatedAt *DateTime `json:"created_at,omitempty"`
// CustomerId The customer ID of the subscription.
CustomerId ULID `json:"customer_id"`
// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
DeletedAt *DateTime `json:"deleted_at,omitempty"`
Id ULID `json:"id"`
// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
//
// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
Labels *Labels `json:"labels,omitempty"`
// PlanId The plan ID of the subscription.
// Set if subscription is created from a plan.
PlanId *ULID `json:"plan_id,omitempty"`
// Status The status of the subscription.
Status BillingSubscriptionStatus `json:"status"`
// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
UpdatedAt *DateTime `json:"updated_at,omitempty"`
}
BillingSubscription Subscription.
type BillingSubscriptionCancel ¶
type BillingSubscriptionCancel struct {
// Timing If not provided the subscription is canceled immediately.
Timing *BillingSubscriptionEditTiming `json:"timing,omitempty"`
}
BillingSubscriptionCancel Request for canceling a subscription.
type BillingSubscriptionChange ¶
type BillingSubscriptionChange struct {
// BillingAnchor A billing anchor is the fixed point in time that determines the subscription's recurring billing cycle.
// It affects when charges occur and how prorations are calculated.
// Common anchors:
// - Calendar month (1st of each month): `2025-01-01T00:00:00Z`
// - Subscription anniversary (day customer signed up)
// - Custom date (customer-specified day)
//
// If not provided, the subscription will be created with the subscription's creation time as the billing anchor.
BillingAnchor *DateTime `json:"billing_anchor,omitempty"`
// Customer The customer to create the subscription for.
Customer struct {
// Id The ID of the customer to create the subscription for.
//
// Either customer ID or customer key must be provided.
// If both are provided, the ID will be used.
Id *ULID `json:"id,omitempty"`
// Key The key of the customer to create the subscription for.
//
// Either customer ID or customer key must be provided.
// If both are provided, the ID will be used.
Key *ExternalResourceKey `json:"key,omitempty"`
} `json:"customer"`
// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
//
// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
Labels *Labels `json:"labels,omitempty"`
// Plan The plan reference of the subscription.
Plan struct {
// Id The plan ID of the subscription.
// Set if subscription is created from a plan.
//
// ID or Key of the plan is required if creating a subscription from a plan.
// If both are provided, the ID will be used.
Id *ULID `json:"id,omitempty"`
// Key The plan Key of the subscription, if any.
// Set if subscription is created from a plan.
//
// ID or Key of the plan is required if creating a subscription from a plan.
// If both are provided, the ID will be used.
Key *ResourceKey `json:"key,omitempty"`
// Version The plan version of the subscription, if any.
// If not provided, the latest version of the plan will be used.
Version *int `json:"version,omitempty"`
} `json:"plan"`
// Timing Timing configuration for the change, when the change should take effect.
// For changing a subscription, the accepted values depend on the subscription configuration.
Timing BillingSubscriptionEditTiming `json:"timing"`
}
BillingSubscriptionChange Request for changing a subscription.
type BillingSubscriptionChangeResponse ¶
type BillingSubscriptionChangeResponse struct {
// Current The current subscription before the change.
Current BillingSubscription `json:"current"`
// Next The new state of the subscription after the change.
Next BillingSubscription `json:"next"`
}
BillingSubscriptionChangeResponse Response for changing a subscription.
type BillingSubscriptionCreate ¶
type BillingSubscriptionCreate struct {
// BillingAnchor A billing anchor is the fixed point in time that determines the subscription's recurring billing cycle.
// It affects when charges occur and how prorations are calculated.
// Common anchors:
// - Calendar month (1st of each month): `2025-01-01T00:00:00Z`
// - Subscription anniversary (day customer signed up)
// - Custom date (customer-specified day)
//
// If not provided, the subscription will be created with the subscription's creation time as the billing anchor.
BillingAnchor *DateTime `json:"billing_anchor,omitempty"`
// Customer The customer to create the subscription for.
Customer struct {
// Id The ID of the customer to create the subscription for.
//
// Either customer ID or customer key must be provided.
// If both are provided, the ID will be used.
Id *ULID `json:"id,omitempty"`
// Key The key of the customer to create the subscription for.
//
// Either customer ID or customer key must be provided.
// If both are provided, the ID will be used.
Key *ExternalResourceKey `json:"key,omitempty"`
} `json:"customer"`
// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
//
// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
Labels *Labels `json:"labels,omitempty"`
// Plan The plan reference of the subscription.
Plan struct {
// Id The plan ID of the subscription.
// Set if subscription is created from a plan.
//
// ID or Key of the plan is required if creating a subscription from a plan.
// If both are provided, the ID will be used.
Id *ULID `json:"id,omitempty"`
// Key The plan Key of the subscription, if any.
// Set if subscription is created from a plan.
//
// ID or Key of the plan is required if creating a subscription from a plan.
// If both are provided, the ID will be used.
Key *ResourceKey `json:"key,omitempty"`
// Version The plan version of the subscription, if any.
// If not provided, the latest version of the plan will be used.
Version *int `json:"version,omitempty"`
} `json:"plan"`
}
BillingSubscriptionCreate Subscription create request.
type BillingSubscriptionEditTiming ¶
type BillingSubscriptionEditTiming struct {
// contains filtered or unexported fields
}
BillingSubscriptionEditTiming Subscription edit timing defined when the changes should take effect. If the provided configuration is not supported by the subscription, an error will be returned.
func (BillingSubscriptionEditTiming) AsBillingSubscriptionEditTimingEnum ¶
func (t BillingSubscriptionEditTiming) AsBillingSubscriptionEditTimingEnum() (BillingSubscriptionEditTimingEnum, error)
AsBillingSubscriptionEditTimingEnum returns the union data inside the BillingSubscriptionEditTiming as a BillingSubscriptionEditTimingEnum
func (BillingSubscriptionEditTiming) AsDateTime ¶
func (t BillingSubscriptionEditTiming) AsDateTime() (DateTime, error)
AsDateTime returns the union data inside the BillingSubscriptionEditTiming as a DateTime
func (*BillingSubscriptionEditTiming) FromBillingSubscriptionEditTimingEnum ¶
func (t *BillingSubscriptionEditTiming) FromBillingSubscriptionEditTimingEnum(v BillingSubscriptionEditTimingEnum) error
FromBillingSubscriptionEditTimingEnum overwrites any union data inside the BillingSubscriptionEditTiming as the provided BillingSubscriptionEditTimingEnum
func (*BillingSubscriptionEditTiming) FromDateTime ¶
func (t *BillingSubscriptionEditTiming) FromDateTime(v DateTime) error
FromDateTime overwrites any union data inside the BillingSubscriptionEditTiming as the provided DateTime
func (BillingSubscriptionEditTiming) MarshalJSON ¶
func (t BillingSubscriptionEditTiming) MarshalJSON() ([]byte, error)
func (*BillingSubscriptionEditTiming) MergeBillingSubscriptionEditTimingEnum ¶
func (t *BillingSubscriptionEditTiming) MergeBillingSubscriptionEditTimingEnum(v BillingSubscriptionEditTimingEnum) error
MergeBillingSubscriptionEditTimingEnum performs a merge with any union data inside the BillingSubscriptionEditTiming, using the provided BillingSubscriptionEditTimingEnum
func (*BillingSubscriptionEditTiming) MergeDateTime ¶
func (t *BillingSubscriptionEditTiming) MergeDateTime(v DateTime) error
MergeDateTime performs a merge with any union data inside the BillingSubscriptionEditTiming, using the provided DateTime
func (*BillingSubscriptionEditTiming) UnmarshalJSON ¶
func (t *BillingSubscriptionEditTiming) UnmarshalJSON(b []byte) error
type BillingSubscriptionEditTimingEnum ¶
type BillingSubscriptionEditTimingEnum string
BillingSubscriptionEditTimingEnum Subscription edit timing. When immediate, the requested changes take effect immediately. When next_billing_cycle, the requested changes take effect at the next billing cycle.
const ( BillingSubscriptionEditTimingEnumImmediate BillingSubscriptionEditTimingEnum = "immediate" BillingSubscriptionEditTimingEnumNextBillingCycle BillingSubscriptionEditTimingEnum = "next_billing_cycle" )
Defines values for BillingSubscriptionEditTimingEnum.
type BillingSubscriptionStatus ¶
type BillingSubscriptionStatus string
BillingSubscriptionStatus Subscription status.
const ( BillingSubscriptionStatusActive BillingSubscriptionStatus = "active" BillingSubscriptionStatusCanceled BillingSubscriptionStatus = "canceled" BillingSubscriptionStatusInactive BillingSubscriptionStatus = "inactive" BillingSubscriptionStatusScheduled BillingSubscriptionStatus = "scheduled" )
Defines values for BillingSubscriptionStatus.
type CancelSubscriptionJSONRequestBody ¶
type CancelSubscriptionJSONRequestBody = BillingSubscriptionCancel
CancelSubscriptionJSONRequestBody defines body for CancelSubscription for application/json ContentType.
type ChangeSubscriptionJSONRequestBody ¶
type ChangeSubscriptionJSONRequestBody = BillingSubscriptionChange
ChangeSubscriptionJSONRequestBody defines body for ChangeSubscription for application/json ContentType.
type ChiServerOptions ¶
type ChiServerOptions struct {
BaseURL string
BaseRouter chi.Router
Middlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
type ConflictError ¶
type ConflictError struct {
Detail interface{} `json:"detail"`
Instance interface{} `json:"instance"`
Status interface{} `json:"status"`
Title interface{} `json:"title"`
Type interface{} `json:"type,omitempty"`
}
ConflictError defines model for ConflictError.
type CountryCode ¶
type CountryCode = string
CountryCode [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) alpha-2 country code. Custom two-letter country codes are also supported for convenience.
type CreateCustomerJSONRequestBody ¶
type CreateCustomerJSONRequestBody = CreateCustomerRequest
CreateCustomerJSONRequestBody defines body for CreateCustomer for application/json ContentType.
type CreateCustomerRequest ¶
type CreateCustomerRequest struct {
// BillingAddress The billing address of the customer.
// Used for tax and invoicing.
BillingAddress *BillingAddress `json:"billing_address,omitempty"`
// Currency Currency of the customer.
// Used for billing, tax and invoicing.
Currency *CurrencyCode `json:"currency,omitempty"`
// Description Optional description of the resource.
//
// Maximum 1024 characters.
Description *string `json:"description,omitempty"`
// Key ExternalResourceKey is a unique string that is used to identify a resource in an external system.
Key ExternalResourceKey `json:"key"`
// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
//
// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
Labels *Labels `json:"labels,omitempty"`
// Name Display name of the resource.
//
// Between 1 and 256 characters.
Name string `json:"name"`
// PrimaryEmail The primary email address of the customer.
PrimaryEmail *string `json:"primary_email,omitempty"`
// UsageAttribution Mapping to attribute metered usage to the customer by the event subject.
UsageAttribution *BillingCustomerUsageAttribution `json:"usage_attribution,omitempty"`
}
CreateCustomerRequest Customer create request.
type CreateMeterJSONRequestBody ¶
type CreateMeterJSONRequestBody = CreateMeterRequest
CreateMeterJSONRequestBody defines body for CreateMeter for application/json ContentType.
type CreateMeterRequest ¶
type CreateMeterRequest struct {
// Aggregation The aggregation type to use for the meter.
Aggregation MeterAggregation `json:"aggregation"`
// Description Optional description of the resource.
//
// Maximum 1024 characters.
Description *string `json:"description,omitempty"`
// Dimensions Named JSONPath expressions to extract the group by values from the event data.
//
// Keys must be unique and consist only alphanumeric and underscore characters.
Dimensions *map[string]string `json:"dimensions,omitempty"`
// EventType The event type to include in the aggregation.
EventType string `json:"event_type"`
// EventsFrom The date since the meter should include events.
// Useful to skip old events.
// If not specified, all historical events are included.
EventsFrom *DateTime `json:"events_from,omitempty"`
// Key A key is a unique string that is used to identify a resource.
Key ResourceKey `json:"key"`
// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
//
// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
Labels *Labels `json:"labels,omitempty"`
// Name Display name of the resource.
//
// Between 1 and 256 characters.
Name string `json:"name"`
// ValueProperty JSONPath expression to extract the value from the ingested event's data property.
//
// The ingested value for sum, avg, min, and max aggregations is a number or a string that can be parsed to a number.
//
// For unique_count aggregation, the ingested value must be a string. For count aggregation the value_property is ignored.
ValueProperty *string `json:"value_property,omitempty"`
}
CreateMeterRequest Meter create request.
type CreateSubscriptionJSONRequestBody ¶
type CreateSubscriptionJSONRequestBody = BillingSubscriptionCreate
CreateSubscriptionJSONRequestBody defines body for CreateSubscription for application/json ContentType.
type CurrencyCode ¶
type CurrencyCode = string
CurrencyCode Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code. Custom three-letter currency codes are also supported for convenience.
type CustomerPagePaginatedResponse ¶
type CustomerPagePaginatedResponse struct {
Data []BillingCustomer `json:"data"`
// Meta returns the pagination information
Meta PaginatedMeta `json:"meta"`
}
CustomerPagePaginatedResponse Page paginated response.
type DateTime ¶
DateTime [RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.
type ExternalResourceKey ¶
type ExternalResourceKey = string
ExternalResourceKey ExternalResourceKey is a unique string that is used to identify a resource in an external system.
type ForbiddenError ¶
type ForbiddenError struct {
Detail interface{} `json:"detail"`
Instance interface{} `json:"instance"`
Status interface{} `json:"status"`
Title interface{} `json:"title"`
Type interface{} `json:"type,omitempty"`
}
ForbiddenError defines model for ForbiddenError.
type GoneError ¶
type GoneError struct {
Detail interface{} `json:"detail"`
Instance interface{} `json:"instance"`
Status interface{} `json:"status"`
Title interface{} `json:"title"`
Type interface{} `json:"type,omitempty"`
}
GoneError defines model for GoneError.
type IngestMeteringEventsApplicationCloudeventsBatchPlusJSONBody ¶
type IngestMeteringEventsApplicationCloudeventsBatchPlusJSONBody = []MeteringEvent
IngestMeteringEventsApplicationCloudeventsBatchPlusJSONBody defines parameters for IngestMeteringEvents.
type IngestMeteringEventsApplicationCloudeventsBatchPlusJSONRequestBody ¶
type IngestMeteringEventsApplicationCloudeventsBatchPlusJSONRequestBody = IngestMeteringEventsApplicationCloudeventsBatchPlusJSONBody
IngestMeteringEventsApplicationCloudeventsBatchPlusJSONRequestBody defines body for IngestMeteringEvents for application/cloudevents-batch+json ContentType.
type IngestMeteringEventsApplicationCloudeventsPlusJSONRequestBody ¶
type IngestMeteringEventsApplicationCloudeventsPlusJSONRequestBody = MeteringEvent
IngestMeteringEventsApplicationCloudeventsPlusJSONRequestBody defines body for IngestMeteringEvents for application/cloudevents+json ContentType.
type IngestMeteringEventsJSONBody ¶
type IngestMeteringEventsJSONBody struct {
// contains filtered or unexported fields
}
IngestMeteringEventsJSONBody defines parameters for IngestMeteringEvents.
type IngestMeteringEventsJSONBody1 ¶
type IngestMeteringEventsJSONBody1 = []MeteringEvent
IngestMeteringEventsJSONBody1 defines parameters for IngestMeteringEvents.
type IngestMeteringEventsJSONRequestBody ¶
type IngestMeteringEventsJSONRequestBody IngestMeteringEventsJSONBody
IngestMeteringEventsJSONRequestBody defines body for IngestMeteringEvents for application/json ContentType.
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type InvalidParameterChoiceItem ¶
type InvalidParameterChoiceItem struct {
Choices []interface{} `json:"choices"`
Field string `json:"field"`
Reason string `json:"reason"`
// Rule invalid parameters rules
Rule InvalidParameterChoiceItemRule `json:"rule"`
Source *string `json:"source,omitempty"`
}
InvalidParameterChoiceItem defines model for InvalidParameterChoiceItem.
type InvalidParameterChoiceItemRule ¶
type InvalidParameterChoiceItemRule string
InvalidParameterChoiceItemRule invalid parameters rules
const (
InvalidParameterChoiceItemRuleEnum InvalidParameterChoiceItemRule = "enum"
)
Defines values for InvalidParameterChoiceItemRule.
type InvalidParameterDependentItem ¶
type InvalidParameterDependentItem struct {
Dependents nullable.Nullable[[]interface{}] `json:"dependents"`
Field string `json:"field"`
Reason string `json:"reason"`
// Rule invalid parameters rules
Rule nullable.Nullable[InvalidParameterDependentItemRule] `json:"rule"`
Source *string `json:"source,omitempty"`
}
InvalidParameterDependentItem defines model for InvalidParameterDependentItem.
type InvalidParameterDependentItemRule ¶
type InvalidParameterDependentItemRule string
InvalidParameterDependentItemRule invalid parameters rules
const (
InvalidParameterDependentItemRuleDependentFields InvalidParameterDependentItemRule = "dependent_fields"
)
Defines values for InvalidParameterDependentItemRule.
type InvalidParameterMaximumLength ¶
type InvalidParameterMaximumLength struct {
Field string `json:"field"`
Maximum int `json:"maximum"`
Reason string `json:"reason"`
// Rule invalid parameters rules
Rule InvalidParameterMaximumLengthRule `json:"rule"`
Source *string `json:"source,omitempty"`
}
InvalidParameterMaximumLength defines model for InvalidParameterMaximumLength.
type InvalidParameterMaximumLengthRule ¶
type InvalidParameterMaximumLengthRule string
InvalidParameterMaximumLengthRule invalid parameters rules
const ( InvalidParameterMaximumLengthRuleMax InvalidParameterMaximumLengthRule = "max" InvalidParameterMaximumLengthRuleMaxItems InvalidParameterMaximumLengthRule = "max_items" InvalidParameterMaximumLengthRuleMaxLength InvalidParameterMaximumLengthRule = "max_length" )
Defines values for InvalidParameterMaximumLengthRule.
type InvalidParameterMinimumLength ¶
type InvalidParameterMinimumLength struct {
Field string `json:"field"`
Minimum int `json:"minimum"`
Reason string `json:"reason"`
// Rule invalid parameters rules
Rule InvalidParameterMinimumLengthRule `json:"rule"`
Source *string `json:"source,omitempty"`
}
InvalidParameterMinimumLength defines model for InvalidParameterMinimumLength.
type InvalidParameterMinimumLengthRule ¶
type InvalidParameterMinimumLengthRule string
InvalidParameterMinimumLengthRule invalid parameters rules
const ( InvalidParameterMinimumLengthRuleMin InvalidParameterMinimumLengthRule = "min" InvalidParameterMinimumLengthRuleMinDigits InvalidParameterMinimumLengthRule = "min_digits" InvalidParameterMinimumLengthRuleMinItems InvalidParameterMinimumLengthRule = "min_items" InvalidParameterMinimumLengthRuleMinLength InvalidParameterMinimumLengthRule = "min_length" InvalidParameterMinimumLengthRuleMinLowercase InvalidParameterMinimumLengthRule = "min_lowercase" InvalidParameterMinimumLengthRuleMinSymbols InvalidParameterMinimumLengthRule = "min_symbols" InvalidParameterMinimumLengthRuleMinUppercase InvalidParameterMinimumLengthRule = "min_uppercase" )
Defines values for InvalidParameterMinimumLengthRule.
type InvalidParameterStandard ¶
type InvalidParameterStandard struct {
Field string `json:"field"`
Reason string `json:"reason"`
// Rule invalid parameters rules
Rule nullable.Nullable[InvalidRules] `json:"rule,omitempty"`
Source *string `json:"source,omitempty"`
}
InvalidParameterStandard defines model for InvalidParameterStandard.
type InvalidParameters ¶
type InvalidParameters = []InvalidParameters_Item
InvalidParameters invalid parameters
type InvalidParameters_Item ¶
type InvalidParameters_Item struct {
// contains filtered or unexported fields
}
InvalidParameters_Item defines model for InvalidParameters.Item.
func (InvalidParameters_Item) AsInvalidParameterChoiceItem ¶
func (t InvalidParameters_Item) AsInvalidParameterChoiceItem() (InvalidParameterChoiceItem, error)
AsInvalidParameterChoiceItem returns the union data inside the InvalidParameters_Item as a InvalidParameterChoiceItem
func (InvalidParameters_Item) AsInvalidParameterDependentItem ¶
func (t InvalidParameters_Item) AsInvalidParameterDependentItem() (InvalidParameterDependentItem, error)
AsInvalidParameterDependentItem returns the union data inside the InvalidParameters_Item as a InvalidParameterDependentItem
func (InvalidParameters_Item) AsInvalidParameterMaximumLength ¶
func (t InvalidParameters_Item) AsInvalidParameterMaximumLength() (InvalidParameterMaximumLength, error)
AsInvalidParameterMaximumLength returns the union data inside the InvalidParameters_Item as a InvalidParameterMaximumLength
func (InvalidParameters_Item) AsInvalidParameterMinimumLength ¶
func (t InvalidParameters_Item) AsInvalidParameterMinimumLength() (InvalidParameterMinimumLength, error)
AsInvalidParameterMinimumLength returns the union data inside the InvalidParameters_Item as a InvalidParameterMinimumLength
func (InvalidParameters_Item) AsInvalidParameterStandard ¶
func (t InvalidParameters_Item) AsInvalidParameterStandard() (InvalidParameterStandard, error)
AsInvalidParameterStandard returns the union data inside the InvalidParameters_Item as a InvalidParameterStandard
func (*InvalidParameters_Item) FromInvalidParameterChoiceItem ¶
func (t *InvalidParameters_Item) FromInvalidParameterChoiceItem(v InvalidParameterChoiceItem) error
FromInvalidParameterChoiceItem overwrites any union data inside the InvalidParameters_Item as the provided InvalidParameterChoiceItem
func (*InvalidParameters_Item) FromInvalidParameterDependentItem ¶
func (t *InvalidParameters_Item) FromInvalidParameterDependentItem(v InvalidParameterDependentItem) error
FromInvalidParameterDependentItem overwrites any union data inside the InvalidParameters_Item as the provided InvalidParameterDependentItem
func (*InvalidParameters_Item) FromInvalidParameterMaximumLength ¶
func (t *InvalidParameters_Item) FromInvalidParameterMaximumLength(v InvalidParameterMaximumLength) error
FromInvalidParameterMaximumLength overwrites any union data inside the InvalidParameters_Item as the provided InvalidParameterMaximumLength
func (*InvalidParameters_Item) FromInvalidParameterMinimumLength ¶
func (t *InvalidParameters_Item) FromInvalidParameterMinimumLength(v InvalidParameterMinimumLength) error
FromInvalidParameterMinimumLength overwrites any union data inside the InvalidParameters_Item as the provided InvalidParameterMinimumLength
func (*InvalidParameters_Item) FromInvalidParameterStandard ¶
func (t *InvalidParameters_Item) FromInvalidParameterStandard(v InvalidParameterStandard) error
FromInvalidParameterStandard overwrites any union data inside the InvalidParameters_Item as the provided InvalidParameterStandard
func (InvalidParameters_Item) MarshalJSON ¶
func (t InvalidParameters_Item) MarshalJSON() ([]byte, error)
func (*InvalidParameters_Item) MergeInvalidParameterChoiceItem ¶
func (t *InvalidParameters_Item) MergeInvalidParameterChoiceItem(v InvalidParameterChoiceItem) error
MergeInvalidParameterChoiceItem performs a merge with any union data inside the InvalidParameters_Item, using the provided InvalidParameterChoiceItem
func (*InvalidParameters_Item) MergeInvalidParameterDependentItem ¶
func (t *InvalidParameters_Item) MergeInvalidParameterDependentItem(v InvalidParameterDependentItem) error
MergeInvalidParameterDependentItem performs a merge with any union data inside the InvalidParameters_Item, using the provided InvalidParameterDependentItem
func (*InvalidParameters_Item) MergeInvalidParameterMaximumLength ¶
func (t *InvalidParameters_Item) MergeInvalidParameterMaximumLength(v InvalidParameterMaximumLength) error
MergeInvalidParameterMaximumLength performs a merge with any union data inside the InvalidParameters_Item, using the provided InvalidParameterMaximumLength
func (*InvalidParameters_Item) MergeInvalidParameterMinimumLength ¶
func (t *InvalidParameters_Item) MergeInvalidParameterMinimumLength(v InvalidParameterMinimumLength) error
MergeInvalidParameterMinimumLength performs a merge with any union data inside the InvalidParameters_Item, using the provided InvalidParameterMinimumLength
func (*InvalidParameters_Item) MergeInvalidParameterStandard ¶
func (t *InvalidParameters_Item) MergeInvalidParameterStandard(v InvalidParameterStandard) error
MergeInvalidParameterStandard performs a merge with any union data inside the InvalidParameters_Item, using the provided InvalidParameterStandard
func (*InvalidParameters_Item) UnmarshalJSON ¶
func (t *InvalidParameters_Item) UnmarshalJSON(b []byte) error
type InvalidRules ¶
type InvalidRules string
InvalidRules invalid parameters rules
const ( InvalidRulesInvalid InvalidRules = "invalid" InvalidRulesIsArn InvalidRules = "is_arn" InvalidRulesIsArray InvalidRules = "is_array" InvalidRulesIsBase64 InvalidRules = "is_base64" InvalidRulesIsBoolean InvalidRules = "is_boolean" InvalidRulesIsDateTime InvalidRules = "is_date_time" InvalidRulesIsFqdn InvalidRules = "is_fqdn" InvalidRulesIsInteger InvalidRules = "is_integer" InvalidRulesIsLabel InvalidRules = "is_label" InvalidRulesIsNull InvalidRules = "is_null" InvalidRulesIsNumber InvalidRules = "is_number" InvalidRulesIsObject InvalidRules = "is_object" InvalidRulesIsString InvalidRules = "is_string" InvalidRulesIsSupportedNetworkAvailabilityZoneList InvalidRules = "is_supported_network_availability_zone_list" InvalidRulesIsSupportedNetworkCidrBlock InvalidRules = "is_supported_network_cidr_block" InvalidRulesIsSupportedProviderRegion InvalidRules = "is_supported_provider_region" InvalidRulesIsUuid InvalidRules = "is_uuid" InvalidRulesMatchesRegex InvalidRules = "matches_regex" InvalidRulesMissingReference InvalidRules = "missing_reference" InvalidRulesRequired InvalidRules = "required" InvalidRulesType InvalidRules = "type" InvalidRulesUnknownProperty InvalidRules = "unknown_property" )
Defines values for InvalidRules.
type Labels ¶
Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
type ListCustomerEntitlementAccessResponseData ¶
type ListCustomerEntitlementAccessResponseData struct {
// Data The list of entitlement access results.
Data []BillingEntitlementAccessResult `json:"data"`
}
ListCustomerEntitlementAccessResponseData List customer entitlement access response data.
type ListCustomersParams ¶
type ListCustomersParams struct {
// Page Determines which page of the collection to retrieve.
Page *PagePaginationQuery `json:"page,omitempty"`
// Sort Sort customers returned in the response.
// Supported sort attributes are:
// - `id`
// - `name` (default)
// - `created_at`
//
// The `asc` suffix is optional as the default sort order is ascending.
// The `desc` suffix is used to specify a descending order.
Sort *SortQuery `form:"sort,omitempty" json:"sort,omitempty"`
// Filter Filter customers returned in the response.
//
// To filter customers by key add the following query param: filter[key]=my-db-id
Filter *ListCustomersParamsFilter `json:"filter,omitempty"`
}
ListCustomersParams defines parameters for ListCustomers.
type ListCustomersParamsFilter ¶
type ListCustomersParamsFilter struct {
// Key Filter customers by key.
// Case-insensitive partial match.
Key *ExternalResourceKey `json:"key,omitempty"`
}
ListCustomersParamsFilter Filter options for listing customers.
type ListMetersParams ¶
type ListMetersParams struct {
// Page Determines which page of the collection to retrieve.
Page *PagePaginationQuery `json:"page,omitempty"`
}
ListMetersParams defines parameters for ListMeters.
type ListSubscriptionsParams ¶
type ListSubscriptionsParams struct {
// Page Determines which page of the collection to retrieve.
Page *PagePaginationQuery `json:"page,omitempty"`
// Filter Filter subscriptions.
Filter *struct {
// CustomerId Filter subscriptions by customer ID.
CustomerId *ULID `json:"customer_id,omitempty"`
} `json:"filter,omitempty"`
}
ListSubscriptionsParams defines parameters for ListSubscriptions.
type Meter ¶
type Meter struct {
// Aggregation The aggregation type to use for the meter.
Aggregation MeterAggregation `json:"aggregation"`
// CreatedAt An ISO-8601 timestamp representation of entity creation date.
CreatedAt *DateTime `json:"created_at,omitempty"`
// DeletedAt An ISO-8601 timestamp representation of entity deletion date.
DeletedAt *DateTime `json:"deleted_at,omitempty"`
// Description Optional description of the resource.
//
// Maximum 1024 characters.
Description *string `json:"description,omitempty"`
// Dimensions Named JSONPath expressions to extract the group by values from the event data.
//
// Keys must be unique and consist only alphanumeric and underscore characters.
Dimensions *map[string]string `json:"dimensions,omitempty"`
// EventType The event type to include in the aggregation.
EventType string `json:"event_type"`
// EventsFrom The date since the meter should include events.
// Useful to skip old events.
// If not specified, all historical events are included.
EventsFrom *DateTime `json:"events_from,omitempty"`
Id ULID `json:"id"`
// Key A key is a unique string that is used to identify a resource.
Key ResourceKey `json:"key"`
// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
//
// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
Labels *Labels `json:"labels,omitempty"`
// Name Display name of the resource.
//
// Between 1 and 256 characters.
Name string `json:"name"`
// UpdatedAt An ISO-8601 timestamp representation of entity last update date.
UpdatedAt *DateTime `json:"updated_at,omitempty"`
// ValueProperty JSONPath expression to extract the value from the ingested event's data property.
//
// The ingested value for sum, avg, min, and max aggregations is a number or a string that can be parsed to a number.
//
// For unique_count aggregation, the ingested value must be a string. For count aggregation the value_property is ignored.
ValueProperty *string `json:"value_property,omitempty"`
}
Meter A meter is a configuration that defines how to match and aggregate events.
type MeterAggregation ¶
type MeterAggregation string
MeterAggregation The aggregation type to use for the meter.
const ( MeterAggregationAvg MeterAggregation = "avg" MeterAggregationCount MeterAggregation = "count" MeterAggregationLatest MeterAggregation = "latest" MeterAggregationMax MeterAggregation = "max" MeterAggregationMin MeterAggregation = "min" MeterAggregationSum MeterAggregation = "sum" MeterAggregationUniqueCount MeterAggregation = "unique_count" )
Defines values for MeterAggregation.
type MeterPagePaginatedResponse ¶
type MeterPagePaginatedResponse struct {
Data []Meter `json:"data"`
// Meta returns the pagination information
Meta PaginatedMeta `json:"meta"`
}
MeterPagePaginatedResponse Page paginated response.
type MeteringEvent ¶
type MeteringEvent struct {
// Data The event payload.
// Optional, if present it must be a JSON object.
Data nullable.Nullable[map[string]interface{}] `json:"data,omitempty"`
// Datacontenttype Content type of the CloudEvents data value. Only the value "application/json" is allowed over HTTP.
Datacontenttype nullable.Nullable[MeteringEventDatacontenttype] `json:"datacontenttype,omitempty"`
// Dataschema Identifies the schema that data adheres to.
Dataschema nullable.Nullable[string] `json:"dataschema,omitempty"`
// Id Identifies the event.
Id string `json:"id"`
// Source Identifies the context in which an event happened.
Source string `json:"source"`
// Specversion The version of the CloudEvents specification which the event uses.
Specversion string `json:"specversion"`
// Subject Describes the subject of the event in the context of the event producer (identified by source).
Subject string `json:"subject"`
// Time Timestamp of when the occurrence happened. Must adhere to RFC 3339.
Time nullable.Nullable[DateTime] `json:"time,omitempty"`
// Type Contains a value describing the type of event related to the originating occurrence.
Type string `json:"type"`
}
MeteringEvent Metering event following the CloudEvents specification.
type MeteringEventDatacontenttype ¶
type MeteringEventDatacontenttype string
MeteringEventDatacontenttype Content type of the CloudEvents data value. Only the value "application/json" is allowed over HTTP.
const (
MeteringEventDatacontenttypeApplicationjson MeteringEventDatacontenttype = "application/json"
)
Defines values for MeteringEventDatacontenttype.
type NotFoundError ¶
type NotFoundError struct {
Detail interface{} `json:"detail"`
Instance interface{} `json:"instance"`
Status interface{} `json:"status"`
Title interface{} `json:"title"`
Type interface{} `json:"type,omitempty"`
}
NotFoundError defines model for NotFoundError.
type PageMeta ¶
type PageMeta struct {
Number float32 `json:"number"`
Size float32 `json:"size"`
Total float32 `json:"total"`
}
PageMeta Contains pagination query parameters and the total number of objects returned.
type PagePaginationQuery ¶
type PagePaginationQuery struct {
Number *int `json:"number,omitempty"`
Size *int `json:"size,omitempty"`
}
PagePaginationQuery defines model for PagePaginationQuery.
type PaginatedMeta ¶
type PaginatedMeta struct {
// Page Contains pagination query parameters and the total number of objects returned.
Page PageMeta `json:"page"`
}
PaginatedMeta returns the pagination information
type RequiredHeaderError ¶
func (*RequiredHeaderError) Error ¶
func (e *RequiredHeaderError) Error() string
func (*RequiredHeaderError) Unwrap ¶
func (e *RequiredHeaderError) Unwrap() error
type RequiredParamError ¶
type RequiredParamError struct {
ParamName string
}
func (*RequiredParamError) Error ¶
func (e *RequiredParamError) Error() string
type ResourceKey ¶
type ResourceKey = string
ResourceKey A key is a unique string that is used to identify a resource.
type ServerInterface ¶
type ServerInterface interface {
// List customers
// (GET /openmeter/customers)
ListCustomers(w http.ResponseWriter, r *http.Request, params ListCustomersParams)
// Create customer
// (POST /openmeter/customers)
CreateCustomer(w http.ResponseWriter, r *http.Request)
// Delete customer
// (DELETE /openmeter/customers/{customerId})
DeleteCustomer(w http.ResponseWriter, r *http.Request, customerId ULID)
// Get customer
// (GET /openmeter/customers/{customerId})
GetCustomer(w http.ResponseWriter, r *http.Request, customerId ULID)
// Upsert customer
// (PUT /openmeter/customers/{customerId})
UpsertCustomer(w http.ResponseWriter, r *http.Request, customerId ULID)
// List customer entitlement access
// (GET /openmeter/customers/{customerId}/entitlement-access)
ListCustomerEntitlementAccess(w http.ResponseWriter, r *http.Request, customerId ULID)
// Ingest metering events
// (POST /openmeter/events)
IngestMeteringEvents(w http.ResponseWriter, r *http.Request)
// List meters
// (GET /openmeter/meters)
ListMeters(w http.ResponseWriter, r *http.Request, params ListMetersParams)
// Create meter
// (POST /openmeter/meters)
CreateMeter(w http.ResponseWriter, r *http.Request)
// Delete meter
// (DELETE /openmeter/meters/{meterId})
DeleteMeter(w http.ResponseWriter, r *http.Request, meterId ULID)
// Get meter
// (GET /openmeter/meters/{meterId})
GetMeter(w http.ResponseWriter, r *http.Request, meterId ULID)
// List subscriptions
// (GET /openmeter/subscriptions)
ListSubscriptions(w http.ResponseWriter, r *http.Request, params ListSubscriptionsParams)
// Create subscription
// (POST /openmeter/subscriptions)
CreateSubscription(w http.ResponseWriter, r *http.Request)
// Get subscription
// (GET /openmeter/subscriptions/{subscriptionId})
GetSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
// Cancel subscription
// (POST /openmeter/subscriptions/{subscriptionId}/cancel)
CancelSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
// Change subscription
// (POST /openmeter/subscriptions/{subscriptionId}/change)
ChangeSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
// Unschedule subscription cancelation
// (POST /openmeter/subscriptions/{subscriptionId}/unschedule-cancelation)
UnscheduleCancelation(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
}
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
HandlerMiddlewares []MiddlewareFunc
ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) CancelSubscription ¶
func (siw *ServerInterfaceWrapper) CancelSubscription(w http.ResponseWriter, r *http.Request)
CancelSubscription operation middleware
func (*ServerInterfaceWrapper) ChangeSubscription ¶
func (siw *ServerInterfaceWrapper) ChangeSubscription(w http.ResponseWriter, r *http.Request)
ChangeSubscription operation middleware
func (*ServerInterfaceWrapper) CreateCustomer ¶
func (siw *ServerInterfaceWrapper) CreateCustomer(w http.ResponseWriter, r *http.Request)
CreateCustomer operation middleware
func (*ServerInterfaceWrapper) CreateMeter ¶
func (siw *ServerInterfaceWrapper) CreateMeter(w http.ResponseWriter, r *http.Request)
CreateMeter operation middleware
func (*ServerInterfaceWrapper) CreateSubscription ¶
func (siw *ServerInterfaceWrapper) CreateSubscription(w http.ResponseWriter, r *http.Request)
CreateSubscription operation middleware
func (*ServerInterfaceWrapper) DeleteCustomer ¶
func (siw *ServerInterfaceWrapper) DeleteCustomer(w http.ResponseWriter, r *http.Request)
DeleteCustomer operation middleware
func (*ServerInterfaceWrapper) DeleteMeter ¶
func (siw *ServerInterfaceWrapper) DeleteMeter(w http.ResponseWriter, r *http.Request)
DeleteMeter operation middleware
func (*ServerInterfaceWrapper) GetCustomer ¶
func (siw *ServerInterfaceWrapper) GetCustomer(w http.ResponseWriter, r *http.Request)
GetCustomer operation middleware
func (*ServerInterfaceWrapper) GetMeter ¶
func (siw *ServerInterfaceWrapper) GetMeter(w http.ResponseWriter, r *http.Request)
GetMeter operation middleware
func (*ServerInterfaceWrapper) GetSubscription ¶
func (siw *ServerInterfaceWrapper) GetSubscription(w http.ResponseWriter, r *http.Request)
GetSubscription operation middleware
func (*ServerInterfaceWrapper) IngestMeteringEvents ¶
func (siw *ServerInterfaceWrapper) IngestMeteringEvents(w http.ResponseWriter, r *http.Request)
IngestMeteringEvents operation middleware
func (*ServerInterfaceWrapper) ListCustomerEntitlementAccess ¶
func (siw *ServerInterfaceWrapper) ListCustomerEntitlementAccess(w http.ResponseWriter, r *http.Request)
ListCustomerEntitlementAccess operation middleware
func (*ServerInterfaceWrapper) ListCustomers ¶
func (siw *ServerInterfaceWrapper) ListCustomers(w http.ResponseWriter, r *http.Request)
ListCustomers operation middleware
func (*ServerInterfaceWrapper) ListMeters ¶
func (siw *ServerInterfaceWrapper) ListMeters(w http.ResponseWriter, r *http.Request)
ListMeters operation middleware
func (*ServerInterfaceWrapper) ListSubscriptions ¶
func (siw *ServerInterfaceWrapper) ListSubscriptions(w http.ResponseWriter, r *http.Request)
ListSubscriptions operation middleware
func (*ServerInterfaceWrapper) UnscheduleCancelation ¶
func (siw *ServerInterfaceWrapper) UnscheduleCancelation(w http.ResponseWriter, r *http.Request)
UnscheduleCancelation operation middleware
func (*ServerInterfaceWrapper) UpsertCustomer ¶
func (siw *ServerInterfaceWrapper) UpsertCustomer(w http.ResponseWriter, r *http.Request)
UpsertCustomer operation middleware
type SortQuery ¶
type SortQuery = string
SortQuery The `asc` suffix is optional as the default sort order is ascending. The `desc` suffix is used to specify a descending order. Multiple sort attributes may be provided via a comma separated list. JSONPath notation may be used to specify a sub-attribute (eg: 'foo.bar desc').
type SubscriptionPagePaginatedResponse ¶
type SubscriptionPagePaginatedResponse struct {
Data []BillingSubscription `json:"data"`
// Meta returns the pagination information
Meta PaginatedMeta `json:"meta"`
}
SubscriptionPagePaginatedResponse Page paginated response.
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type ULID ¶
type ULID = string
ULID ULID (Universally Unique Lexicographically Sortable Identifier).
type Unauthorized ¶
type Unauthorized = UnauthorizedError
Unauthorized defines model for Unauthorized.
type UnauthorizedError ¶
type UnauthorizedError struct {
}
UnauthorizedError defines model for UnauthorizedError.
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type Unimplemented ¶
type Unimplemented struct{}
func (Unimplemented) CancelSubscription ¶
func (_ Unimplemented) CancelSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
Cancel subscription (POST /openmeter/subscriptions/{subscriptionId}/cancel)
func (Unimplemented) ChangeSubscription ¶
func (_ Unimplemented) ChangeSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
Change subscription (POST /openmeter/subscriptions/{subscriptionId}/change)
func (Unimplemented) CreateCustomer ¶
func (_ Unimplemented) CreateCustomer(w http.ResponseWriter, r *http.Request)
Create customer (POST /openmeter/customers)
func (Unimplemented) CreateMeter ¶
func (_ Unimplemented) CreateMeter(w http.ResponseWriter, r *http.Request)
Create meter (POST /openmeter/meters)
func (Unimplemented) CreateSubscription ¶
func (_ Unimplemented) CreateSubscription(w http.ResponseWriter, r *http.Request)
Create subscription (POST /openmeter/subscriptions)
func (Unimplemented) DeleteCustomer ¶
func (_ Unimplemented) DeleteCustomer(w http.ResponseWriter, r *http.Request, customerId ULID)
Delete customer (DELETE /openmeter/customers/{customerId})
func (Unimplemented) DeleteMeter ¶
func (_ Unimplemented) DeleteMeter(w http.ResponseWriter, r *http.Request, meterId ULID)
Delete meter (DELETE /openmeter/meters/{meterId})
func (Unimplemented) GetCustomer ¶
func (_ Unimplemented) GetCustomer(w http.ResponseWriter, r *http.Request, customerId ULID)
Get customer (GET /openmeter/customers/{customerId})
func (Unimplemented) GetMeter ¶
func (_ Unimplemented) GetMeter(w http.ResponseWriter, r *http.Request, meterId ULID)
Get meter (GET /openmeter/meters/{meterId})
func (Unimplemented) GetSubscription ¶
func (_ Unimplemented) GetSubscription(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
Get subscription (GET /openmeter/subscriptions/{subscriptionId})
func (Unimplemented) IngestMeteringEvents ¶
func (_ Unimplemented) IngestMeteringEvents(w http.ResponseWriter, r *http.Request)
Ingest metering events (POST /openmeter/events)
func (Unimplemented) ListCustomerEntitlementAccess ¶
func (_ Unimplemented) ListCustomerEntitlementAccess(w http.ResponseWriter, r *http.Request, customerId ULID)
List customer entitlement access (GET /openmeter/customers/{customerId}/entitlement-access)
func (Unimplemented) ListCustomers ¶
func (_ Unimplemented) ListCustomers(w http.ResponseWriter, r *http.Request, params ListCustomersParams)
List customers (GET /openmeter/customers)
func (Unimplemented) ListMeters ¶
func (_ Unimplemented) ListMeters(w http.ResponseWriter, r *http.Request, params ListMetersParams)
List meters (GET /openmeter/meters)
func (Unimplemented) ListSubscriptions ¶
func (_ Unimplemented) ListSubscriptions(w http.ResponseWriter, r *http.Request, params ListSubscriptionsParams)
List subscriptions (GET /openmeter/subscriptions)
func (Unimplemented) UnscheduleCancelation ¶
func (_ Unimplemented) UnscheduleCancelation(w http.ResponseWriter, r *http.Request, subscriptionId ULID)
Unschedule subscription cancelation (POST /openmeter/subscriptions/{subscriptionId}/unschedule-cancelation)
func (Unimplemented) UpsertCustomer ¶
func (_ Unimplemented) UpsertCustomer(w http.ResponseWriter, r *http.Request, customerId ULID)
Upsert customer (PUT /openmeter/customers/{customerId})
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error
type UpsertCustomerJSONRequestBody ¶
type UpsertCustomerJSONRequestBody = UpsertCustomerRequest
UpsertCustomerJSONRequestBody defines body for UpsertCustomer for application/json ContentType.
type UpsertCustomerRequest ¶
type UpsertCustomerRequest struct {
// BillingAddress The billing address of the customer.
// Used for tax and invoicing.
BillingAddress *BillingAddress `json:"billing_address,omitempty"`
// Currency Currency of the customer.
// Used for billing, tax and invoicing.
Currency *CurrencyCode `json:"currency,omitempty"`
// Description Optional description of the resource.
//
// Maximum 1024 characters.
Description *string `json:"description,omitempty"`
// Labels Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.
//
// Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
Labels *Labels `json:"labels,omitempty"`
// Name Display name of the resource.
//
// Between 1 and 256 characters.
Name string `json:"name"`
// PrimaryEmail The primary email address of the customer.
PrimaryEmail *string `json:"primary_email,omitempty"`
// UsageAttribution Mapping to attribute metered usage to the customer by the event subject.
UsageAttribution *BillingCustomerUsageAttribution `json:"usage_attribution,omitempty"`
}
UpsertCustomerRequest Customer upsert request.
type UsageAttributionSubjectKey ¶
type UsageAttributionSubjectKey = string
UsageAttributionSubjectKey Subject key.