api

package
v1.0.0-beta.120 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package api provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen/v2 version v2.1.0 DO NOT EDIT.

Index

Constants

View Source
const (
	CloudCookieAuthScopes      = "CloudCookieAuth.Scopes"
	CloudPortalTokenAuthScopes = "CloudPortalTokenAuth.Scopes"
	CloudTokenAuthScopes       = "CloudTokenAuth.Scopes"
	PortalTokenAuthScopes      = "PortalTokenAuth.Scopes"
)

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

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 HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

Types

type BadRequestProblemResponse

type BadRequestProblemResponse = Problem

BadRequestProblemResponse A Problem Details object (RFC 7807). Additional properties specific to the problem type may be present.

type BalanceHistoryWindow

type BalanceHistoryWindow struct {
	// BalanceAtStart The entitlement balance at the start of the period.
	BalanceAtStart *float64 `json:"balanceAtStart,omitempty"`

	// Period A time period
	Period *Period `json:"period,omitempty"`

	// Usage The total usage of the feature in the period.
	Usage *float64 `json:"usage,omitempty"`
}

BalanceHistoryWindow Windowed usage and balance information.

type ChiServerOptions

type ChiServerOptions struct {
	BaseURL          string
	BaseRouter       chi.Router
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type ConflictProblem

type ConflictProblem struct {
	// Detail A human-readable explanation specific to this occurrence of the problem.
	Detail     string `json:"detail"`
	Extensions *struct {
		// ConflictingEntityId The id of the conflicting entity.
		ConflictingEntityId string `json:"conflictingEntityId"`
	} `json:"extensions,omitempty"`

	// Instance A URI reference that identifies the specific occurrence of the problem.
	Instance *string `json:"instance,omitempty"`

	// Status The HTTP status code generated by the origin server for this occurrence of the problem.
	Status int32 `json:"status"`

	// Title A a short, human-readable summary of the problem type.
	Title string `json:"title"`

	// Type Type contains a URI that identifies the problem type.
	Type                 string                 `json:"type"`
	AdditionalProperties map[string]interface{} `json:"-"`
}

ConflictProblem Conflict

func (ConflictProblem) Get

func (a ConflictProblem) Get(fieldName string) (value interface{}, found bool)

Getter for additional properties for ConflictProblem. Returns the specified element and whether it was found

func (ConflictProblem) MarshalJSON

func (a ConflictProblem) MarshalJSON() ([]byte, error)

Override default JSON handling for ConflictProblem to handle AdditionalProperties

func (*ConflictProblem) Set

func (a *ConflictProblem) Set(fieldName string, value interface{})

Setter for additional properties for ConflictProblem

func (*ConflictProblem) UnmarshalJSON

func (a *ConflictProblem) UnmarshalJSON(b []byte) error

Override default JSON handling for ConflictProblem to handle AdditionalProperties

type ConflictProblemResponse

type ConflictProblemResponse = ConflictProblem

ConflictProblemResponse Conflict

type CreateEntitlementJSONRequestBody

type CreateEntitlementJSONRequestBody = EntitlementCreateInputs

CreateEntitlementJSONRequestBody defines body for CreateEntitlement for application/json ContentType.

type CreateFeatureJSONRequestBody

type CreateFeatureJSONRequestBody = FeatureCreateInputs

CreateFeatureJSONRequestBody defines body for CreateFeature for application/json ContentType.

type CreateGrantJSONRequestBody

type CreateGrantJSONRequestBody = EntitlementGrantCreateInput

CreateGrantJSONRequestBody defines body for CreateGrant for application/json ContentType.

type CreateMeterJSONRequestBody

type CreateMeterJSONRequestBody = Meter

CreateMeterJSONRequestBody defines body for CreateMeter for application/json ContentType.

type CreatePortalTokenJSONRequestBody

type CreatePortalTokenJSONRequestBody = PortalToken

CreatePortalTokenJSONRequestBody defines body for CreatePortalToken for application/json ContentType.

type Entitlement

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

Entitlement defines model for Entitlement.

func (Entitlement) AsEntitlementBoolean

func (t Entitlement) AsEntitlementBoolean() (EntitlementBoolean, error)

AsEntitlementBoolean returns the union data inside the Entitlement as a EntitlementBoolean

func (Entitlement) AsEntitlementMetered

func (t Entitlement) AsEntitlementMetered() (EntitlementMetered, error)

AsEntitlementMetered returns the union data inside the Entitlement as a EntitlementMetered

func (Entitlement) AsEntitlementStatic

func (t Entitlement) AsEntitlementStatic() (EntitlementStatic, error)

AsEntitlementStatic returns the union data inside the Entitlement as a EntitlementStatic

func (Entitlement) Discriminator

func (t Entitlement) Discriminator() (string, error)

func (*Entitlement) FromEntitlementBoolean

func (t *Entitlement) FromEntitlementBoolean(v EntitlementBoolean) error

FromEntitlementBoolean overwrites any union data inside the Entitlement as the provided EntitlementBoolean

func (*Entitlement) FromEntitlementMetered

func (t *Entitlement) FromEntitlementMetered(v EntitlementMetered) error

FromEntitlementMetered overwrites any union data inside the Entitlement as the provided EntitlementMetered

func (*Entitlement) FromEntitlementStatic

func (t *Entitlement) FromEntitlementStatic(v EntitlementStatic) error

FromEntitlementStatic overwrites any union data inside the Entitlement as the provided EntitlementStatic

func (Entitlement) MarshalJSON

func (t Entitlement) MarshalJSON() ([]byte, error)

func (*Entitlement) MergeEntitlementBoolean

func (t *Entitlement) MergeEntitlementBoolean(v EntitlementBoolean) error

MergeEntitlementBoolean performs a merge with any union data inside the Entitlement, using the provided EntitlementBoolean

func (*Entitlement) MergeEntitlementMetered

func (t *Entitlement) MergeEntitlementMetered(v EntitlementMetered) error

MergeEntitlementMetered performs a merge with any union data inside the Entitlement, using the provided EntitlementMetered

func (*Entitlement) MergeEntitlementStatic

func (t *Entitlement) MergeEntitlementStatic(v EntitlementStatic) error

MergeEntitlementStatic performs a merge with any union data inside the Entitlement, using the provided EntitlementStatic

func (*Entitlement) UnmarshalJSON

func (t *Entitlement) UnmarshalJSON(b []byte) error

func (Entitlement) ValueByDiscriminator

func (t Entitlement) ValueByDiscriminator() (interface{}, error)

type EntitlementBoolean

type EntitlementBoolean struct {
	// CreatedAt The date and time the resource was created.
	CreatedAt *time.Time `json:"createdAt,omitempty"`

	// CurrentUsagePeriod A time period
	CurrentUsagePeriod *Period `json:"currentUsagePeriod,omitempty"`

	// DeletedAt The date and time the resource was deleted.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

	// FeatureId The feature the subject is entitled to use.
	// Either featureKey or featureId is required.
	FeatureId string `json:"featureId"`

	// FeatureKey The feature the subject is entitled to use.
	// Either featureKey or featureId is required.
	FeatureKey string `json:"featureKey"`

	// Id Readonly unique ULID identifier.
	Id *string `json:"id,omitempty"`

	// Metadata Additional metadata for the feature.
	Metadata *map[string]string `json:"metadata,omitempty"`

	// SubjectKey The identifier key unique to the subject
	SubjectKey string                 `json:"subjectKey"`
	Type       EntitlementBooleanType `json:"type"`

	// UpdatedAt The date and time the resource was last updated. The initial value is the same as createdAt.
	UpdatedAt *time.Time `json:"updatedAt,omitempty"`

	// UsagePeriod Recurring period of an entitlement.
	UsagePeriod *RecurringPeriod `json:"usagePeriod,omitempty"`
}

EntitlementBoolean defines model for EntitlementBoolean.

type EntitlementBooleanCreateInputs

type EntitlementBooleanCreateInputs struct {
	// FeatureId The feature the subject is entitled to use.
	// Either featureKey or featureId is required.
	FeatureId *string `json:"featureId,omitempty"`

	// FeatureKey The feature the subject is entitled to use.
	// Either featureKey or featureId is required.
	FeatureKey *string `json:"featureKey,omitempty"`

	// Metadata Additional metadata for the feature.
	Metadata *map[string]string                 `json:"metadata,omitempty"`
	Type     EntitlementBooleanCreateInputsType `json:"type"`

	// UsagePeriod Recurring period of an entitlement.
	UsagePeriod *RecurringPeriodCreateInput `json:"usagePeriod,omitempty"`
}

EntitlementBooleanCreateInputs defines model for EntitlementBooleanCreateInputs.

type EntitlementBooleanCreateInputsType

type EntitlementBooleanCreateInputsType string

EntitlementBooleanCreateInputsType defines model for EntitlementBooleanCreateInputs.Type.

const (
	EntitlementBooleanCreateInputsTypeBoolean EntitlementBooleanCreateInputsType = "boolean"
)

Defines values for EntitlementBooleanCreateInputsType.

type EntitlementBooleanType

type EntitlementBooleanType string

EntitlementBooleanType defines model for EntitlementBoolean.Type.

const (
	EntitlementBooleanTypeBoolean EntitlementBooleanType = "boolean"
)

Defines values for EntitlementBooleanType.

type EntitlementCreateInputs

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

EntitlementCreateInputs defines model for EntitlementCreateInputs.

func (EntitlementCreateInputs) AsEntitlementBooleanCreateInputs

func (t EntitlementCreateInputs) AsEntitlementBooleanCreateInputs() (EntitlementBooleanCreateInputs, error)

AsEntitlementBooleanCreateInputs returns the union data inside the EntitlementCreateInputs as a EntitlementBooleanCreateInputs

func (EntitlementCreateInputs) AsEntitlementMeteredCreateInputs

func (t EntitlementCreateInputs) AsEntitlementMeteredCreateInputs() (EntitlementMeteredCreateInputs, error)

AsEntitlementMeteredCreateInputs returns the union data inside the EntitlementCreateInputs as a EntitlementMeteredCreateInputs

func (EntitlementCreateInputs) AsEntitlementStaticCreateInputs

func (t EntitlementCreateInputs) AsEntitlementStaticCreateInputs() (EntitlementStaticCreateInputs, error)

AsEntitlementStaticCreateInputs returns the union data inside the EntitlementCreateInputs as a EntitlementStaticCreateInputs

func (EntitlementCreateInputs) Discriminator

func (t EntitlementCreateInputs) Discriminator() (string, error)

func (*EntitlementCreateInputs) FromEntitlementBooleanCreateInputs

func (t *EntitlementCreateInputs) FromEntitlementBooleanCreateInputs(v EntitlementBooleanCreateInputs) error

FromEntitlementBooleanCreateInputs overwrites any union data inside the EntitlementCreateInputs as the provided EntitlementBooleanCreateInputs

func (*EntitlementCreateInputs) FromEntitlementMeteredCreateInputs

func (t *EntitlementCreateInputs) FromEntitlementMeteredCreateInputs(v EntitlementMeteredCreateInputs) error

FromEntitlementMeteredCreateInputs overwrites any union data inside the EntitlementCreateInputs as the provided EntitlementMeteredCreateInputs

func (*EntitlementCreateInputs) FromEntitlementStaticCreateInputs

func (t *EntitlementCreateInputs) FromEntitlementStaticCreateInputs(v EntitlementStaticCreateInputs) error

FromEntitlementStaticCreateInputs overwrites any union data inside the EntitlementCreateInputs as the provided EntitlementStaticCreateInputs

func (EntitlementCreateInputs) MarshalJSON

func (t EntitlementCreateInputs) MarshalJSON() ([]byte, error)

func (*EntitlementCreateInputs) MergeEntitlementBooleanCreateInputs

func (t *EntitlementCreateInputs) MergeEntitlementBooleanCreateInputs(v EntitlementBooleanCreateInputs) error

MergeEntitlementBooleanCreateInputs performs a merge with any union data inside the EntitlementCreateInputs, using the provided EntitlementBooleanCreateInputs

func (*EntitlementCreateInputs) MergeEntitlementMeteredCreateInputs

func (t *EntitlementCreateInputs) MergeEntitlementMeteredCreateInputs(v EntitlementMeteredCreateInputs) error

MergeEntitlementMeteredCreateInputs performs a merge with any union data inside the EntitlementCreateInputs, using the provided EntitlementMeteredCreateInputs

func (*EntitlementCreateInputs) MergeEntitlementStaticCreateInputs

func (t *EntitlementCreateInputs) MergeEntitlementStaticCreateInputs(v EntitlementStaticCreateInputs) error

MergeEntitlementStaticCreateInputs performs a merge with any union data inside the EntitlementCreateInputs, using the provided EntitlementStaticCreateInputs

func (*EntitlementCreateInputs) UnmarshalJSON

func (t *EntitlementCreateInputs) UnmarshalJSON(b []byte) error

func (EntitlementCreateInputs) ValueByDiscriminator

func (t EntitlementCreateInputs) ValueByDiscriminator() (interface{}, error)

type EntitlementCreateSharedFields

type EntitlementCreateSharedFields struct {
	// FeatureId The feature the subject is entitled to use.
	// Either featureKey or featureId is required.
	FeatureId *string `json:"featureId,omitempty"`

	// FeatureKey The feature the subject is entitled to use.
	// Either featureKey or featureId is required.
	FeatureKey *string `json:"featureKey,omitempty"`

	// Metadata Additional metadata for the feature.
	Metadata *map[string]string `json:"metadata,omitempty"`

	// UsagePeriod Recurring period of an entitlement.
	UsagePeriod *RecurringPeriodCreateInput `json:"usagePeriod,omitempty"`
}

EntitlementCreateSharedFields defines model for EntitlementCreateSharedFields.

type EntitlementGrant

type EntitlementGrant struct {
	// Amount The amount to grant. Should be a positive number.
	Amount float64 `json:"amount"`

	// CreatedAt The date and time the resource was created.
	CreatedAt *time.Time `json:"createdAt,omitempty"`

	// DeletedAt The date and time the resource was deleted.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

	// EffectiveAt Effective date for grants and anchor for recurring grants. Provided value will be ceiled to metering windowSize (minute).
	EffectiveAt time.Time `json:"effectiveAt"`

	// EntitlementId The unique entitlement ULID that the grant is associated with.
	EntitlementId *string          `json:"entitlementId,omitempty"`
	Expiration    ExpirationPeriod `json:"expiration"`

	// ExpiresAt The expiration date of the grant.
	ExpiresAt *time.Time `json:"expiresAt,omitempty"`

	// Id Readonly unique ULID identifier.
	Id *string `json:"id,omitempty"`

	// MaxRolloverAmount Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset.
	//
	// Balance after the reset is calculated as:
	// Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))
	MaxRolloverAmount *float64           `json:"maxRolloverAmount,omitempty"`
	Metadata          *map[string]string `json:"metadata,omitempty"`

	// MinRolloverAmount Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset.
	//
	// Balance after the reset is calculated as:
	// Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))
	MinRolloverAmount *float64 `json:"minRolloverAmount,omitempty"`

	// NextRecurrence The next time the grant will recurr.
	NextRecurrence *time.Time `json:"nextRecurrence,omitempty"`

	// Priority The priority of the grant. Grants with higher priority are applied first.
	// Priority is a positive decimal numbers. With lower numbers indicating higher importance.
	// For example, a priority of 1 is more urgent than a priority of 2.
	// When there are several grants available for the same subject, the system selects the grant with the highest priority.
	// In cases where grants share the same priority level, the grant closest to its expiration will be used first.
	// In the case of two grants have identical priorities and expiration dates, the system will use the grant that was created first.
	Priority *int `json:"priority,omitempty"`

	// Recurrence Recurring period of an entitlement.
	Recurrence *RecurringPeriod `json:"recurrence,omitempty"`

	// UpdatedAt The date and time the resource was last updated. The initial value is the same as createdAt.
	UpdatedAt *time.Time `json:"updatedAt,omitempty"`

	// VoidedAt The date and time the grant was voided (cannot be used after that).
	VoidedAt *time.Time `json:"voidedAt,omitempty"`
}

EntitlementGrant defines model for EntitlementGrant.

type EntitlementGrantCreateInput

type EntitlementGrantCreateInput struct {
	// Amount The amount to grant. Should be a positive number.
	Amount float64 `json:"amount"`

	// EffectiveAt Effective date for grants and anchor for recurring grants. Provided value will be ceiled to metering windowSize (minute).
	EffectiveAt time.Time        `json:"effectiveAt"`
	Expiration  ExpirationPeriod `json:"expiration"`

	// MaxRolloverAmount Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset.
	//
	// Balance after the reset is calculated as:
	// Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))
	MaxRolloverAmount *float64           `json:"maxRolloverAmount,omitempty"`
	Metadata          *map[string]string `json:"metadata,omitempty"`

	// MinRolloverAmount Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset.
	//
	// Balance after the reset is calculated as:
	// Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))
	MinRolloverAmount *float64 `json:"minRolloverAmount,omitempty"`

	// Priority The priority of the grant. Grants with higher priority are applied first.
	// Priority is a positive decimal numbers. With lower numbers indicating higher importance.
	// For example, a priority of 1 is more urgent than a priority of 2.
	// When there are several grants available for the same subject, the system selects the grant with the highest priority.
	// In cases where grants share the same priority level, the grant closest to its expiration will be used first.
	// In the case of two grants have identical priorities and expiration dates, the system will use the grant that was created first.
	Priority *int `json:"priority,omitempty"`

	// Recurrence Recurring period of an entitlement.
	Recurrence *RecurringPeriodCreateInput `json:"recurrence,omitempty"`
}

EntitlementGrantCreateInput Grants are used to increase balance of specific subjects.

type EntitlementId

type EntitlementId = string

EntitlementId defines model for entitlementId.

type EntitlementIdOrFeatureKey

type EntitlementIdOrFeatureKey = string

EntitlementIdOrFeatureKey defines model for entitlementIdOrFeatureKey.

type EntitlementMetered

type EntitlementMetered struct {
	// CreatedAt The date and time the resource was created.
	CreatedAt *time.Time `json:"createdAt,omitempty"`

	// CurrentUsagePeriod A time period
	CurrentUsagePeriod Period `json:"currentUsagePeriod"`

	// DeletedAt The date and time the resource was deleted.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

	// FeatureId The feature the subject is entitled to use.
	// Either featureKey or featureId is required.
	FeatureId string `json:"featureId"`

	// FeatureKey The feature the subject is entitled to use.
	// Either featureKey or featureId is required.
	FeatureKey string `json:"featureKey"`

	// Id Readonly unique ULID identifier.
	Id *string `json:"id,omitempty"`

	// IsSoftLimit If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true.
	IsSoftLimit *bool `json:"isSoftLimit,omitempty"`

	// IsUnlimited Deprecated, ignored by the backend. Please use isSoftLimit instead; this field will be removed in the future.
	IsUnlimited *bool `json:"isUnlimited,omitempty"`

	// IssueAfterReset You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance. If an amount is specified here, a grant will be created alongside the entitlement with the specified amount.
	// That grant will have it's rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.
	//
	// Manually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same.
	IssueAfterReset *float64 `json:"issueAfterReset,omitempty"`

	// IssueAfterResetPriority Defines the grant priority for the default grant. If provided, issueAfterReset must have a value.
	IssueAfterResetPriority *int `json:"issueAfterResetPriority,omitempty"`

	// LastReset The last time a reset happened.
	LastReset time.Time `json:"lastReset"`

	// Metadata Additional metadata for the feature.
	Metadata *map[string]string `json:"metadata,omitempty"`

	// SubjectKey The identifier key unique to the subject
	SubjectKey string                 `json:"subjectKey"`
	Type       EntitlementMeteredType `json:"type"`

	// UpdatedAt The date and time the resource was last updated. The initial value is the same as createdAt.
	UpdatedAt *time.Time `json:"updatedAt,omitempty"`

	// UsagePeriod Recurring period of an entitlement.
	UsagePeriod RecurringPeriod `json:"usagePeriod"`
}

EntitlementMetered defines model for EntitlementMetered.

type EntitlementMeteredCalculatedFields

type EntitlementMeteredCalculatedFields struct {
	// CurrentUsagePeriod A time period
	CurrentUsagePeriod Period `json:"currentUsagePeriod"`

	// LastReset The last time a reset happened.
	LastReset time.Time `json:"lastReset"`
}

EntitlementMeteredCalculatedFields Calculated fields for a metered entitlement.

type EntitlementMeteredCreateInputs

type EntitlementMeteredCreateInputs struct {
	// FeatureId The feature the subject is entitled to use.
	// Either featureKey or featureId is required.
	FeatureId *string `json:"featureId,omitempty"`

	// FeatureKey The feature the subject is entitled to use.
	// Either featureKey or featureId is required.
	FeatureKey *string `json:"featureKey,omitempty"`

	// IsSoftLimit If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true.
	IsSoftLimit *bool `json:"isSoftLimit,omitempty"`

	// IsUnlimited Deprecated, ignored by the backend. Please use isSoftLimit instead; this field will be removed in the future.
	IsUnlimited *bool `json:"isUnlimited,omitempty"`

	// IssueAfterReset You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance. If an amount is specified here, a grant will be created alongside the entitlement with the specified amount.
	// That grant will have it's rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.
	//
	// Manually creating such a grant would mean having the "amount", "minRolloverAmount", and "maxRolloverAmount" fields all be the same.
	IssueAfterReset *float64 `json:"issueAfterReset,omitempty"`

	// IssueAfterResetPriority Defines the grant priority for the default grant. If provided, issueAfterReset must have a value.
	IssueAfterResetPriority *int `json:"issueAfterResetPriority,omitempty"`

	// Metadata Additional metadata for the feature.
	Metadata *map[string]string                 `json:"metadata,omitempty"`
	Type     EntitlementMeteredCreateInputsType `json:"type"`

	// UsagePeriod Recurring period of an entitlement.
	UsagePeriod RecurringPeriodCreateInput `json:"usagePeriod"`
}

EntitlementMeteredCreateInputs defines model for EntitlementMeteredCreateInputs.

type EntitlementMeteredCreateInputsType

type EntitlementMeteredCreateInputsType string

EntitlementMeteredCreateInputsType defines model for EntitlementMeteredCreateInputs.Type.

const (
	EntitlementMeteredCreateInputsTypeMetered EntitlementMeteredCreateInputsType = "metered"
)

Defines values for EntitlementMeteredCreateInputsType.

type EntitlementMeteredType

type EntitlementMeteredType string

EntitlementMeteredType defines model for EntitlementMetered.Type.

const (
	EntitlementMeteredTypeMetered EntitlementMeteredType = "metered"
)

Defines values for EntitlementMeteredType.

type EntitlementSharedFields

type EntitlementSharedFields struct {
	// CreatedAt The date and time the resource was created.
	CreatedAt *time.Time `json:"createdAt,omitempty"`

	// CurrentUsagePeriod A time period
	CurrentUsagePeriod *Period `json:"currentUsagePeriod,omitempty"`

	// DeletedAt The date and time the resource was deleted.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

	// FeatureId The feature the subject is entitled to use.
	// Either featureKey or featureId is required.
	FeatureId string `json:"featureId"`

	// FeatureKey The feature the subject is entitled to use.
	// Either featureKey or featureId is required.
	FeatureKey string `json:"featureKey"`

	// Id Readonly unique ULID identifier.
	Id *string `json:"id,omitempty"`

	// Metadata Additional metadata for the feature.
	Metadata *map[string]string `json:"metadata,omitempty"`

	// SubjectKey The identifier key unique to the subject
	SubjectKey string `json:"subjectKey"`

	// UpdatedAt The date and time the resource was last updated. The initial value is the same as createdAt.
	UpdatedAt *time.Time `json:"updatedAt,omitempty"`

	// UsagePeriod Recurring period of an entitlement.
	UsagePeriod *RecurringPeriod `json:"usagePeriod,omitempty"`
}

EntitlementSharedFields defines model for EntitlementSharedFields.

type EntitlementStatic

type EntitlementStatic struct {
	// Config The JSON parsable config of the entitlement. This value is also returned when checking entitlement access and it is useful for configuring fine-grained access settings to the feature, implemented in your own system. Has to be an object.
	Config string `json:"config"`

	// CreatedAt The date and time the resource was created.
	CreatedAt *time.Time `json:"createdAt,omitempty"`

	// CurrentUsagePeriod A time period
	CurrentUsagePeriod *Period `json:"currentUsagePeriod,omitempty"`

	// DeletedAt The date and time the resource was deleted.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

	// FeatureId The feature the subject is entitled to use.
	// Either featureKey or featureId is required.
	FeatureId string `json:"featureId"`

	// FeatureKey The feature the subject is entitled to use.
	// Either featureKey or featureId is required.
	FeatureKey string `json:"featureKey"`

	// Id Readonly unique ULID identifier.
	Id *string `json:"id,omitempty"`

	// Metadata Additional metadata for the feature.
	Metadata *map[string]string `json:"metadata,omitempty"`

	// SubjectKey The identifier key unique to the subject
	SubjectKey string                `json:"subjectKey"`
	Type       EntitlementStaticType `json:"type"`

	// UpdatedAt The date and time the resource was last updated. The initial value is the same as createdAt.
	UpdatedAt *time.Time `json:"updatedAt,omitempty"`

	// UsagePeriod Recurring period of an entitlement.
	UsagePeriod *RecurringPeriod `json:"usagePeriod,omitempty"`
}

EntitlementStatic defines model for EntitlementStatic.

type EntitlementStaticCreateInputs

type EntitlementStaticCreateInputs struct {
	// Config The JSON parsable config of the entitlement. This value is also returned when checking entitlement access and it is useful for configuring fine-grained access settings to the feature, implemented in your own system. Has to be an object.
	Config string `json:"config"`

	// FeatureId The feature the subject is entitled to use.
	// Either featureKey or featureId is required.
	FeatureId *string `json:"featureId,omitempty"`

	// FeatureKey The feature the subject is entitled to use.
	// Either featureKey or featureId is required.
	FeatureKey *string `json:"featureKey,omitempty"`

	// Metadata Additional metadata for the feature.
	Metadata *map[string]string                `json:"metadata,omitempty"`
	Type     EntitlementStaticCreateInputsType `json:"type"`

	// UsagePeriod Recurring period of an entitlement.
	UsagePeriod *RecurringPeriodCreateInput `json:"usagePeriod,omitempty"`
}

EntitlementStaticCreateInputs defines model for EntitlementStaticCreateInputs.

type EntitlementStaticCreateInputsType

type EntitlementStaticCreateInputsType string

EntitlementStaticCreateInputsType defines model for EntitlementStaticCreateInputs.Type.

const (
	EntitlementStaticCreateInputsTypeStatic EntitlementStaticCreateInputsType = "static"
)

Defines values for EntitlementStaticCreateInputsType.

type EntitlementStaticType

type EntitlementStaticType string

EntitlementStaticType defines model for EntitlementStatic.Type.

const (
	EntitlementStaticTypeStatic EntitlementStaticType = "static"
)

Defines values for EntitlementStaticType.

type EntitlementValue

type EntitlementValue struct {
	// Balance Only available for metered entitlements. Metered entitlements are built around a balance calculation where feature usage is deducted from the issued grants. Balance represents the remaining balance of the entitlement, it's value never turns negative.
	Balance *float64 `json:"balance,omitempty"`

	// Config Only available for static entitlements. The JSON parsable config of the entitlement.
	Config *string `json:"config,omitempty"`

	// HasAccess Whether the subject has access to the feature. Shared accross all entitlement types.
	HasAccess *bool `json:"hasAccess,omitempty"`

	// Overage Only available for metered entitlements. Overage represents the usage that wasn't covered by grants, e.g. if the subject had a total feature usage of 100 in the period but they were only granted 80, there would be 20 overage.
	Overage *float64 `json:"overage,omitempty"`

	// Usage Only available for metered entitlements. Returns the total feature usage in the current period.
	Usage *float64 `json:"usage,omitempty"`
}

EntitlementValue defines model for EntitlementValue.

type Event

type Event = event.Event

Event CloudEvents Specification JSON Schema

type ExpirationPeriod

type ExpirationPeriod struct {
	// Count The expiration period count like 12 months.
	Count int `json:"count"`

	// Duration The expiration period duration like month.
	Duration ExpirationPeriodDuration `json:"duration"`
}

ExpirationPeriod Expiration period of a grant.

type ExpirationPeriodDuration

type ExpirationPeriodDuration string

ExpirationPeriodDuration The expiration period duration like month.

const (
	ExpirationPeriodDurationDAY   ExpirationPeriodDuration = "DAY"
	ExpirationPeriodDurationHOUR  ExpirationPeriodDuration = "HOUR"
	ExpirationPeriodDurationMONTH ExpirationPeriodDuration = "MONTH"
	ExpirationPeriodDurationWEEK  ExpirationPeriodDuration = "WEEK"
	ExpirationPeriodDurationYEAR  ExpirationPeriodDuration = "YEAR"
)

Defines values for ExpirationPeriodDuration.

type Feature

type Feature struct {
	// ArchivedAt If the feature is archived, no new entitlements can be created for it.
	ArchivedAt *time.Time `json:"archivedAt,omitempty"`

	// CreatedAt The date and time the resource was created.
	CreatedAt *time.Time `json:"createdAt,omitempty"`

	// DeletedAt The date and time the resource was deleted.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

	// Id Readonly unique ULID identifier.
	Id *string `json:"id,omitempty"`

	// Key The key is an immutable unique identifier of the feature used throughout the API, for example when interacting with a subject's entitlements. The key has to be unique across all active features, but archived features can share the same key. The key should consist of lowercase alphanumeric characters and dashes.
	Key string `json:"key"`

	// Metadata Additional metadata for the feature, useful for syncing with external systems and annotating custom fields.
	Metadata *map[string]string `json:"metadata,omitempty"`

	// MeterGroupByFilters Optional meter group by filters. Useful if the meter scope is broader than what feature tracks. Example scenario would be a meter tracking all token use with groupBy fields for the model, then the feature could filter for model=gpt-4.
	MeterGroupByFilters *map[string]string `json:"meterGroupByFilters,omitempty"`

	// MeterSlug The meter that the feature is associated with and and based on which usage is calculated.
	// The meter selected must have SUM or COUNT aggregation.
	MeterSlug *string `json:"meterSlug,omitempty"`

	// Name The name of the feature.
	Name string `json:"name"`

	// UpdatedAt The date and time the resource was last updated. The initial value is the same as createdAt.
	UpdatedAt *time.Time `json:"updatedAt,omitempty"`
}

Feature defines model for Feature.

type FeatureCreateInputs

type FeatureCreateInputs struct {
	// Key The key is an immutable unique identifier of the feature used throughout the API, for example when interacting with a subject's entitlements. The key has to be unique across all active features, but archived features can share the same key. The key should consist of lowercase alphanumeric characters and dashes.
	Key string `json:"key"`

	// Metadata Additional metadata for the feature, useful for syncing with external systems and annotating custom fields.
	Metadata *map[string]string `json:"metadata,omitempty"`

	// MeterGroupByFilters Optional meter group by filters. Useful if the meter scope is broader than what feature tracks. Example scenario would be a meter tracking all token use with groupBy fields for the model, then the feature could filter for model=gpt-4.
	MeterGroupByFilters *map[string]string `json:"meterGroupByFilters,omitempty"`

	// MeterSlug The meter that the feature is associated with and and based on which usage is calculated.
	// The meter selected must have SUM or COUNT aggregation.
	MeterSlug *string `json:"meterSlug,omitempty"`

	// Name The name of the feature.
	Name string `json:"name"`
}

FeatureCreateInputs A feature is a feature or service offered to a customer. For example: CPU-Hours, Tokens, API Calls, etc.

type FeatureId

type FeatureId = string

FeatureId defines model for featureId.

type GetEntitlementHistoryParams

type GetEntitlementHistoryParams struct {
	// From Start of time range to query entitlement: date-time in RFC 3339 format. Defaults to
	// the last reset.
	// Gets truncated to the granularity of the underlying meter.
	From *time.Time `form:"from,omitempty" json:"from,omitempty"`

	// To End of time range to query entitlement: date-time in RFC 3339 format. Defaults to now.
	// If not now then gets truncated to the granularity of the underlying meter.
	To *time.Time `form:"to,omitempty" json:"to,omitempty"`

	// WindowSize Size of the time window to group the history by. Cannot be shorter than meter granularity.
	WindowSize GetEntitlementHistoryParamsWindowSize `form:"windowSize" json:"windowSize"`

	// WindowTimeZone The value is the name of the time zone as defined in the IANA Time Zone Database (http://www.iana.org/time-zones).
	// If not specified, the UTC timezone will be used.
	WindowTimeZone *QueryWindowTimeZone `form:"windowTimeZone,omitempty" json:"windowTimeZone,omitempty"`
}

GetEntitlementHistoryParams defines parameters for GetEntitlementHistory.

type GetEntitlementHistoryParamsWindowSize

type GetEntitlementHistoryParamsWindowSize string

GetEntitlementHistoryParamsWindowSize defines parameters for GetEntitlementHistory.

Defines values for GetEntitlementHistoryParamsWindowSize.

type GetEntitlementValueParams

type GetEntitlementValueParams struct {
	// Time Point of time to check value: date-time in RFC 3339 format. Defaults to now.
	Time *time.Time `form:"time,omitempty" json:"time,omitempty"`
}

GetEntitlementValueParams defines parameters for GetEntitlementValue.

type GrantBurnDownHistorySegment

type GrantBurnDownHistorySegment struct {
	// BalanceAtEnd The entitlement balance at the end of the period.
	BalanceAtEnd *float64 `json:"balanceAtEnd,omitempty"`

	// BalanceAtStart The entitlement balance at the start of the period.
	BalanceAtStart *float64 `json:"balanceAtStart,omitempty"`

	// GrantBalancesAtEnd The balance breakdown of each active grant at the start of the period: GrantID: Balance
	GrantBalancesAtEnd *map[string]float64 `json:"grantBalancesAtEnd,omitempty"`

	// GrantBalancesAtStart The balance breakdown of each active grant at the start of the period: GrantID: Balance
	GrantBalancesAtStart *map[string]float64 `json:"grantBalancesAtStart,omitempty"`

	// GrantUsages Which grants were actually burnt down in the period and by what amount.
	GrantUsages *[]GrantUsageRecord `json:"grantUsages,omitempty"`

	// Overage Overuse that wasn't covered by grants.
	Overage *float64 `json:"overage,omitempty"`

	// Period A time period
	Period *Period `json:"period,omitempty"`

	// Usage The usage of the grant in the period.
	Usage *float64 `json:"usage,omitempty"`
}

GrantBurnDownHistorySegment A segment of the grant burn down history.

A given segment represents the usage of a grant between events that changed either the grant burn down priority order or the usag period.

type GrantId

type GrantId = string

GrantId defines model for grantId.

type GrantUsageRecord

type GrantUsageRecord struct {
	// GrantId The id of the grant.
	GrantId *string `json:"grantId,omitempty"`

	// Usage The usage of the grant.
	Usage *float64 `json:"usage,omitempty"`
}

GrantUsageRecord defines model for GrantUsageRecord.

type IdOrSlug

type IdOrSlug = string

IdOrSlug A unique identifier.

type IncludeDeleted

type IncludeDeleted = bool

IncludeDeleted defines model for includeDeleted.

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 IngestedEvent

type IngestedEvent struct {
	// Event CloudEvents Specification JSON Schema
	Event           Event   `json:"event"`
	ValidationError *string `json:"validationError,omitempty"`
}

IngestedEvent An ingested event with optional validation error.

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type InvalidatePortalTokensJSONBody

type InvalidatePortalTokensJSONBody struct {
	// Id Invalidate a portal token by ID.
	Id *string `json:"id,omitempty"`

	// Subject Invalidate all portal tokens for a subject.
	Subject *string `json:"subject,omitempty"`
}

InvalidatePortalTokensJSONBody defines parameters for InvalidatePortalTokens.

type InvalidatePortalTokensJSONRequestBody

type InvalidatePortalTokensJSONRequestBody InvalidatePortalTokensJSONBody

InvalidatePortalTokensJSONRequestBody defines body for InvalidatePortalTokens for application/json ContentType.

type ListEntitlementGrantsParams

type ListEntitlementGrantsParams struct {
	// IncludeDeleted Include deleted entries.
	IncludeDeleted *IncludeDeleted `form:"includeDeleted,omitempty" json:"includeDeleted,omitempty"`

	// OrderBy Order by field
	OrderBy *ListEntitlementGrantsParamsOrderBy `form:"orderBy,omitempty" json:"orderBy,omitempty"`
}

ListEntitlementGrantsParams defines parameters for ListEntitlementGrants.

type ListEntitlementGrantsParamsOrderBy

type ListEntitlementGrantsParamsOrderBy string

ListEntitlementGrantsParamsOrderBy defines parameters for ListEntitlementGrants.

const (
	ListEntitlementGrantsParamsOrderByCreatedAt ListEntitlementGrantsParamsOrderBy = "createdAt"
	ListEntitlementGrantsParamsOrderById        ListEntitlementGrantsParamsOrderBy = "id"
	ListEntitlementGrantsParamsOrderByUpdatedAt ListEntitlementGrantsParamsOrderBy = "updatedAt"
)

Defines values for ListEntitlementGrantsParamsOrderBy.

type ListEntitlementsParams

type ListEntitlementsParams struct {
	// Limit Number of entries to return
	Limit *QueryLimit `form:"limit,omitempty" json:"limit,omitempty"`

	// Offset Number of entries to skip
	Offset *QueryOffset `form:"offset,omitempty" json:"offset,omitempty"`

	// OrderBy Order by field
	OrderBy *ListEntitlementsParamsOrderBy `form:"orderBy,omitempty" json:"orderBy,omitempty"`
}

ListEntitlementsParams defines parameters for ListEntitlements.

type ListEntitlementsParamsOrderBy

type ListEntitlementsParamsOrderBy string

ListEntitlementsParamsOrderBy defines parameters for ListEntitlements.

const (
	ListEntitlementsParamsOrderByCreatedAt ListEntitlementsParamsOrderBy = "createdAt"
	ListEntitlementsParamsOrderByUpdatedAt ListEntitlementsParamsOrderBy = "updatedAt"
)

Defines values for ListEntitlementsParamsOrderBy.

type ListEventsParams

type ListEventsParams struct {
	// From Start date-time in RFC 3339 format.
	// Inclusive.
	From *QueryFrom `form:"from,omitempty" json:"from,omitempty"`

	// To End date-time in RFC 3339 format.
	// Inclusive.
	To *QueryTo `form:"to,omitempty" json:"to,omitempty"`

	// Limit Number of events to return
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}

ListEventsParams defines parameters for ListEvents.

type ListFeaturesParams

type ListFeaturesParams struct {
	// Limit Number of entries to return
	Limit *QueryLimit `form:"limit,omitempty" json:"limit,omitempty"`

	// Offset Number of entries to skip
	Offset *QueryOffset `form:"offset,omitempty" json:"offset,omitempty"`

	// OrderBy Order by field
	OrderBy *ListFeaturesParamsOrderBy `form:"orderBy,omitempty" json:"orderBy,omitempty"`

	// IncludeArchived Include archived features.
	IncludeArchived *bool `form:"includeArchived,omitempty" json:"includeArchived,omitempty"`
}

ListFeaturesParams defines parameters for ListFeatures.

type ListFeaturesParamsOrderBy

type ListFeaturesParamsOrderBy string

ListFeaturesParamsOrderBy defines parameters for ListFeatures.

const (
	ListFeaturesParamsOrderByCreatedAt ListFeaturesParamsOrderBy = "createdAt"
	ListFeaturesParamsOrderById        ListFeaturesParamsOrderBy = "id"
	ListFeaturesParamsOrderByUpdatedAt ListFeaturesParamsOrderBy = "updatedAt"
)

Defines values for ListFeaturesParamsOrderBy.

type ListGrantsParams

type ListGrantsParams struct {
	// Limit Number of entries to return
	Limit *QueryLimit `form:"limit,omitempty" json:"limit,omitempty"`

	// Offset Number of entries to skip
	Offset *QueryOffset `form:"offset,omitempty" json:"offset,omitempty"`

	// OrderBy Order by field
	OrderBy *ListGrantsParamsOrderBy `form:"orderBy,omitempty" json:"orderBy,omitempty"`

	// IncludeDeleted Include deleted entries.
	IncludeDeleted *IncludeDeleted `form:"includeDeleted,omitempty" json:"includeDeleted,omitempty"`
}

ListGrantsParams defines parameters for ListGrants.

type ListGrantsParamsOrderBy

type ListGrantsParamsOrderBy string

ListGrantsParamsOrderBy defines parameters for ListGrants.

const (
	ListGrantsParamsOrderByCreatedAt ListGrantsParamsOrderBy = "createdAt"
	ListGrantsParamsOrderById        ListGrantsParamsOrderBy = "id"
	ListGrantsParamsOrderByUpdatedAt ListGrantsParamsOrderBy = "updatedAt"
)

Defines values for ListGrantsParamsOrderBy.

type ListPortalTokensParams

type ListPortalTokensParams struct {
	// Limit Number of portal tokens to return. Default is 25.
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`
}

ListPortalTokensParams defines parameters for ListPortalTokens.

type ListSubjectEntitlementsParams

type ListSubjectEntitlementsParams struct {
	// IncludeDeleted Include deleted entries.
	IncludeDeleted *IncludeDeleted `form:"includeDeleted,omitempty" json:"includeDeleted,omitempty"`
}

ListSubjectEntitlementsParams defines parameters for ListSubjectEntitlements.

type Meter

type Meter = models.Meter

Meter A meter is a configuration that defines how to match and aggregate events.

type MeterAggregation

type MeterAggregation = models.MeterAggregation

MeterAggregation The aggregation type to use for the meter.

type MeterIdOrSlug

type MeterIdOrSlug = IdOrSlug

MeterIdOrSlug A unique identifier.

type MeterQueryResult

type MeterQueryResult struct {
	Data []MeterQueryRow `json:"data"`
	From *time.Time      `json:"from,omitempty"`
	To   *time.Time      `json:"to,omitempty"`

	// WindowSize Aggregation window size.
	WindowSize *WindowSize `json:"windowSize,omitempty"`
}

MeterQueryResult The result of a meter query.

type MeterQueryRow

type MeterQueryRow = models.MeterQueryRow

MeterQueryRow A row in the result of a meter query.

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type NotFoundProblemResponse

type NotFoundProblemResponse = Problem

NotFoundProblemResponse A Problem Details object (RFC 7807). Additional properties specific to the problem type may be present.

type NotImplementedProblemResponse

type NotImplementedProblemResponse = Problem

NotImplementedProblemResponse A Problem Details object (RFC 7807). Additional properties specific to the problem type may be present.

type Period

type Period struct {
	// From Period start time where the amount was applied. If applicable.
	From time.Time `json:"from"`

	// To Period end time where the amount was applied. If applicable.
	To time.Time `json:"to"`
}

Period A time period

type PortalToken

type PortalToken struct {
	// AllowedMeterSlugs Optional, if defined only the specified meters will be allowed
	AllowedMeterSlugs *[]string  `json:"allowedMeterSlugs,omitempty"`
	CreatedAt         *time.Time `json:"createdAt,omitempty"`
	Expired           *bool      `json:"expired,omitempty"`
	ExpiresAt         *time.Time `json:"expiresAt,omitempty"`
	Id                *string    `json:"id,omitempty"`
	Subject           string     `json:"subject"`

	// Token The token is only returned at creation.
	Token *string `json:"token,omitempty"`
}

PortalToken A consumer portal token.

type Problem

type Problem = models.StatusProblem

Problem A Problem Details object (RFC 7807). Additional properties specific to the problem type may be present.

type QueryFilterGroupBy

type QueryFilterGroupBy map[string]string

QueryFilterGroupBy Simple filter for group bys with exact match.

Usage: `?filterGroupBy[type]=input&filterGroupBy[model]=gpt-4`

type QueryFilterSubject

type QueryFilterSubject = []string

QueryFilterSubject defines model for queryFilterSubject.

type QueryFrom

type QueryFrom = time.Time

QueryFrom defines model for queryFrom.

type QueryGroupBy

type QueryGroupBy = []string

QueryGroupBy defines model for queryGroupBy.

type QueryLimit

type QueryLimit = int

QueryLimit defines model for queryLimit.

type QueryMeterParams

type QueryMeterParams struct {
	// From Start date-time in RFC 3339 format.
	// Inclusive.
	From *QueryFrom `form:"from,omitempty" json:"from,omitempty"`

	// To End date-time in RFC 3339 format.
	// 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"`

	// WindowTimeZone The value is the name of the time zone as defined in the IANA Time Zone Database (http://www.iana.org/time-zones).
	// If not specified, the UTC timezone will be used.
	WindowTimeZone *QueryWindowTimeZone `form:"windowTimeZone,omitempty" json:"windowTimeZone,omitempty"`

	// Subject Filtering by multiple subjects.
	//
	// Usage: ?subject=customer-1&subject=customer-2
	Subject       *QueryFilterSubject `form:"subject,omitempty" json:"subject,omitempty"`
	FilterGroupBy *QueryFilterGroupBy `json:"filterGroupBy,omitempty"`

	// GroupBy If not specified a single aggregate will be returned for each subject and time window.
	// `subject` is a reserved group by value.
	GroupBy *QueryGroupBy `form:"groupBy,omitempty" json:"groupBy,omitempty"`
}

QueryMeterParams defines parameters for QueryMeter.

type QueryOffset

type QueryOffset = int

QueryOffset defines model for queryOffset.

type QueryPortalMeterParams

type QueryPortalMeterParams struct {
	// From Start date-time in RFC 3339 format.
	// Inclusive.
	From *QueryFrom `form:"from,omitempty" json:"from,omitempty"`

	// To End date-time in RFC 3339 format.
	// 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"`

	// WindowTimeZone The value is the name of the time zone as defined in the IANA Time Zone Database (http://www.iana.org/time-zones).
	// If not specified, the UTC timezone will be used.
	WindowTimeZone *QueryWindowTimeZone `form:"windowTimeZone,omitempty" json:"windowTimeZone,omitempty"`
	FilterGroupBy  *QueryFilterGroupBy  `json:"filterGroupBy,omitempty"`

	// GroupBy If not specified a single aggregate will be returned for each subject and time window.
	// `subject` is a reserved group by value.
	GroupBy *QueryGroupBy `form:"groupBy,omitempty" json:"groupBy,omitempty"`
}

QueryPortalMeterParams defines parameters for QueryPortalMeter.

type QueryTo

type QueryTo = time.Time

QueryTo defines model for queryTo.

type QueryWindowSize

type QueryWindowSize = WindowSize

QueryWindowSize Aggregation window size.

type QueryWindowTimeZone

type QueryWindowTimeZone = string

QueryWindowTimeZone defines model for queryWindowTimeZone.

type RecurringPeriod

type RecurringPeriod struct {
	// Anchor An arbitrary anchor to base the recurring period on.
	Anchor time.Time `json:"anchor"`

	// Interval List of pre-defined periods that can be used for recurring & scheduling.
	//
	// DAY:      Every day
	// WEEK:     Every week
	// MONTH:    Every month
	// YEAR:     Every year
	Interval RecurringPeriodEnum `json:"interval"`
}

RecurringPeriod Recurring period of an entitlement.

type RecurringPeriodCreateInput

type RecurringPeriodCreateInput struct {
	// Anchor An arbitrary anchor to base the recurring period on.
	// If not provided then defaults to now truncated to the hour.
	Anchor *time.Time `json:"anchor,omitempty"`

	// Interval List of pre-defined periods that can be used for recurring & scheduling.
	//
	// DAY:      Every day
	// WEEK:     Every week
	// MONTH:    Every month
	// YEAR:     Every year
	Interval RecurringPeriodEnum `json:"interval"`
}

RecurringPeriodCreateInput Recurring period of an entitlement.

type RecurringPeriodEnum

type RecurringPeriodEnum string

RecurringPeriodEnum List of pre-defined periods that can be used for recurring & scheduling.

DAY: Every day WEEK: Every week MONTH: Every month YEAR: Every year

const (
	RecurringPeriodEnumDAY   RecurringPeriodEnum = "DAY"
	RecurringPeriodEnumMONTH RecurringPeriodEnum = "MONTH"
	RecurringPeriodEnumWEEK  RecurringPeriodEnum = "WEEK"
	RecurringPeriodEnumYEAR  RecurringPeriodEnum = "YEAR"
)

Defines values for RecurringPeriodEnum.

type RequiredHeaderError

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

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 ResetEntitlementUsageJSONBody

type ResetEntitlementUsageJSONBody struct {
	// EffectiveAt The time at which the reset takes effect, defaults to now. The reset cannot be in the future. The provided value is truncated to the minute due to how historical meter data is stored.
	EffectiveAt *time.Time `json:"effectiveAt,omitempty"`

	// RetainAnchor Determines whether the usage period anchor is retained or reset to the effectiveAt time.
	// - If true, the usage period anchor is retained.
	// - If false, the usage period anchor is reset to the effectiveAt time.
	RetainAnchor *bool `json:"retainAnchor,omitempty"`
}

ResetEntitlementUsageJSONBody defines parameters for ResetEntitlementUsage.

type ResetEntitlementUsageJSONRequestBody

type ResetEntitlementUsageJSONRequestBody ResetEntitlementUsageJSONBody

ResetEntitlementUsageJSONRequestBody defines body for ResetEntitlementUsage for application/json ContentType.

type ServerInterface

type ServerInterface interface {
	// Get event metrics
	// (GET /api/v1/debug/metrics)
	GetDebugMetrics(w http.ResponseWriter, r *http.Request)
	// List entitlements
	// (GET /api/v1/entitlements)
	ListEntitlements(w http.ResponseWriter, r *http.Request, params ListEntitlementsParams)
	// List ingested events
	// (GET /api/v1/events)
	ListEvents(w http.ResponseWriter, r *http.Request, params ListEventsParams)
	// Ingest events
	// (POST /api/v1/events)
	IngestEvents(w http.ResponseWriter, r *http.Request)
	// List features
	// (GET /api/v1/features)
	ListFeatures(w http.ResponseWriter, r *http.Request, params ListFeaturesParams)
	// Create a feature
	// (POST /api/v1/features)
	CreateFeature(w http.ResponseWriter, r *http.Request)
	// Archive a feature
	// (DELETE /api/v1/features/{featureId})
	DeleteFeature(w http.ResponseWriter, r *http.Request, featureId FeatureId)
	// Get feature
	// (GET /api/v1/features/{featureId})
	GetFeature(w http.ResponseWriter, r *http.Request, featureId FeatureId)
	// List grants
	// (GET /api/v1/grants)
	ListGrants(w http.ResponseWriter, r *http.Request, params ListGrantsParams)
	// Void a grant
	// (DELETE /api/v1/grants/{grantId})
	VoidGrant(w http.ResponseWriter, r *http.Request, grantId GrantId)
	// List meters
	// (GET /api/v1/meters)
	ListMeters(w http.ResponseWriter, r *http.Request)
	// ☁ Create meter
	// (POST /api/v1/meters)
	CreateMeter(w http.ResponseWriter, r *http.Request)
	// ☁ Delete meter
	// (DELETE /api/v1/meters/{meterIdOrSlug})
	DeleteMeter(w http.ResponseWriter, r *http.Request, meterIdOrSlug MeterIdOrSlug)
	// Get meter
	// (GET /api/v1/meters/{meterIdOrSlug})
	GetMeter(w http.ResponseWriter, r *http.Request, meterIdOrSlug MeterIdOrSlug)
	// Query meter
	// (GET /api/v1/meters/{meterIdOrSlug}/query)
	QueryMeter(w http.ResponseWriter, r *http.Request, meterIdOrSlug MeterIdOrSlug, params QueryMeterParams)
	// List meter subjects
	// (GET /api/v1/meters/{meterIdOrSlug}/subjects)
	ListMeterSubjects(w http.ResponseWriter, r *http.Request, meterIdOrSlug MeterIdOrSlug)
	// Query portal meter
	// (GET /api/v1/portal/meters/{meterSlug}/query)
	QueryPortalMeter(w http.ResponseWriter, r *http.Request, meterSlug string, params QueryPortalMeterParams)
	// ☁ List portal tokens
	// (GET /api/v1/portal/tokens)
	ListPortalTokens(w http.ResponseWriter, r *http.Request, params ListPortalTokensParams)
	// Create portal token
	// (POST /api/v1/portal/tokens)
	CreatePortalToken(w http.ResponseWriter, r *http.Request)
	// ☁ Invalidate portal tokens
	// (POST /api/v1/portal/tokens/invalidate)
	InvalidatePortalTokens(w http.ResponseWriter, r *http.Request)
	// ☁ List subjects
	// (GET /api/v1/subjects)
	ListSubjects(w http.ResponseWriter, r *http.Request)
	// ☁ Upsert subject
	// (POST /api/v1/subjects)
	UpsertSubject(w http.ResponseWriter, r *http.Request)
	// ☁ Delete subject
	// (DELETE /api/v1/subjects/{subjectIdOrKey})
	DeleteSubject(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey)
	// ☁ Get subject
	// (GET /api/v1/subjects/{subjectIdOrKey})
	GetSubject(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey)
	// List entitlements of a subject
	// (GET /api/v1/subjects/{subjectIdOrKey}/entitlements)
	ListSubjectEntitlements(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, params ListSubjectEntitlementsParams)
	// Create an entitlement
	// (POST /api/v1/subjects/{subjectIdOrKey}/entitlements)
	CreateEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey)
	// Get the current value and access of an entitlement
	// (GET /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/value)
	GetEntitlementValue(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, entitlementIdOrFeatureKey EntitlementIdOrFeatureKey, params GetEntitlementValueParams)
	// Delete an entitlement
	// (DELETE /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId})
	DeleteEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, entitlementId EntitlementId)
	// Get an entitlement
	// (GET /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId})
	GetEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, entitlementId EntitlementId)
	// List grants for an entitlement
	// (GET /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId}/grants)
	ListEntitlementGrants(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, entitlementId EntitlementId, params ListEntitlementGrantsParams)
	// Create a grant
	// (POST /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId}/grants)
	CreateGrant(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, entitlementId EntitlementId)
	// Get the balance history of a specific entitlement.
	// (GET /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId}/history)
	GetEntitlementHistory(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, entitlementId EntitlementId, params GetEntitlementHistoryParams)
	// Reset an entitlement
	// (POST /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId}/reset)
	ResetEntitlementUsage(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, entitlementId EntitlementId)
}

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) CreateEntitlement

