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
- 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 BadRequestProblemResponse
- type BalanceHistoryWindow
- type ChiServerOptions
- type ConflictProblem
- type ConflictProblemResponse
- type CreateEntitlementJSONRequestBody
- type CreateFeatureJSONRequestBody
- type CreateGrantJSONRequestBody
- type CreateMeterJSONRequestBody
- type CreatePortalTokenJSONRequestBody
- type Entitlement
- func (t Entitlement) AsEntitlementBoolean() (EntitlementBoolean, error)
- func (t Entitlement) AsEntitlementMetered() (EntitlementMetered, error)
- func (t Entitlement) AsEntitlementStatic() (EntitlementStatic, error)
- func (t Entitlement) Discriminator() (string, error)
- func (t *Entitlement) FromEntitlementBoolean(v EntitlementBoolean) error
- func (t *Entitlement) FromEntitlementMetered(v EntitlementMetered) error
- func (t *Entitlement) FromEntitlementStatic(v EntitlementStatic) error
- func (t Entitlement) MarshalJSON() ([]byte, error)
- func (t *Entitlement) MergeEntitlementBoolean(v EntitlementBoolean) error
- func (t *Entitlement) MergeEntitlementMetered(v EntitlementMetered) error
- func (t *Entitlement) MergeEntitlementStatic(v EntitlementStatic) error
- func (t *Entitlement) UnmarshalJSON(b []byte) error
- func (t Entitlement) ValueByDiscriminator() (interface{}, error)
- type EntitlementBoolean
- type EntitlementBooleanCreateInputs
- type EntitlementBooleanCreateInputsType
- type EntitlementBooleanType
- type EntitlementCreateInputs
- func (t EntitlementCreateInputs) AsEntitlementBooleanCreateInputs() (EntitlementBooleanCreateInputs, error)
- func (t EntitlementCreateInputs) AsEntitlementMeteredCreateInputs() (EntitlementMeteredCreateInputs, error)
- func (t EntitlementCreateInputs) AsEntitlementStaticCreateInputs() (EntitlementStaticCreateInputs, error)
- func (t EntitlementCreateInputs) Discriminator() (string, error)
- func (t *EntitlementCreateInputs) FromEntitlementBooleanCreateInputs(v EntitlementBooleanCreateInputs) error
- func (t *EntitlementCreateInputs) FromEntitlementMeteredCreateInputs(v EntitlementMeteredCreateInputs) error
- func (t *EntitlementCreateInputs) FromEntitlementStaticCreateInputs(v EntitlementStaticCreateInputs) error
- func (t EntitlementCreateInputs) MarshalJSON() ([]byte, error)
- func (t *EntitlementCreateInputs) MergeEntitlementBooleanCreateInputs(v EntitlementBooleanCreateInputs) error
- func (t *EntitlementCreateInputs) MergeEntitlementMeteredCreateInputs(v EntitlementMeteredCreateInputs) error
- func (t *EntitlementCreateInputs) MergeEntitlementStaticCreateInputs(v EntitlementStaticCreateInputs) error
- func (t *EntitlementCreateInputs) UnmarshalJSON(b []byte) error
- func (t EntitlementCreateInputs) ValueByDiscriminator() (interface{}, error)
- type EntitlementCreateSharedFields
- type EntitlementGrant
- type EntitlementGrantCreateInput
- type EntitlementId
- type EntitlementIdOrFeatureKey
- type EntitlementMetered
- type EntitlementMeteredCalculatedFields
- type EntitlementMeteredCreateInputs
- type EntitlementMeteredCreateInputsType
- type EntitlementMeteredType
- type EntitlementSharedFields
- type EntitlementStatic
- type EntitlementStaticCreateInputs
- type EntitlementStaticCreateInputsType
- type EntitlementStaticType
- type EntitlementValue
- type Event
- type ExpirationPeriod
- type ExpirationPeriodDuration
- type Feature
- type FeatureCreateInputs
- type FeatureId
- type GetEntitlementHistoryParams
- type GetEntitlementHistoryParamsWindowSize
- type GetEntitlementValueParams
- type GrantBurnDownHistorySegment
- type GrantId
- type GrantUsageRecord
- type IdOrSlug
- type IncludeDeleted
- type IngestEventsApplicationCloudeventsBatchPlusJSONBody
- type IngestEventsApplicationCloudeventsBatchPlusJSONRequestBody
- type IngestEventsApplicationCloudeventsPlusJSONRequestBody
- type IngestedEvent
- type InvalidParamFormatError
- type InvalidatePortalTokensJSONBody
- type InvalidatePortalTokensJSONRequestBody
- type ListEntitlementGrantsParams
- type ListEntitlementGrantsParamsOrderBy
- type ListEntitlementsParams
- type ListEntitlementsParamsOrderBy
- type ListEventsParams
- type ListFeaturesParams
- type ListFeaturesParamsOrderBy
- type ListGrantsParams
- type ListGrantsParamsOrderBy
- type ListPortalTokensParams
- type ListSubjectEntitlementsParams
- type Meter
- type MeterAggregation
- type MeterIdOrSlug
- type MeterQueryResult
- type MeterQueryRow
- type MiddlewareFunc
- type NotFoundProblemResponse
- type NotImplementedProblemResponse
- type Period
- type PortalToken
- type Problem
- type QueryFilterGroupBy
- type QueryFilterSubject
- type QueryFrom
- type QueryGroupBy
- type QueryLimit
- type QueryMeterParams
- type QueryOffset
- type QueryPortalMeterParams
- type QueryTo
- type QueryWindowSize
- type QueryWindowTimeZone
- type RecurringPeriod
- type RecurringPeriodCreateInput
- type RecurringPeriodEnum
- type RequiredHeaderError
- type RequiredParamError
- type ResetEntitlementUsageJSONBody
- type ResetEntitlementUsageJSONRequestBody
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) CreateEntitlement(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateFeature(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateGrant(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateMeter(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreatePortalToken(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteEntitlement(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteFeature(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteMeter(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteSubject(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetDebugMetrics(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetEntitlement(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetEntitlementHistory(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetEntitlementValue(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetFeature(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetMeter(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetSubject(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) IngestEvents(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) InvalidatePortalTokens(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListEntitlementGrants(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListEntitlements(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListEvents(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListFeatures(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListGrants(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListMeterSubjects(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListMeters(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListPortalTokens(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListSubjectEntitlements(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListSubjects(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) QueryMeter(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) QueryPortalMeter(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ResetEntitlementUsage(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpsertSubject(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) VoidGrant(w http.ResponseWriter, r *http.Request)
- type SharedMetaFields
- type Subject
- type SubjectIdOrKey
- type TooManyValuesForParamError
- type UnauthorizedProblemResponse
- type UnescapedCookieParamError
- type UnexpectedProblemResponse
- type Unimplemented
- func (_ Unimplemented) CreateEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey)
- func (_ Unimplemented) CreateFeature(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) CreateGrant(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, ...)
- func (_ Unimplemented) CreateMeter(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) CreatePortalToken(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) DeleteEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, ...)
- func (_ Unimplemented) DeleteFeature(w http.ResponseWriter, r *http.Request, featureId FeatureId)
- func (_ Unimplemented) DeleteMeter(w http.ResponseWriter, r *http.Request, meterIdOrSlug MeterIdOrSlug)
- func (_ Unimplemented) DeleteSubject(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey)
- func (_ Unimplemented) GetDebugMetrics(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) GetEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, ...)
- func (_ Unimplemented) GetEntitlementHistory(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, ...)
- func (_ Unimplemented) GetEntitlementValue(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, ...)
- func (_ Unimplemented) GetFeature(w http.ResponseWriter, r *http.Request, featureId FeatureId)
- func (_ Unimplemented) GetMeter(w http.ResponseWriter, r *http.Request, meterIdOrSlug MeterIdOrSlug)
- func (_ Unimplemented) GetSubject(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey)
- func (_ Unimplemented) IngestEvents(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) InvalidatePortalTokens(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) ListEntitlementGrants(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, ...)
- func (_ Unimplemented) ListEntitlements(w http.ResponseWriter, r *http.Request, params ListEntitlementsParams)
- func (_ Unimplemented) ListEvents(w http.ResponseWriter, r *http.Request, params ListEventsParams)
- func (_ Unimplemented) ListFeatures(w http.ResponseWriter, r *http.Request, params ListFeaturesParams)
- func (_ Unimplemented) ListGrants(w http.ResponseWriter, r *http.Request, params ListGrantsParams)
- func (_ Unimplemented) ListMeterSubjects(w http.ResponseWriter, r *http.Request, meterIdOrSlug MeterIdOrSlug)
- func (_ Unimplemented) ListMeters(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) ListPortalTokens(w http.ResponseWriter, r *http.Request, params ListPortalTokensParams)
- func (_ Unimplemented) ListSubjectEntitlements(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, ...)
- func (_ Unimplemented) ListSubjects(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) QueryMeter(w http.ResponseWriter, r *http.Request, meterIdOrSlug MeterIdOrSlug, ...)
- func (_ Unimplemented) QueryPortalMeter(w http.ResponseWriter, r *http.Request, meterSlug string, ...)
- func (_ Unimplemented) ResetEntitlementUsage(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, ...)
- func (_ Unimplemented) UpsertSubject(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) VoidGrant(w http.ResponseWriter, r *http.Request, grantId GrantId)
- type UnmarshalingParamError
- type UpsertSubjectJSONBody
- type UpsertSubjectJSONRequestBody
- type WindowSize
- type WindowedBalanceHistory
Constants ¶
const ( CloudCookieAuthScopes = "CloudCookieAuth.Scopes" CloudPortalTokenAuthScopes = "CloudPortalTokenAuth.Scopes" CloudTokenAuthScopes = "CloudTokenAuth.Scopes" PortalTokenAuthScopes = "PortalTokenAuth.Scopes" )
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 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
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 A window of balance history.
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. Null if not 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. Defaults to createdAt if not updated. 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 { // Either featureKey or featureId is required. FeatureId *string `json:"featureId,omitempty"` // Either featureKey or featureId is required. FeatureKey *string `json:"featureKey,omitempty"` Metadata *map[string]string `json:"metadata,omitempty"` 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. Null if not 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. Defaults to createdAt if not updated. 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 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. Null if not 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. IsSoftLimit *bool `json:"isSoftLimit,omitempty"` // IsUnlimited If unlimited=true the subject can use the feature an unlimited amount. IsUnlimited *bool `json:"isUnlimited,omitempty"` // IssueAfterReset You can issue usage automatically after reset. This usage is not rolled over. IssueAfterReset *float64 `json:"issueAfterReset,omitempty"` // LastReset The last time the meter was reset. 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. Defaults to createdAt if not updated. 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 the meter was reset. 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. IsSoftLimit *bool `json:"isSoftLimit,omitempty"` // IsUnlimited If unlimited=true the subject can use the feature an unlimited amount. IsUnlimited *bool `json:"isUnlimited,omitempty"` // IssueAfterReset You can issue usage automatically after reset. This usage is not rolled over. IssueAfterReset *float64 `json:"issueAfterReset,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 { time.Time `json:"createdAt,omitempty"` CurrentUsagePeriod *Period `json:"currentUsagePeriod,omitempty"` DeletedAt *time.Time `json:"deletedAt,omitempty"` // Either featureKey or featureId is required. FeatureId string `json:"featureId"` // Either featureKey or featureId is required. FeatureKey string `json:"featureKey"` Id *string `json:"id,omitempty"` Metadata *map[string]string `json:"metadata,omitempty"` SubjectKey string `json:"subjectKey"` UpdatedAt *time.Time `json:"updatedAt,omitempty"` UsagePeriod *RecurringPeriod `json:"usagePeriod,omitempty"` }CreatedAt *
EntitlementSharedFields defines model for EntitlementSharedFields.
type EntitlementStatic ¶
type EntitlementStatic struct { // Config The JSON parsable config of the entitlement. 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. Null if not 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. Defaults to createdAt if not updated. 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. 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 The balance of a metered entitlement. Balance *float64 `json:"balance,omitempty"` // Config The JSON parseable configuration value of a static entitlement. Config *string `json:"config,omitempty"` // HasAccess Whether the subject has access to the feature. HasAccess *bool `json:"hasAccess,omitempty"` // Overage The overage of a metered entitlement. Overage *float64 `json:"overage,omitempty"` // Usage Total usage of the feature in the period. Includes overages. Usage *float64 `json:"usage,omitempty"` }
EntitlementValue defines model for EntitlementValue.
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, it will not be used for grants or usage. 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. Null if not deleted. DeletedAt *time.Time `json:"deletedAt,omitempty"` // Id Readonly unique ULID identifier. Id *string `json:"id,omitempty"` // Key The unique key of the feature to reference it from your application. Key string `json:"key"` // Metadata Additional metadata for the feature. Metadata *map[string]string `json:"metadata,omitempty"` // MeterGroupByFilters Optional meter group by filters. Useful if the meter scope is broader than what feature tracks. MeterGroupByFilters *map[string]string `json:"meterGroupByFilters,omitempty"` // MeterSlug The meter that the feature is associated with and decreases grants by usage. // If present, the usage of the feature can be metered. 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. Defaults to createdAt if not updated. UpdatedAt *time.Time `json:"updatedAt,omitempty"` }
Feature defines model for Feature.
type FeatureCreateInputs ¶
type FeatureCreateInputs struct { // Key The unique key of the feature to reference it from your application. Key string `json:"key"` // Metadata Additional metadata for the feature. Metadata *map[string]string `json:"metadata,omitempty"` // MeterGroupByFilters Optional meter group by filters. Useful if the meter scope is broader than what feature tracks. MeterGroupByFilters *map[string]string `json:"meterGroupByFilters,omitempty"` // MeterSlug The meter that the feature is associated with and decreases grants by usage. // If present, the usage of the feature can be metered. 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 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.
const ( DAY GetEntitlementHistoryParamsWindowSize = "DAY" HOUR GetEntitlementHistoryParamsWindowSize = "HOUR" MINUTE GetEntitlementHistoryParamsWindowSize = "MINUTE" )
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 in a specific period.
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 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 ¶
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 MeterAggregation ¶
type MeterAggregation = models.MeterAggregation
MeterAggregation The aggregation type to use for the meter.
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 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 ¶
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 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 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 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 ¶
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 granularity of the underlying meter. EffectiveAt *time.Time `json:"effectiveAt,omitempty"` // RetainAnchor Should the reset retain the usage period anchor. // 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 feature // (POST /api/v1/features) CreateFeature(w http.ResponseWriter, r *http.Request) // Delete 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) // Delete 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 // (GET /api/v1/subjects/{subjectIdOrKey}/entitlements) ListSubjectEntitlements(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, params ListSubjectEntitlementsParams) // Create entitlement // (POST /api/v1/subjects/{subjectIdOrKey}/entitlements) CreateEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey) // Get the balance of a specific entitlement. // (GET /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/value) GetEntitlementValue(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, entitlementIdOrFeatureKey EntitlementIdOrFeatureKey, params GetEntitlementValueParams) // Delete entitlement // (DELETE /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId}) DeleteEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, entitlementId EntitlementId) // Get 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 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 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 { time.Time `json:"createdAt,omitempty"` DeletedAt *time.Time `json:"deletedAt,omitempty"` Id *string `json:"id,omitempty"` UpdatedAt *time.Time `json:"updatedAt,omitempty"` }CreatedAt *
SharedMetaFields Metadata fields for a resource. These fields are automatically populated by the system for the entities we manage.
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 TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type UnauthorizedProblemResponse ¶
type UnauthorizedProblemResponse = Problem
UnauthorizedProblemResponse A Problem Details object (RFC 7807). Additional properties specific to the problem type may be present.
type UnescapedCookieParamError ¶
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 entitlement (POST /api/v1/subjects/{subjectIdOrKey}/entitlements)
func (Unimplemented) CreateFeature ¶
func (_ Unimplemented) CreateFeature(w http.ResponseWriter, r *http.Request)
Create feature (POST /api/v1/features)
func (Unimplemented) CreateGrant ¶
func (_ Unimplemented) CreateGrant(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, entitlementId EntitlementId)
Create 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 entitlement (DELETE /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementId})
func (Unimplemented) DeleteFeature ¶
func (_ Unimplemented) DeleteFeature(w http.ResponseWriter, r *http.Request, featureId FeatureId)
Delete 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 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 balance of a specific 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 (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 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)
Delete a grant (DELETE /api/v1/grants/{grantId})
type UnmarshalingParamError ¶
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 WindowedBalanceHistory ¶
type WindowedBalanceHistory struct { // BurndownHistory The grant burn down history in the period. BurndownHistory *[]GrantBurnDownHistorySegment `json:"burndownHistory,omitempty"` // WindowedHistory The windowed balance history. // Only returns rows for windows where there was usage. 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. |