func (siw *ServerInterfaceWrapper) CreateEntitlement(w http.ResponseWriter, r *http.Request)

CreateEntitlement operation middleware

func (*ServerInterfaceWrapper) CreateFeature

func (siw *ServerInterfaceWrapper) CreateFeature(w http.ResponseWriter, r *http.Request)

CreateFeature operation middleware

func (*ServerInterfaceWrapper) CreateGrant

func (siw *ServerInterfaceWrapper) CreateGrant(w http.ResponseWriter, r *http.Request)

CreateGrant operation middleware

func (*ServerInterfaceWrapper) CreateMeter

func (siw *ServerInterfaceWrapper) CreateMeter(w http.ResponseWriter, r *http.Request)

CreateMeter operation middleware

func (*ServerInterfaceWrapper) CreatePortalToken

func (siw *ServerInterfaceWrapper) CreatePortalToken(w http.ResponseWriter, r *http.Request)

CreatePortalToken operation middleware

func (*ServerInterfaceWrapper) DeleteEntitlement

func (siw *ServerInterfaceWrapper) DeleteEntitlement(w http.ResponseWriter, r *http.Request)

DeleteEntitlement operation middleware

func (*ServerInterfaceWrapper) DeleteFeature

func (siw *ServerInterfaceWrapper) DeleteFeature(w http.ResponseWriter, r *http.Request)

DeleteFeature operation middleware

func (*ServerInterfaceWrapper) DeleteMeter

func (siw *ServerInterfaceWrapper) DeleteMeter(w http.ResponseWriter, r *http.Request)

DeleteMeter operation middleware

func (*ServerInterfaceWrapper) DeleteSubject

func (siw *ServerInterfaceWrapper) DeleteSubject(w http.ResponseWriter, r *http.Request)

DeleteSubject operation middleware

func (*ServerInterfaceWrapper) GetDebugMetrics

func (siw *ServerInterfaceWrapper) GetDebugMetrics(w http.ResponseWriter, r *http.Request)

GetDebugMetrics operation middleware

func (*ServerInterfaceWrapper) GetEntitlement

func (siw *ServerInterfaceWrapper) GetEntitlement(w http.ResponseWriter, r *http.Request)

GetEntitlement operation middleware

func (*ServerInterfaceWrapper) GetEntitlementHistory

func (siw *ServerInterfaceWrapper) GetEntitlementHistory(w http.ResponseWriter, r *http.Request)

GetEntitlementHistory operation middleware

func (*ServerInterfaceWrapper) GetEntitlementValue

func (siw *ServerInterfaceWrapper) GetEntitlementValue(w http.ResponseWriter, r *http.Request)

GetEntitlementValue operation middleware

func (*ServerInterfaceWrapper) GetFeature

func (siw *ServerInterfaceWrapper) GetFeature(w http.ResponseWriter, r *http.Request)

GetFeature operation middleware

func (*ServerInterfaceWrapper) GetMeter

func (siw *ServerInterfaceWrapper) GetMeter(w http.ResponseWriter, r *http.Request)

GetMeter operation middleware

func (*ServerInterfaceWrapper) GetSubject

func (siw *ServerInterfaceWrapper) GetSubject(w http.ResponseWriter, r *http.Request)

GetSubject operation middleware

func (*ServerInterfaceWrapper) IngestEvents

func (siw *ServerInterfaceWrapper) IngestEvents(w http.ResponseWriter, r *http.Request)

IngestEvents operation middleware

func (*ServerInterfaceWrapper) InvalidatePortalTokens

func (siw *ServerInterfaceWrapper) InvalidatePortalTokens(w http.ResponseWriter, r *http.Request)

InvalidatePortalTokens operation middleware

func (*ServerInterfaceWrapper) ListEntitlementGrants

func (siw *ServerInterfaceWrapper) ListEntitlementGrants(w http.ResponseWriter, r *http.Request)

ListEntitlementGrants operation middleware

func (*ServerInterfaceWrapper) ListEntitlements

func (siw *ServerInterfaceWrapper) ListEntitlements(w http.ResponseWriter, r *http.Request)

ListEntitlements operation middleware

func (*ServerInterfaceWrapper) ListEvents

func (siw *ServerInterfaceWrapper) ListEvents(w http.ResponseWriter, r *http.Request)

ListEvents operation middleware

func (*ServerInterfaceWrapper) ListFeatures

func (siw *ServerInterfaceWrapper) ListFeatures(w http.ResponseWriter, r *http.Request)

ListFeatures operation middleware

func (*ServerInterfaceWrapper) ListGrants

func (siw *ServerInterfaceWrapper) ListGrants(w http.ResponseWriter, r *http.Request)

ListGrants operation middleware

func (*ServerInterfaceWrapper) ListMeterSubjects

func (siw *ServerInterfaceWrapper) ListMeterSubjects(w http.ResponseWriter, r *http.Request)

ListMeterSubjects operation middleware

func (*ServerInterfaceWrapper) ListMeters

func (siw *ServerInterfaceWrapper) ListMeters(w http.ResponseWriter, r *http.Request)

ListMeters operation middleware

func (*ServerInterfaceWrapper) ListPortalTokens

func (siw *ServerInterfaceWrapper) ListPortalTokens(w http.ResponseWriter, r *http.Request)

ListPortalTokens operation middleware

func (*ServerInterfaceWrapper) ListSubjectEntitlements

func (siw *ServerInterfaceWrapper) ListSubjectEntitlements(w http.ResponseWriter, r *http.Request)

ListSubjectEntitlements operation middleware

func (*ServerInterfaceWrapper) ListSubjects

func (siw *ServerInterfaceWrapper) ListSubjects(w http.ResponseWriter, r *http.Request)

ListSubjects operation middleware

func (*ServerInterfaceWrapper) QueryMeter

func (siw *ServerInterfaceWrapper) QueryMeter(w http.ResponseWriter, r *http.Request)

QueryMeter operation middleware

func (*ServerInterfaceWrapper) QueryPortalMeter

func (siw *ServerInterfaceWrapper) QueryPortalMeter(w http.ResponseWriter, r *http.Request)

QueryPortalMeter operation middleware

func (*ServerInterfaceWrapper) ResetEntitlementUsage

func (siw *ServerInterfaceWrapper) ResetEntitlementUsage(w http.ResponseWriter, r *http.Request)

ResetEntitlementUsage operation middleware

func (*ServerInterfaceWrapper) UpsertSubject

func (siw *ServerInterfaceWrapper) UpsertSubject(w http.ResponseWriter, r *http.Request)

UpsertSubject operation middleware

func (*ServerInterfaceWrapper) VoidGrant

func (siw *ServerInterfaceWrapper) VoidGrant(w http.ResponseWriter, r *http.Request)

VoidGrant operation middleware

type SharedMetaFields

type SharedMetaFields struct {
	// CreatedAt The date and time the resource was created.
	CreatedAt *time.Time `json:"createdAt,omitempty"`

	// DeletedAt The date and time the resource was deleted.
	DeletedAt *time.Time `json:"deletedAt,omitempty"`

	// Id Readonly unique ULID identifier.
	Id *string `json:"id,omitempty"`

	// UpdatedAt The date and time the resource was last updated. The initial value is the same as createdAt.
	UpdatedAt *time.Time `json:"updatedAt,omitempty"`
}

SharedMetaFields Metadata fields for all resources. These fields are automatically populated by the system for managed entities. Their use and meaning is uniform across all resources.

type Subject

type Subject struct {
	CurrentPeriodEnd   *time.Time              `json:"currentPeriodEnd"`
	CurrentPeriodStart *time.Time              `json:"currentPeriodStart"`
	DisplayName        *string                 `json:"displayName"`
	Id                 *string                 `json:"id,omitempty"`
	Key                string                  `json:"key"`
	Metadata           *map[string]interface{} `json:"metadata"`
	StripeCustomerId   *string                 `json:"stripeCustomerId"`
}

Subject A subject is a unique identifier for a user or entity.

type SubjectIdOrKey

type SubjectIdOrKey = string

SubjectIdOrKey defines model for subjectIdOrKey.

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type UnauthorizedProblemResponse

type UnauthorizedProblemResponse = Problem

UnauthorizedProblemResponse A Problem Details object (RFC 7807). Additional properties specific to the problem type may be present.

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type UnexpectedProblemResponse

type UnexpectedProblemResponse = Problem

UnexpectedProblemResponse A Problem Details object (RFC 7807). Additional properties specific to the problem type may be present.

type Unimplemented

type Unimplemented struct{}

func (Unimplemented) CreateEntitlement

func (_ Unimplemented) CreateEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey)

Create an entitlement (POST /api/v1/subjects/{subjectIdOrKey}/entitlements)

func (Unimplemented) CreateFeature

func (_ Unimplemented) CreateFeature(w http.ResponseWriter, r *http.Request)

Create a feature (POST /api/v1/features)

func (Unimplemented) CreateGrant

func (_ Unimplemented) CreateGrant(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, entitlementId EntitlementId)

Create a grant (POST /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId}/grants)

func (Unimplemented) CreateMeter

func (_ Unimplemented) CreateMeter(w http.ResponseWriter, r *http.Request)

☁ Create meter (POST /api/v1/meters)

func (Unimplemented) CreatePortalToken

func (_ Unimplemented) CreatePortalToken(w http.ResponseWriter, r *http.Request)

Create portal token (POST /api/v1/portal/tokens)

func (Unimplemented) DeleteEntitlement

func (_ Unimplemented) DeleteEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, entitlementId EntitlementId)

Delete an entitlement (DELETE /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId})

func (Unimplemented) DeleteFeature

func (_ Unimplemented) DeleteFeature(w http.ResponseWriter, r *http.Request, featureId FeatureId)

Archive a feature (DELETE /api/v1/features/{featureId})

func (Unimplemented) DeleteMeter

func (_ Unimplemented) DeleteMeter(w http.ResponseWriter, r *http.Request, meterIdOrSlug MeterIdOrSlug)

☁ Delete meter (DELETE /api/v1/meters/{meterIdOrSlug})

func (Unimplemented) DeleteSubject

func (_ Unimplemented) DeleteSubject(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey)

☁ Delete subject (DELETE /api/v1/subjects/{subjectIdOrKey})

func (Unimplemented) GetDebugMetrics

func (_ Unimplemented) GetDebugMetrics(w http.ResponseWriter, r *http.Request)

Get event metrics (GET /api/v1/debug/metrics)

func (Unimplemented) GetEntitlement

func (_ Unimplemented) GetEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, entitlementId EntitlementId)

Get an entitlement (GET /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId})

func (Unimplemented) GetEntitlementHistory

func (_ Unimplemented) GetEntitlementHistory(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, entitlementId EntitlementId, params GetEntitlementHistoryParams)

Get the balance history of a specific entitlement. (GET /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId}/history)

func (Unimplemented) GetEntitlementValue

func (_ Unimplemented) GetEntitlementValue(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, entitlementIdOrFeatureKey EntitlementIdOrFeatureKey, params GetEntitlementValueParams)

Get the current value and access of an entitlement (GET /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/value)

func (Unimplemented) GetFeature

func (_ Unimplemented) GetFeature(w http.ResponseWriter, r *http.Request, featureId FeatureId)

Get feature (GET /api/v1/features/{featureId})

func (Unimplemented) GetMeter

func (_ Unimplemented) GetMeter(w http.ResponseWriter, r *http.Request, meterIdOrSlug MeterIdOrSlug)

Get meter (GET /api/v1/meters/{meterIdOrSlug})

func (Unimplemented) GetSubject

func (_ Unimplemented) GetSubject(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey)

☁ Get subject (GET /api/v1/subjects/{subjectIdOrKey})

func (Unimplemented) IngestEvents

func (_ Unimplemented) IngestEvents(w http.ResponseWriter, r *http.Request)

Ingest events (POST /api/v1/events)

func (Unimplemented) InvalidatePortalTokens

func (_ Unimplemented) InvalidatePortalTokens(w http.ResponseWriter, r *http.Request)

☁ Invalidate portal tokens (POST /api/v1/portal/tokens/invalidate)

func (Unimplemented) ListEntitlementGrants

func (_ Unimplemented) ListEntitlementGrants(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, entitlementId EntitlementId, params ListEntitlementGrantsParams)

List grants for an entitlement (GET /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId}/grants)

func (Unimplemented) ListEntitlements

func (_ Unimplemented) ListEntitlements(w http.ResponseWriter, r *http.Request, params ListEntitlementsParams)

List entitlements (GET /api/v1/entitlements)

func (Unimplemented) ListEvents

func (_ Unimplemented) ListEvents(w http.ResponseWriter, r *http.Request, params ListEventsParams)

List ingested events (GET /api/v1/events)

func (Unimplemented) ListFeatures

func (_ Unimplemented) ListFeatures(w http.ResponseWriter, r *http.Request, params ListFeaturesParams)

List features (GET /api/v1/features)

func (Unimplemented) ListGrants

func (_ Unimplemented) ListGrants(w http.ResponseWriter, r *http.Request, params ListGrantsParams)

List grants (GET /api/v1/grants)

func (Unimplemented) ListMeterSubjects

func (_ Unimplemented) ListMeterSubjects(w http.ResponseWriter, r *http.Request, meterIdOrSlug MeterIdOrSlug)

List meter subjects (GET /api/v1/meters/{meterIdOrSlug}/subjects)

func (Unimplemented) ListMeters

func (_ Unimplemented) ListMeters(w http.ResponseWriter, r *http.Request)

List meters (GET /api/v1/meters)

func (Unimplemented) ListPortalTokens

func (_ Unimplemented) ListPortalTokens(w http.ResponseWriter, r *http.Request, params ListPortalTokensParams)

☁ List portal tokens (GET /api/v1/portal/tokens)

func (Unimplemented) ListSubjectEntitlements

func (_ Unimplemented) ListSubjectEntitlements(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, params ListSubjectEntitlementsParams)

List entitlements of a subject (GET /api/v1/subjects/{subjectIdOrKey}/entitlements)

func (Unimplemented) ListSubjects

func (_ Unimplemented) ListSubjects(w http.ResponseWriter, r *http.Request)

☁ List subjects (GET /api/v1/subjects)

func (Unimplemented) QueryMeter

func (_ Unimplemented) QueryMeter(w http.ResponseWriter, r *http.Request, meterIdOrSlug MeterIdOrSlug, params QueryMeterParams)

Query meter (GET /api/v1/meters/{meterIdOrSlug}/query)

func (Unimplemented) QueryPortalMeter

func (_ Unimplemented) QueryPortalMeter(w http.ResponseWriter, r *http.Request, meterSlug string, params QueryPortalMeterParams)

Query portal meter (GET /api/v1/portal/meters/{meterSlug}/query)

func (Unimplemented) ResetEntitlementUsage

func (_ Unimplemented) ResetEntitlementUsage(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, entitlementId EntitlementId)

Reset an entitlement (POST /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId}/reset)

func (Unimplemented) UpsertSubject

func (_ Unimplemented) UpsertSubject(w http.ResponseWriter, r *http.Request)

☁ Upsert subject (POST /api/v1/subjects)

func (Unimplemented) VoidGrant

func (_ Unimplemented) VoidGrant(w http.ResponseWriter, r *http.Request, grantId GrantId)

Void a grant (DELETE /api/v1/grants/{grantId})

type UnmarshalingParamError

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

type UpsertSubjectJSONBody

type UpsertSubjectJSONBody = []Subject

UpsertSubjectJSONBody defines parameters for UpsertSubject.

type UpsertSubjectJSONRequestBody

type UpsertSubjectJSONRequestBody = UpsertSubjectJSONBody

UpsertSubjectJSONRequestBody defines body for UpsertSubject for application/json ContentType.

type WindowSize

type WindowSize = models.WindowSize

WindowSize Aggregation window size.

type WindowedBalanceHistory

type WindowedBalanceHistory struct {
	// BurndownHistory Grant burndown history.
	BurndownHistory *[]GrantBurnDownHistorySegment `json:"burndownHistory,omitempty"`

	// WindowedHistory The windowed balance history.
	// - It only returns rows for windows where there was usage.
	// - The windows are inclusive at their start and exclusive at their end.
	// - The last window may be smaller than the window size and is inclusive at both ends.
	WindowedHistory *[]BalanceHistoryWindow `json:"windowedHistory,omitempty"`
}

WindowedBalanceHistory The windowed balance history.

Directories

Path Synopsis
client
go
Package openmeter provides primitives to interact with the openapi HTTP API.
Package openmeter provides primitives to interact with the openapi HTTP API.
Some parts of the OpenAPI spec are not supported by oapi-codegen, such as the "oneOf" and "anyOf" keywords.
Some parts of the OpenAPI spec are not supported by oapi-codegen, such as the "oneOf" and "anyOf" keywords.

Jump to

Keyboard shortcuts

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