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 ChannelId
- type ChiServerOptions
- type ConflictProblem
- type ConflictProblemResponse
- type CreateEntitlementJSONRequestBody
- type CreateFeatureJSONRequestBody
- type CreateGrantJSONRequestBody
- type CreateMeterJSONRequestBody
- type CreateNotificationChannelJSONRequestBody
- type CreateNotificationRuleJSONRequestBody
- 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 EventId
- type ExpirationPeriod
- type ExpirationPeriodDuration
- type Feature
- type FeatureCreateInputs
- type FeatureId
- type FeatureMeta
- 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 ListEntitlementGrantResponse
- func (t ListEntitlementGrantResponse) AsListEntitlementGrantResponse0() (ListEntitlementGrantResponse0, error)
- func (t ListEntitlementGrantResponse) AsListEntitlementGrantResponse1() (ListEntitlementGrantResponse1, error)
- func (t *ListEntitlementGrantResponse) FromListEntitlementGrantResponse0(v ListEntitlementGrantResponse0) error
- func (t *ListEntitlementGrantResponse) FromListEntitlementGrantResponse1(v ListEntitlementGrantResponse1) error
- func (t ListEntitlementGrantResponse) MarshalJSON() ([]byte, error)
- func (t *ListEntitlementGrantResponse) MergeListEntitlementGrantResponse0(v ListEntitlementGrantResponse0) error
- func (t *ListEntitlementGrantResponse) MergeListEntitlementGrantResponse1(v ListEntitlementGrantResponse1) error
- func (t *ListEntitlementGrantResponse) UnmarshalJSON(b []byte) error
- type ListEntitlementGrantResponse0
- type ListEntitlementGrantResponse1
- type ListEntitlementGrantsParams
- type ListEntitlementGrantsParamsOrderBy
- type ListEntitlementResponse
- func (t ListEntitlementResponse) AsListEntitlementResponse0() (ListEntitlementResponse0, error)
- func (t ListEntitlementResponse) AsListEntitlementResponse1() (ListEntitlementResponse1, error)
- func (t *ListEntitlementResponse) FromListEntitlementResponse0(v ListEntitlementResponse0) error
- func (t *ListEntitlementResponse) FromListEntitlementResponse1(v ListEntitlementResponse1) error
- func (t ListEntitlementResponse) MarshalJSON() ([]byte, error)
- func (t *ListEntitlementResponse) MergeListEntitlementResponse0(v ListEntitlementResponse0) error
- func (t *ListEntitlementResponse) MergeListEntitlementResponse1(v ListEntitlementResponse1) error
- func (t *ListEntitlementResponse) UnmarshalJSON(b []byte) error
- type ListEntitlementResponse0
- type ListEntitlementResponse1
- type ListEntitlementsParams
- type ListEntitlementsParamsOrder
- type ListEntitlementsParamsOrderBy
- type ListEventsParams
- type ListFeatureResponse
- func (t ListFeatureResponse) AsListFeatureResponse0() (ListFeatureResponse0, error)
- func (t ListFeatureResponse) AsListFeatureResponse1() (ListFeatureResponse1, error)
- func (t *ListFeatureResponse) FromListFeatureResponse0(v ListFeatureResponse0) error
- func (t *ListFeatureResponse) FromListFeatureResponse1(v ListFeatureResponse1) error
- func (t ListFeatureResponse) MarshalJSON() ([]byte, error)
- func (t *ListFeatureResponse) MergeListFeatureResponse0(v ListFeatureResponse0) error
- func (t *ListFeatureResponse) MergeListFeatureResponse1(v ListFeatureResponse1) error
- func (t *ListFeatureResponse) UnmarshalJSON(b []byte) error
- type ListFeatureResponse0
- type ListFeatureResponse1
- type ListFeaturesParams
- type ListFeaturesParamsOrder
- type ListFeaturesParamsOrderBy
- type ListGrantsParams
- type ListGrantsParamsOrder
- type ListGrantsParamsOrderBy
- type ListNotificationChannelsParams
- type ListNotificationChannelsParamsOrder
- type ListNotificationChannelsParamsOrderBy
- type ListNotificationEventsParams
- type ListNotificationEventsParamsOrder
- type ListNotificationEventsParamsOrderBy
- type ListNotificationRulesParams
- type ListNotificationRulesParamsOrder
- type ListNotificationRulesParamsOrderBy
- type ListPortalTokensParams
- type ListSubjectEntitlementsParams
- type MeasureUsageFrom
- func (t MeasureUsageFrom) AsMeasureUsageFromEnum() (MeasureUsageFromEnum, error)
- func (t MeasureUsageFrom) AsMeasureUsageFromTime() (MeasureUsageFromTime, error)
- func (t *MeasureUsageFrom) FromMeasureUsageFromEnum(v MeasureUsageFromEnum) error
- func (t *MeasureUsageFrom) FromMeasureUsageFromTime(v MeasureUsageFromTime) error
- func (t MeasureUsageFrom) MarshalJSON() ([]byte, error)
- func (t *MeasureUsageFrom) MergeMeasureUsageFromEnum(v MeasureUsageFromEnum) error
- func (t *MeasureUsageFrom) MergeMeasureUsageFromTime(v MeasureUsageFromTime) error
- func (t *MeasureUsageFrom) UnmarshalJSON(b []byte) error
- type MeasureUsageFromEnum
- type MeasureUsageFromTime
- type Meter
- type MeterAggregation
- type MeterIdOrSlug
- type MeterQueryResult
- type MeterQueryRow
- type MiddlewareFunc
- type NotFoundProblemResponse
- type NotImplementedProblemResponse
- type NotificationChannel
- func (t NotificationChannel) AsNotificationChannelWebhook() (NotificationChannelWebhook, error)
- func (t NotificationChannel) Discriminator() (string, error)
- func (t *NotificationChannel) FromNotificationChannelWebhook(v NotificationChannelWebhook) error
- func (t NotificationChannel) MarshalJSON() ([]byte, error)
- func (t *NotificationChannel) MergeNotificationChannelWebhook(v NotificationChannelWebhook) error
- func (t *NotificationChannel) UnmarshalJSON(b []byte) error
- func (t NotificationChannel) ValueByDiscriminator() (interface{}, error)
- type NotificationChannelCommon
- type NotificationChannelCommonCreateRequest
- type NotificationChannelCreateRequest
- func (t NotificationChannelCreateRequest) AsNotificationChannelWebhookCreateRequest() (NotificationChannelWebhookCreateRequest, error)
- func (t NotificationChannelCreateRequest) Discriminator() (string, error)
- func (t *NotificationChannelCreateRequest) FromNotificationChannelWebhookCreateRequest(v NotificationChannelWebhookCreateRequest) error
- func (t NotificationChannelCreateRequest) MarshalJSON() ([]byte, error)
- func (t *NotificationChannelCreateRequest) MergeNotificationChannelWebhookCreateRequest(v NotificationChannelWebhookCreateRequest) error
- func (t *NotificationChannelCreateRequest) UnmarshalJSON(b []byte) error
- func (t NotificationChannelCreateRequest) ValueByDiscriminator() (interface{}, error)
- type NotificationChannelMeta
- type NotificationChannelType
- type NotificationChannelWebhook
- type NotificationChannelWebhookCreateRequest
- type NotificationChannels
- type NotificationChannelsResponse
- type NotificationEvent
- type NotificationEventBalanceThresholdPayload
- type NotificationEventCommonPayload
- type NotificationEventDeliveryStatus
- type NotificationEventDeliveryStatusState
- type NotificationEventPayload
- func (t NotificationEventPayload) AsNotificationEventBalanceThresholdPayload() (NotificationEventBalanceThresholdPayload, error)
- func (t NotificationEventPayload) Discriminator() (string, error)
- func (t *NotificationEventPayload) FromNotificationEventBalanceThresholdPayload(v NotificationEventBalanceThresholdPayload) error
- func (t NotificationEventPayload) MarshalJSON() ([]byte, error)
- func (t *NotificationEventPayload) MergeNotificationEventBalanceThresholdPayload(v NotificationEventBalanceThresholdPayload) error
- func (t *NotificationEventPayload) UnmarshalJSON(b []byte) error
- func (t NotificationEventPayload) ValueByDiscriminator() (interface{}, error)
- type NotificationEventType
- type NotificationEvents
- type NotificationEventsResponse
- type NotificationRule
- func (t NotificationRule) AsNotificationRuleBalanceThreshold() (NotificationRuleBalanceThreshold, error)
- func (t NotificationRule) Discriminator() (string, error)
- func (t *NotificationRule) FromNotificationRuleBalanceThreshold(v NotificationRuleBalanceThreshold) error
- func (t NotificationRule) MarshalJSON() ([]byte, error)
- func (t *NotificationRule) MergeNotificationRuleBalanceThreshold(v NotificationRuleBalanceThreshold) error
- func (t *NotificationRule) UnmarshalJSON(b []byte) error
- func (t NotificationRule) ValueByDiscriminator() (interface{}, error)
- type NotificationRuleBalanceThreshold
- type NotificationRuleBalanceThresholdCreateRequest
- type NotificationRuleBalanceThresholdValue
- type NotificationRuleBalanceThresholdValueType
- type NotificationRuleCommon
- type NotificationRuleCommonCreateRequest
- type NotificationRuleCreateRequest
- func (t NotificationRuleCreateRequest) AsNotificationRuleBalanceThresholdCreateRequest() (NotificationRuleBalanceThresholdCreateRequest, error)
- func (t NotificationRuleCreateRequest) Discriminator() (string, error)
- func (t *NotificationRuleCreateRequest) FromNotificationRuleBalanceThresholdCreateRequest(v NotificationRuleBalanceThresholdCreateRequest) error
- func (t NotificationRuleCreateRequest) MarshalJSON() ([]byte, error)
- func (t *NotificationRuleCreateRequest) MergeNotificationRuleBalanceThresholdCreateRequest(v NotificationRuleBalanceThresholdCreateRequest) error
- func (t *NotificationRuleCreateRequest) UnmarshalJSON(b []byte) error
- func (t NotificationRuleCreateRequest) ValueByDiscriminator() (interface{}, error)
- type NotificationRuleMeta
- type NotificationRules
- type NotificationRulesResponse
- type Order
- type OverrideEntitlementJSONRequestBody
- type Period
- type PortalToken
- type Problem
- type QueryFilterChannel
- type QueryFilterEntitlementType
- type QueryFilterFeature
- type QueryFilterGroupBy
- type QueryFilterMeterSlug
- type QueryFilterSubject
- type QueryFrom
- type QueryGroupBy
- type QueryIncludeDisabled
- type QueryLimit
- type QueryMeterParams
- type QueryOffset
- type QueryPage
- type QueryPageSize
- type QueryPortalMeterParams
- type QueryTo
- type QueryWindowSize
- type QueryWindowTimeZone
- type ReceiveSvixOperationalEventJSONRequestBody
- type RecurringPeriod
- type RecurringPeriodCreateInput
- type RecurringPeriodEnum
- type RequiredHeaderError
- type RequiredParamError
- type ResetEntitlementUsageJSONBody
- type ResetEntitlementUsageJSONRequestBody
- type RuleId
- 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) CreateNotificationChannel(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateNotificationRule(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) DeleteNotificationChannel(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteNotificationRule(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) GetEntitlementById(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) GetNotificationChannel(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetNotificationEvent(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetNotificationRule(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) ListNotificationChannels(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListNotificationEvents(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListNotificationRules(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) OverrideEntitlement(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) ReceiveSvixOperationalEvent(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ResetEntitlementUsage(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) TestNotificationRule(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdateNotificationChannel(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) UpdateNotificationRule(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 SvixOperationalWebhookRequest
- type SvixOperationalWebhookRequestType
- 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) CreateNotificationChannel(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) CreateNotificationRule(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) DeleteNotificationChannel(w http.ResponseWriter, r *http.Request, channelId ChannelId)
- func (_ Unimplemented) DeleteNotificationRule(w http.ResponseWriter, r *http.Request, ruleId RuleId)
- 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) GetEntitlementById(w http.ResponseWriter, r *http.Request, entitlementId EntitlementId)
- 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) GetNotificationChannel(w http.ResponseWriter, r *http.Request, channelId ChannelId)
- func (_ Unimplemented) GetNotificationEvent(w http.ResponseWriter, r *http.Request, eventId EventId)
- func (_ Unimplemented) GetNotificationRule(w http.ResponseWriter, r *http.Request, ruleId RuleId)
- 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) ListNotificationChannels(w http.ResponseWriter, r *http.Request, params ListNotificationChannelsParams)
- func (_ Unimplemented) ListNotificationEvents(w http.ResponseWriter, r *http.Request, params ListNotificationEventsParams)
- func (_ Unimplemented) ListNotificationRules(w http.ResponseWriter, r *http.Request, params ListNotificationRulesParams)
- 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) OverrideEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, ...)
- func (_ Unimplemented) QueryMeter(w http.ResponseWriter, r *http.Request, meterIdOrSlug MeterIdOrSlug, ...)
- func (_ Unimplemented) QueryPortalMeter(w http.ResponseWriter, r *http.Request, meterSlug string, ...)
- func (_ Unimplemented) ReceiveSvixOperationalEvent(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) ResetEntitlementUsage(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, ...)
- func (_ Unimplemented) TestNotificationRule(w http.ResponseWriter, r *http.Request, ruleId RuleId)
- func (_ Unimplemented) UpdateNotificationChannel(w http.ResponseWriter, r *http.Request, channelId ChannelId)
- func (_ Unimplemented) UpdateNotificationRule(w http.ResponseWriter, r *http.Request, ruleId RuleId)
- func (_ Unimplemented) UpsertSubject(w http.ResponseWriter, r *http.Request)
- func (_ Unimplemented) VoidGrant(w http.ResponseWriter, r *http.Request, grantId GrantId)
- type UnmarshalingParamError
- type UpdateNotificationChannelJSONRequestBody
- type UpdateNotificationRuleJSONRequestBody
- 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 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 CreateNotificationChannelJSONRequestBody ¶
type CreateNotificationChannelJSONRequestBody = NotificationChannelCreateRequest
CreateNotificationChannelJSONRequestBody defines body for CreateNotificationChannel for application/json ContentType.
type CreateNotificationRuleJSONRequestBody ¶
type CreateNotificationRuleJSONRequestBody = NotificationRuleCreateRequest
CreateNotificationRuleJSONRequestBody defines body for CreateNotificationRule 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 { // 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. 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 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"` // MeasureUsageFrom The time from which usage is measured. If not specified on creation, defaults to the entitlement creation time. MeasureUsageFrom time.Time `json:"measureUsageFrom"` // Metadata Additional metadata for the feature. Metadata *map[string]string `json:"metadata,omitempty"` // PreserveOverageAtReset If true, the overage is preserved at reset. If false, the usage is forgiven. PreserveOverageAtReset *bool `json:"preserveOverageAtReset,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"` // MeasureUsageFrom The time from which usage is measured. If not specified on creation, defaults to the entitlement creation time. MeasureUsageFrom time.Time `json:"measureUsageFrom"` }
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"` // MeasureUsageFrom The time from which usage is measured, defaults to the entitlement creation time. // The provided value is truncated to the granularity of the underlying meter. MeasureUsageFrom *MeasureUsageFrom `json:"measureUsageFrom,omitempty"` // Metadata Additional metadata for the feature. Metadata *map[string]string `json:"metadata,omitempty"` // PreserveOverageAtReset If true, the overage is preserved at reset. If false, the usage is forgiven. PreserveOverageAtReset *bool `json:"preserveOverageAtReset,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. 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 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 FeatureMeta ¶
type FeatureMeta struct { // Id A unique identifier for the notification rule. Id string `json:"id"` // Key The key is an immutable unique identifier of the feature used throughout the API, // for example when interacting with a subject's entitlements. Key string `json:"key"` }
FeatureMeta Limited representation of a feature resource which includes only its unique identifiers (id, key).
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 between events that changed either the grant burn down priority order or the usag 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 ListEntitlementGrantResponse ¶
type ListEntitlementGrantResponse struct {
// contains filtered or unexported fields
}
ListEntitlementGrantResponse defines model for ListEntitlementGrantResponse.
func (ListEntitlementGrantResponse) AsListEntitlementGrantResponse0 ¶
func (t ListEntitlementGrantResponse) AsListEntitlementGrantResponse0() (ListEntitlementGrantResponse0, error)
AsListEntitlementGrantResponse0 returns the union data inside the ListEntitlementGrantResponse as a ListEntitlementGrantResponse0
func (ListEntitlementGrantResponse) AsListEntitlementGrantResponse1 ¶
func (t ListEntitlementGrantResponse) AsListEntitlementGrantResponse1() (ListEntitlementGrantResponse1, error)
AsListEntitlementGrantResponse1 returns the union data inside the ListEntitlementGrantResponse as a ListEntitlementGrantResponse1
func (*ListEntitlementGrantResponse) FromListEntitlementGrantResponse0 ¶
func (t *ListEntitlementGrantResponse) FromListEntitlementGrantResponse0(v ListEntitlementGrantResponse0) error
FromListEntitlementGrantResponse0 overwrites any union data inside the ListEntitlementGrantResponse as the provided ListEntitlementGrantResponse0
func (*ListEntitlementGrantResponse) FromListEntitlementGrantResponse1 ¶
func (t *ListEntitlementGrantResponse) FromListEntitlementGrantResponse1(v ListEntitlementGrantResponse1) error
FromListEntitlementGrantResponse1 overwrites any union data inside the ListEntitlementGrantResponse as the provided ListEntitlementGrantResponse1
func (ListEntitlementGrantResponse) MarshalJSON ¶
func (t ListEntitlementGrantResponse) MarshalJSON() ([]byte, error)
func (*ListEntitlementGrantResponse) MergeListEntitlementGrantResponse0 ¶
func (t *ListEntitlementGrantResponse) MergeListEntitlementGrantResponse0(v ListEntitlementGrantResponse0) error
MergeListEntitlementGrantResponse0 performs a merge with any union data inside the ListEntitlementGrantResponse, using the provided ListEntitlementGrantResponse0
func (*ListEntitlementGrantResponse) MergeListEntitlementGrantResponse1 ¶
func (t *ListEntitlementGrantResponse) MergeListEntitlementGrantResponse1(v ListEntitlementGrantResponse1) error
MergeListEntitlementGrantResponse1 performs a merge with any union data inside the ListEntitlementGrantResponse, using the provided ListEntitlementGrantResponse1
func (*ListEntitlementGrantResponse) UnmarshalJSON ¶
func (t *ListEntitlementGrantResponse) UnmarshalJSON(b []byte) error
type ListEntitlementGrantResponse0 ¶
type ListEntitlementGrantResponse0 = []EntitlementGrant
ListEntitlementGrantResponse0 defines model for .
type ListEntitlementGrantResponse1 ¶
type ListEntitlementGrantResponse1 struct { // Items List of grants. Items []EntitlementGrant `json:"items"` // Page Current page number. Page int `json:"page"` // PageSize Number of grants per page. PageSize int `json:"pageSize"` // TotalCount Total number of grants. TotalCount int `json:"totalCount"` }
ListEntitlementGrantResponse1 defines model for .
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 ( CreatedAt ListEntitlementGrantsParamsOrderBy = "createdAt" Id ListEntitlementGrantsParamsOrderBy = "id" UpdatedAt ListEntitlementGrantsParamsOrderBy = "updatedAt" )
Defines values for ListEntitlementGrantsParamsOrderBy.
type ListEntitlementResponse ¶
type ListEntitlementResponse struct {
// contains filtered or unexported fields
}
ListEntitlementResponse defines model for ListEntitlementResponse.
func (ListEntitlementResponse) AsListEntitlementResponse0 ¶
func (t ListEntitlementResponse) AsListEntitlementResponse0() (ListEntitlementResponse0, error)
AsListEntitlementResponse0 returns the union data inside the ListEntitlementResponse as a ListEntitlementResponse0
func (ListEntitlementResponse) AsListEntitlementResponse1 ¶
func (t ListEntitlementResponse) AsListEntitlementResponse1() (ListEntitlementResponse1, error)
AsListEntitlementResponse1 returns the union data inside the ListEntitlementResponse as a ListEntitlementResponse1
func (*ListEntitlementResponse) FromListEntitlementResponse0 ¶
func (t *ListEntitlementResponse) FromListEntitlementResponse0(v ListEntitlementResponse0) error
FromListEntitlementResponse0 overwrites any union data inside the ListEntitlementResponse as the provided ListEntitlementResponse0
func (*ListEntitlementResponse) FromListEntitlementResponse1 ¶
func (t *ListEntitlementResponse) FromListEntitlementResponse1(v ListEntitlementResponse1) error
FromListEntitlementResponse1 overwrites any union data inside the ListEntitlementResponse as the provided ListEntitlementResponse1
func (ListEntitlementResponse) MarshalJSON ¶
func (t ListEntitlementResponse) MarshalJSON() ([]byte, error)
func (*ListEntitlementResponse) MergeListEntitlementResponse0 ¶
func (t *ListEntitlementResponse) MergeListEntitlementResponse0(v ListEntitlementResponse0) error
MergeListEntitlementResponse0 performs a merge with any union data inside the ListEntitlementResponse, using the provided ListEntitlementResponse0
func (*ListEntitlementResponse) MergeListEntitlementResponse1 ¶
func (t *ListEntitlementResponse) MergeListEntitlementResponse1(v ListEntitlementResponse1) error
MergeListEntitlementResponse1 performs a merge with any union data inside the ListEntitlementResponse, using the provided ListEntitlementResponse1
func (*ListEntitlementResponse) UnmarshalJSON ¶
func (t *ListEntitlementResponse) UnmarshalJSON(b []byte) error
type ListEntitlementResponse0 ¶
type ListEntitlementResponse0 = []Entitlement
ListEntitlementResponse0 defines model for .
type ListEntitlementResponse1 ¶
type ListEntitlementResponse1 struct { // Items List of entitlements. Items []Entitlement `json:"items"` // Page Current page number. Page int `json:"page"` // PageSize Number of entitlements per page. PageSize int `json:"pageSize"` // TotalCount Total number of entitlements. TotalCount int `json:"totalCount"` }
ListEntitlementResponse1 defines model for .
type ListEntitlementsParams ¶
type ListEntitlementsParams struct { // Page Page number to return Page *QueryPage `form:"page,omitempty" json:"page,omitempty"` // PageSize Number of entries to return per page PageSize *QueryPageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` // 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"` // Subject Filtering by multiple subjects. // // Usage: `?subject=customer-1&subject=customer-2` Subject *QueryFilterSubject `form:"subject,omitempty" json:"subject,omitempty"` // Feature Filtering by multiple features. // // Usage: `?feature=feature-1&feature=feature-2` Feature *QueryFilterFeature `form:"feature,omitempty" json:"feature,omitempty"` // EntitlementType Filtering by multiple entitlement types. // // Usage: `?entitlementType=metered&entitlementType=static` EntitlementType *QueryFilterEntitlementType `form:"entitlementType,omitempty" json:"entitlementType,omitempty"` // Order Order by field. // // Usage: `?order=ASC` Order *ListEntitlementsParamsOrder `form:"order,omitempty" json:"order,omitempty"` // OrderBy Order by field OrderBy *ListEntitlementsParamsOrderBy `form:"orderBy,omitempty" json:"orderBy,omitempty"` }
ListEntitlementsParams defines parameters for ListEntitlements.
type ListEntitlementsParamsOrder ¶
type ListEntitlementsParamsOrder string
ListEntitlementsParamsOrder defines parameters for ListEntitlements.
const ( ListEntitlementsParamsOrderSortOrderASC ListEntitlementsParamsOrder = "ASC" ListEntitlementsParamsOrderSortOrderDESC ListEntitlementsParamsOrder = "DESC" )
Defines values for ListEntitlementsParamsOrder.
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 ListFeatureResponse ¶
type ListFeatureResponse struct {
// contains filtered or unexported fields
}
ListFeatureResponse defines model for ListFeatureResponse.
func (ListFeatureResponse) AsListFeatureResponse0 ¶
func (t ListFeatureResponse) AsListFeatureResponse0() (ListFeatureResponse0, error)
AsListFeatureResponse0 returns the union data inside the ListFeatureResponse as a ListFeatureResponse0
func (ListFeatureResponse) AsListFeatureResponse1 ¶
func (t ListFeatureResponse) AsListFeatureResponse1() (ListFeatureResponse1, error)
AsListFeatureResponse1 returns the union data inside the ListFeatureResponse as a ListFeatureResponse1
func (*ListFeatureResponse) FromListFeatureResponse0 ¶
func (t *ListFeatureResponse) FromListFeatureResponse0(v ListFeatureResponse0) error
FromListFeatureResponse0 overwrites any union data inside the ListFeatureResponse as the provided ListFeatureResponse0
func (*ListFeatureResponse) FromListFeatureResponse1 ¶
func (t *ListFeatureResponse) FromListFeatureResponse1(v ListFeatureResponse1) error
FromListFeatureResponse1 overwrites any union data inside the ListFeatureResponse as the provided ListFeatureResponse1
func (ListFeatureResponse) MarshalJSON ¶
func (t ListFeatureResponse) MarshalJSON() ([]byte, error)
func (*ListFeatureResponse) MergeListFeatureResponse0 ¶
func (t *ListFeatureResponse) MergeListFeatureResponse0(v ListFeatureResponse0) error
MergeListFeatureResponse0 performs a merge with any union data inside the ListFeatureResponse, using the provided ListFeatureResponse0
func (*ListFeatureResponse) MergeListFeatureResponse1 ¶
func (t *ListFeatureResponse) MergeListFeatureResponse1(v ListFeatureResponse1) error
MergeListFeatureResponse1 performs a merge with any union data inside the ListFeatureResponse, using the provided ListFeatureResponse1
func (*ListFeatureResponse) UnmarshalJSON ¶
func (t *ListFeatureResponse) UnmarshalJSON(b []byte) error
type ListFeatureResponse0 ¶
type ListFeatureResponse0 = []Feature
ListFeatureResponse0 defines model for .
type ListFeatureResponse1 ¶
type ListFeatureResponse1 struct { // Items List of features. Items []Feature `json:"items"` // Page Current page number. Page int `json:"page"` // PageSize Number of features per page. PageSize int `json:"pageSize"` // TotalCount Total number of features. TotalCount int `json:"totalCount"` }
ListFeatureResponse1 defines model for .
type ListFeaturesParams ¶
type ListFeaturesParams struct { // Page Page number to return Page *QueryPage `form:"page,omitempty" json:"page,omitempty"` // PageSize Number of entries to return per page PageSize *QueryPageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` // 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"` // MeterSlug Filtering by multiple meterSlug. // // Usage: `?meterSlug=meter-1&meterSlug=meter-2` MeterSlug *QueryFilterMeterSlug `form:"meterSlug,omitempty" json:"meterSlug,omitempty"` // Order Order by field. // // Usage: `?order=ASC` Order *ListFeaturesParamsOrder `form:"order,omitempty" json:"order,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 ListFeaturesParamsOrder ¶
type ListFeaturesParamsOrder string
ListFeaturesParamsOrder defines parameters for ListFeatures.
const ( ListFeaturesParamsOrderSortOrderASC ListFeaturesParamsOrder = "ASC" ListFeaturesParamsOrderSortOrderDESC ListFeaturesParamsOrder = "DESC" )
Defines values for ListFeaturesParamsOrder.
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 { // Page Page number to return Page *QueryPage `form:"page,omitempty" json:"page,omitempty"` // PageSize Number of entries to return per page PageSize *QueryPageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` // 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"` // Subject Filtering by multiple subjects. // // Usage: `?subject=customer-1&subject=customer-2` Subject *QueryFilterSubject `form:"subject,omitempty" json:"subject,omitempty"` // Feature Filtering by multiple features. // // Usage: `?feature=feature-1&feature=feature-2` Feature *QueryFilterFeature `form:"feature,omitempty" json:"feature,omitempty"` // Order Order by field. // // Usage: `?order=ASC` Order *ListGrantsParamsOrder `form:"order,omitempty" json:"order,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 ListGrantsParamsOrder ¶
type ListGrantsParamsOrder string
ListGrantsParamsOrder defines parameters for ListGrants.
const ( ListGrantsParamsOrderSortOrderASC ListGrantsParamsOrder = "ASC" ListGrantsParamsOrderSortOrderDESC ListGrantsParamsOrder = "DESC" )
Defines values for ListGrantsParamsOrder.
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 ListNotificationChannelsParams ¶
type ListNotificationChannelsParams struct { // Page Page number to return Page *QueryPage `form:"page,omitempty" json:"page,omitempty"` // PageSize Number of entries to return per page PageSize *QueryPageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` // OrderBy Order by field OrderBy *ListNotificationChannelsParamsOrderBy `form:"orderBy,omitempty" json:"orderBy,omitempty"` // Order Order by field. // // Usage: `?order=ASC` Order *ListNotificationChannelsParamsOrder `form:"order,omitempty" json:"order,omitempty"` // IncludeDisabled Include disabled entries. IncludeDisabled *QueryIncludeDisabled `form:"includeDisabled,omitempty" json:"includeDisabled,omitempty"` // IncludeDeleted Include deleted entries. IncludeDeleted *IncludeDeleted `form:"includeDeleted,omitempty" json:"includeDeleted,omitempty"` }
ListNotificationChannelsParams defines parameters for ListNotificationChannels.
type ListNotificationChannelsParamsOrder ¶
type ListNotificationChannelsParamsOrder string
ListNotificationChannelsParamsOrder defines parameters for ListNotificationChannels.
const ( ListNotificationChannelsParamsOrderSortOrderASC ListNotificationChannelsParamsOrder = "ASC" ListNotificationChannelsParamsOrderSortOrderDESC ListNotificationChannelsParamsOrder = "DESC" )
Defines values for ListNotificationChannelsParamsOrder.
type ListNotificationChannelsParamsOrderBy ¶
type ListNotificationChannelsParamsOrderBy string
ListNotificationChannelsParamsOrderBy defines parameters for ListNotificationChannels.
const ( ListNotificationChannelsParamsOrderByCreatedAt ListNotificationChannelsParamsOrderBy = "createdAt" ListNotificationChannelsParamsOrderById ListNotificationChannelsParamsOrderBy = "id" ListNotificationChannelsParamsOrderByType ListNotificationChannelsParamsOrderBy = "type" ListNotificationChannelsParamsOrderByUpdatedAt ListNotificationChannelsParamsOrderBy = "updatedAt" )
Defines values for ListNotificationChannelsParamsOrderBy.
type ListNotificationEventsParams ¶
type ListNotificationEventsParams struct { // Page Page number to return Page *QueryPage `form:"page,omitempty" json:"page,omitempty"` // PageSize Number of entries to return per page PageSize *QueryPageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` // OrderBy Order by field OrderBy *ListNotificationEventsParamsOrderBy `form:"orderBy,omitempty" json:"orderBy,omitempty"` // Order Order by field. // // Usage: `?order=ASC` Order *ListNotificationEventsParamsOrder `form:"order,omitempty" json:"order,omitempty"` // 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"` // Feature Filtering by multiple features. // // Usage: `?feature=feature-1&feature=feature-2` Feature *QueryFilterFeature `form:"feature,omitempty" json:"feature,omitempty"` // Subject Filtering by multiple subjects. // // Usage: `?subject=customer-1&subject=customer-2` Subject *QueryFilterSubject `form:"subject,omitempty" json:"subject,omitempty"` // Rule Filtering by multiple rules. // // Usage: `?rule=ID1&rule=rule=ID2` Rule *[]string `form:"rule,omitempty" json:"rule,omitempty"` // Channel Filtering by multiple channels. // // Usage: `?channel=ID1&channel=ID2` Channel *[]string `form:"channel,omitempty" json:"channel,omitempty"` }
ListNotificationEventsParams defines parameters for ListNotificationEvents.
type ListNotificationEventsParamsOrder ¶
type ListNotificationEventsParamsOrder string
ListNotificationEventsParamsOrder defines parameters for ListNotificationEvents.
const ( ListNotificationEventsParamsOrderSortOrderASC ListNotificationEventsParamsOrder = "ASC" ListNotificationEventsParamsOrderSortOrderDESC ListNotificationEventsParamsOrder = "DESC" )
Defines values for ListNotificationEventsParamsOrder.
type ListNotificationEventsParamsOrderBy ¶
type ListNotificationEventsParamsOrderBy string
ListNotificationEventsParamsOrderBy defines parameters for ListNotificationEvents.
const ( ListNotificationEventsParamsOrderByCreatedAt ListNotificationEventsParamsOrderBy = "createdAt" ListNotificationEventsParamsOrderById ListNotificationEventsParamsOrderBy = "id" )
Defines values for ListNotificationEventsParamsOrderBy.
type ListNotificationRulesParams ¶
type ListNotificationRulesParams struct { // Page Page number to return Page *QueryPage `form:"page,omitempty" json:"page,omitempty"` // PageSize Number of entries to return per page PageSize *QueryPageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"` // OrderBy Order by field OrderBy *ListNotificationRulesParamsOrderBy `form:"orderBy,omitempty" json:"orderBy,omitempty"` // Order Order by field. // // Usage: `?order=ASC` Order *ListNotificationRulesParamsOrder `form:"order,omitempty" json:"order,omitempty"` // IncludeDisabled Include disabled entries. IncludeDisabled *QueryIncludeDisabled `form:"includeDisabled,omitempty" json:"includeDisabled,omitempty"` // IncludeDeleted Include deleted entries. IncludeDeleted *IncludeDeleted `form:"includeDeleted,omitempty" json:"includeDeleted,omitempty"` // Feature Filtering by multiple features. // // Usage: `?feature=feature-1&feature=feature-2` Feature *QueryFilterFeature `form:"feature,omitempty" json:"feature,omitempty"` // Channel Filtering by multiple notification channels. // // Usage: `?channel=channel-1&channel=channel-2` Channel *QueryFilterChannel `form:"channel,omitempty" json:"channel,omitempty"` }
ListNotificationRulesParams defines parameters for ListNotificationRules.
type ListNotificationRulesParamsOrder ¶
type ListNotificationRulesParamsOrder string
ListNotificationRulesParamsOrder defines parameters for ListNotificationRules.
const ( SortOrderASC ListNotificationRulesParamsOrder = "ASC" SortOrderDESC ListNotificationRulesParamsOrder = "DESC" )
Defines values for ListNotificationRulesParamsOrder.
type ListNotificationRulesParamsOrderBy ¶
type ListNotificationRulesParamsOrderBy string
ListNotificationRulesParamsOrderBy defines parameters for ListNotificationRules.
const ( ListNotificationRulesParamsOrderByCreatedAt ListNotificationRulesParamsOrderBy = "createdAt" ListNotificationRulesParamsOrderById ListNotificationRulesParamsOrderBy = "id" ListNotificationRulesParamsOrderByType ListNotificationRulesParamsOrderBy = "type" ListNotificationRulesParamsOrderByUpdatedAt ListNotificationRulesParamsOrderBy = "updatedAt" )
Defines values for ListNotificationRulesParamsOrderBy.
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 MeasureUsageFrom ¶
type MeasureUsageFrom struct {
// contains filtered or unexported fields
}
MeasureUsageFrom The time from which usage is measured, defaults to the entitlement creation time. The provided value is truncated to the granularity of the underlying meter.
func (MeasureUsageFrom) AsMeasureUsageFromEnum ¶
func (t MeasureUsageFrom) AsMeasureUsageFromEnum() (MeasureUsageFromEnum, error)
AsMeasureUsageFromEnum returns the union data inside the MeasureUsageFrom as a MeasureUsageFromEnum
func (MeasureUsageFrom) AsMeasureUsageFromTime ¶
func (t MeasureUsageFrom) AsMeasureUsageFromTime() (MeasureUsageFromTime, error)
AsMeasureUsageFromTime returns the union data inside the MeasureUsageFrom as a MeasureUsageFromTime
func (*MeasureUsageFrom) FromMeasureUsageFromEnum ¶
func (t *MeasureUsageFrom) FromMeasureUsageFromEnum(v MeasureUsageFromEnum) error
FromMeasureUsageFromEnum overwrites any union data inside the MeasureUsageFrom as the provided MeasureUsageFromEnum
func (*MeasureUsageFrom) FromMeasureUsageFromTime ¶
func (t *MeasureUsageFrom) FromMeasureUsageFromTime(v MeasureUsageFromTime) error
FromMeasureUsageFromTime overwrites any union data inside the MeasureUsageFrom as the provided MeasureUsageFromTime
func (MeasureUsageFrom) MarshalJSON ¶
func (t MeasureUsageFrom) MarshalJSON() ([]byte, error)
func (*MeasureUsageFrom) MergeMeasureUsageFromEnum ¶
func (t *MeasureUsageFrom) MergeMeasureUsageFromEnum(v MeasureUsageFromEnum) error
MergeMeasureUsageFromEnum performs a merge with any union data inside the MeasureUsageFrom, using the provided MeasureUsageFromEnum
func (*MeasureUsageFrom) MergeMeasureUsageFromTime ¶
func (t *MeasureUsageFrom) MergeMeasureUsageFromTime(v MeasureUsageFromTime) error
MergeMeasureUsageFromTime performs a merge with any union data inside the MeasureUsageFrom, using the provided MeasureUsageFromTime
func (*MeasureUsageFrom) UnmarshalJSON ¶
func (t *MeasureUsageFrom) UnmarshalJSON(b []byte) error
type MeasureUsageFromEnum ¶
type MeasureUsageFromEnum string
MeasureUsageFromEnum defines model for MeasureUsageFromEnum.
const ( CURRENTPERIODSTART MeasureUsageFromEnum = "CURRENT_PERIOD_START" NOW MeasureUsageFromEnum = "NOW" )
Defines values for MeasureUsageFromEnum.
type MeasureUsageFromTime ¶
MeasureUsageFromTime defines model for MeasureUsageFromTime.
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 NotificationChannel ¶
type NotificationChannel struct {
// contains filtered or unexported fields
}
NotificationChannel defines model for NotificationChannel.
func (NotificationChannel) AsNotificationChannelWebhook ¶
func (t NotificationChannel) AsNotificationChannelWebhook() (NotificationChannelWebhook, error)
AsNotificationChannelWebhook returns the union data inside the NotificationChannel as a NotificationChannelWebhook
func (NotificationChannel) Discriminator ¶
func (t NotificationChannel) Discriminator() (string, error)
func (*NotificationChannel) FromNotificationChannelWebhook ¶
func (t *NotificationChannel) FromNotificationChannelWebhook(v NotificationChannelWebhook) error
FromNotificationChannelWebhook overwrites any union data inside the NotificationChannel as the provided NotificationChannelWebhook
func (NotificationChannel) MarshalJSON ¶
func (t NotificationChannel) MarshalJSON() ([]byte, error)
func (*NotificationChannel) MergeNotificationChannelWebhook ¶
func (t *NotificationChannel) MergeNotificationChannelWebhook(v NotificationChannelWebhook) error
MergeNotificationChannelWebhook performs a merge with any union data inside the NotificationChannel, using the provided NotificationChannelWebhook
func (*NotificationChannel) UnmarshalJSON ¶
func (t *NotificationChannel) UnmarshalJSON(b []byte) error
func (NotificationChannel) ValueByDiscriminator ¶
func (t NotificationChannel) ValueByDiscriminator() (interface{}, error)
type NotificationChannelCommon ¶
type NotificationChannelCommon struct { // CreatedAt Timestamp when the channel was created. CreatedAt time.Time `json:"createdAt"` // DeletedAt Timestamp when the channel was deleted. DeletedAt *time.Time `json:"deletedAt,omitempty"` // Disabled Whether the channel is disabled or not. Disabled bool `json:"disabled"` // Id A unique identifier for the notification channel. Id string `json:"id"` // Name User friendly name of the channel. Name string `json:"name"` // Type The type of the notification channel. Type NotificationChannelType `json:"type"` // UpdatedAt Timestamp when the channel was modified. UpdatedAt time.Time `json:"updatedAt"` }
NotificationChannelCommon defines model for NotificationChannelCommon.
type NotificationChannelCommonCreateRequest ¶
type NotificationChannelCommonCreateRequest struct { // Disabled Whether the channel is disabled or not. Disabled *bool `json:"disabled,omitempty"` // Name User friendly name of the channel. Name string `json:"name"` // Type The type of the notification channel. Type NotificationChannelType `json:"type"` }
NotificationChannelCommonCreateRequest Common fields for create notification channel request.
type NotificationChannelCreateRequest ¶
type NotificationChannelCreateRequest struct {
// contains filtered or unexported fields
}
NotificationChannelCreateRequest defines model for NotificationChannelCreateRequest.
func (NotificationChannelCreateRequest) AsNotificationChannelWebhookCreateRequest ¶
func (t NotificationChannelCreateRequest) AsNotificationChannelWebhookCreateRequest() (NotificationChannelWebhookCreateRequest, error)
AsNotificationChannelWebhookCreateRequest returns the union data inside the NotificationChannelCreateRequest as a NotificationChannelWebhookCreateRequest
func (NotificationChannelCreateRequest) Discriminator ¶
func (t NotificationChannelCreateRequest) Discriminator() (string, error)
func (*NotificationChannelCreateRequest) FromNotificationChannelWebhookCreateRequest ¶
func (t *NotificationChannelCreateRequest) FromNotificationChannelWebhookCreateRequest(v NotificationChannelWebhookCreateRequest) error
FromNotificationChannelWebhookCreateRequest overwrites any union data inside the NotificationChannelCreateRequest as the provided NotificationChannelWebhookCreateRequest
func (NotificationChannelCreateRequest) MarshalJSON ¶
func (t NotificationChannelCreateRequest) MarshalJSON() ([]byte, error)
func (*NotificationChannelCreateRequest) MergeNotificationChannelWebhookCreateRequest ¶
func (t *NotificationChannelCreateRequest) MergeNotificationChannelWebhookCreateRequest(v NotificationChannelWebhookCreateRequest) error
MergeNotificationChannelWebhookCreateRequest performs a merge with any union data inside the NotificationChannelCreateRequest, using the provided NotificationChannelWebhookCreateRequest
func (*NotificationChannelCreateRequest) UnmarshalJSON ¶
func (t *NotificationChannelCreateRequest) UnmarshalJSON(b []byte) error
func (NotificationChannelCreateRequest) ValueByDiscriminator ¶
func (t NotificationChannelCreateRequest) ValueByDiscriminator() (interface{}, error)
type NotificationChannelMeta ¶
type NotificationChannelMeta struct { // Id A unique identifier for the notification channel. Id string `json:"id"` // Type The type of the notification channel. Type NotificationChannelType `json:"type"` }
NotificationChannelMeta Limited representation of notification channel which includes only the channel identifier and its type.
type NotificationChannelType ¶
type NotificationChannelType string
NotificationChannelType The type of the notification channel.
const (
WEBHOOK NotificationChannelType = "WEBHOOK"
)
Defines values for NotificationChannelType.
type NotificationChannelWebhook ¶
type NotificationChannelWebhook struct { // CreatedAt Timestamp when the channel was created. CreatedAt time.Time `json:"createdAt"` // CustomHeaders Custom HTTP headers sent as part of the webhook request. CustomHeaders *map[string]interface{} `json:"customHeaders"` // DeletedAt Timestamp when the channel was deleted. DeletedAt *time.Time `json:"deletedAt,omitempty"` // Disabled Whether the channel is disabled or not. Disabled bool `json:"disabled"` // Id A unique identifier for the notification channel. Id string `json:"id"` // Name User friendly name of the channel. Name string `json:"name"` // SigningSecret Signing secret used for webhook request validation on the receiving end. // // Format: `base64` encoded random bytes optionally prefixed with `whsec_`. Recommended size: 24 SigningSecret string `json:"signingSecret"` // Type The type of the notification channel. Type NotificationChannelType `json:"type"` // UpdatedAt Timestamp when the channel was modified. UpdatedAt time.Time `json:"updatedAt"` // Url Webhook URL where the notification is sent. Url string `json:"url"` }
NotificationChannelWebhook defines model for NotificationChannelWebhook.
type NotificationChannelWebhookCreateRequest ¶
type NotificationChannelWebhookCreateRequest struct { // CustomHeaders Custom HTTP headers sent as part of the webhook request. CustomHeaders *map[string]interface{} `json:"customHeaders"` // Disabled Whether the channel is disabled or not. Disabled *bool `json:"disabled,omitempty"` // Name User friendly name of the channel. Name string `json:"name"` // SigningSecret Signing secret used for webhook request validation on the receiving end. Automatically generated if not provided. // // Format: `base64` encoded random bytes optionally prefixed with `whsec_`. Recommended size: 24 SigningSecret *string `json:"signingSecret"` // Type The type of the notification channel. Type NotificationChannelType `json:"type"` // Url Webhook URL where the notification is sent. Url string `json:"url"` }
NotificationChannelWebhookCreateRequest defines model for NotificationChannelWebhookCreateRequest.
type NotificationChannels ¶
type NotificationChannels = []NotificationChannel
NotificationChannels List of channels.
type NotificationChannelsResponse ¶
type NotificationChannelsResponse struct { // Items List of channels. Items NotificationChannels `json:"items"` // Page Current page number. Page int `json:"page"` // PageSize Number of channels per page. PageSize int `json:"pageSize"` // TotalCount Total number of channels. TotalCount int `json:"totalCount"` }
NotificationChannelsResponse defines model for NotificationChannelsResponse.
type NotificationEvent ¶
type NotificationEvent struct { // Annotations List of annotations managed by the system. Annotations *map[string]interface{} `json:"annotations,omitempty"` // CreatedAt Timestamp when the notification event was created. CreatedAt time.Time `json:"createdAt"` // DeliveryStatus The delivery status of the notification event. DeliveryStatus []NotificationEventDeliveryStatus `json:"deliveryStatus"` // Id A unique identifier for the notification event. Id string `json:"id"` // Payload The actual payload sent to channel as part of the notification event. Payload NotificationEventPayload `json:"payload"` Rule NotificationRule `json:"rule"` // Type The type of the notification event. Type NotificationEventType `json:"type"` }
NotificationEvent Notification event generated by the system based on the criteria defined in the corresponding a notification rule.
The `payload` field contains the actual message sent to the notification channel.
type NotificationEventBalanceThresholdPayload ¶
type NotificationEventBalanceThresholdPayload struct { Data struct { // Entitlement Metered entitlements are useful for many different use cases, from setting up usage based access to implementing complex credit systems. Access is determined based on feature usage using a balance calculation (the "usage allowance" provided by the issued grants is "burnt down" by the usage). Entitlement EntitlementMetered `json:"entitlement"` // Feature A feature is a feature or service offered to a customer. // For example: CPU-Hours, Tokens, API Calls, etc. Feature Feature `json:"feature"` // Subject A subject is a unique identifier for a user or entity. Subject Subject `json:"subject"` // Threshold Threshold value with multiple supported types. Threshold NotificationRuleBalanceThresholdValue `json:"threshold"` Value EntitlementValue `json:"value"` } `json:"data"` // Id A unique identifier for the notification event the payload belongs to. Id string `json:"id"` // Timestamp Timestamp when the notification event was created. Timestamp time.Time `json:"timestamp"` // Type The type of the notification event. Type NotificationEventType `json:"type"` }
NotificationEventBalanceThresholdPayload defines model for NotificationEventBalanceThresholdPayload.
type NotificationEventCommonPayload ¶
type NotificationEventCommonPayload struct { // Id A unique identifier for the notification event the payload belongs to. Id string `json:"id"` // Timestamp Timestamp when the notification event was created. Timestamp time.Time `json:"timestamp"` // Type The type of the notification event. Type NotificationEventType `json:"type"` }
NotificationEventCommonPayload Common fields for notification event payload.
type NotificationEventDeliveryStatus ¶
type NotificationEventDeliveryStatus struct { // Channel Limited representation of notification channel which includes only the channel identifier and its type. Channel NotificationChannelMeta `json:"channel"` Reason *string `json:"reason,omitempty"` State NotificationEventDeliveryStatusState `json:"state"` UpdatedAt time.Time `json:"updatedAt"` }
NotificationEventDeliveryStatus defines model for NotificationEventDeliveryStatus.
type NotificationEventDeliveryStatusState ¶
type NotificationEventDeliveryStatusState string
NotificationEventDeliveryStatusState defines model for NotificationEventDeliveryStatus.State.
const ( FAILED NotificationEventDeliveryStatusState = "FAILED" PENDING NotificationEventDeliveryStatusState = "PENDING" SENDING NotificationEventDeliveryStatusState = "SENDING" SUCCESS NotificationEventDeliveryStatusState = "SUCCESS" )
Defines values for NotificationEventDeliveryStatusState.
type NotificationEventPayload ¶
type NotificationEventPayload struct {
// contains filtered or unexported fields
}
NotificationEventPayload The actual payload sent to channel as part of the notification event.
func (NotificationEventPayload) AsNotificationEventBalanceThresholdPayload ¶
func (t NotificationEventPayload) AsNotificationEventBalanceThresholdPayload() (NotificationEventBalanceThresholdPayload, error)
AsNotificationEventBalanceThresholdPayload returns the union data inside the NotificationEventPayload as a NotificationEventBalanceThresholdPayload
func (NotificationEventPayload) Discriminator ¶
func (t NotificationEventPayload) Discriminator() (string, error)
func (*NotificationEventPayload) FromNotificationEventBalanceThresholdPayload ¶
func (t *NotificationEventPayload) FromNotificationEventBalanceThresholdPayload(v NotificationEventBalanceThresholdPayload) error
FromNotificationEventBalanceThresholdPayload overwrites any union data inside the NotificationEventPayload as the provided NotificationEventBalanceThresholdPayload
func (NotificationEventPayload) MarshalJSON ¶
func (t NotificationEventPayload) MarshalJSON() ([]byte, error)
func (*NotificationEventPayload) MergeNotificationEventBalanceThresholdPayload ¶
func (t *NotificationEventPayload) MergeNotificationEventBalanceThresholdPayload(v NotificationEventBalanceThresholdPayload) error
MergeNotificationEventBalanceThresholdPayload performs a merge with any union data inside the NotificationEventPayload, using the provided NotificationEventBalanceThresholdPayload
func (*NotificationEventPayload) UnmarshalJSON ¶
func (t *NotificationEventPayload) UnmarshalJSON(b []byte) error
func (NotificationEventPayload) ValueByDiscriminator ¶
func (t NotificationEventPayload) ValueByDiscriminator() (interface{}, error)
type NotificationEventType ¶
type NotificationEventType string
NotificationEventType The type of the notification event.
const (
EntitlementsBalanceThreshold NotificationEventType = "entitlements.balance.threshold"
)
Defines values for NotificationEventType.
type NotificationEvents ¶
type NotificationEvents = []NotificationEvent
NotificationEvents List of notification events.
type NotificationEventsResponse ¶
type NotificationEventsResponse struct { // Items List of notification events. Items NotificationEvents `json:"items"` // Page Current page number. Page int `json:"page"` // PageSize Number of rules per page. PageSize int `json:"pageSize"` // TotalCount Total number of rules. TotalCount int `json:"totalCount"` }
NotificationEventsResponse defines model for NotificationEventsResponse.
type NotificationRule ¶
type NotificationRule struct {
// contains filtered or unexported fields
}
NotificationRule defines model for NotificationRule.
func (NotificationRule) AsNotificationRuleBalanceThreshold ¶
func (t NotificationRule) AsNotificationRuleBalanceThreshold() (NotificationRuleBalanceThreshold, error)
AsNotificationRuleBalanceThreshold returns the union data inside the NotificationRule as a NotificationRuleBalanceThreshold
func (NotificationRule) Discriminator ¶
func (t NotificationRule) Discriminator() (string, error)
func (*NotificationRule) FromNotificationRuleBalanceThreshold ¶
func (t *NotificationRule) FromNotificationRuleBalanceThreshold(v NotificationRuleBalanceThreshold) error
FromNotificationRuleBalanceThreshold overwrites any union data inside the NotificationRule as the provided NotificationRuleBalanceThreshold
func (NotificationRule) MarshalJSON ¶
func (t NotificationRule) MarshalJSON() ([]byte, error)
func (*NotificationRule) MergeNotificationRuleBalanceThreshold ¶
func (t *NotificationRule) MergeNotificationRuleBalanceThreshold(v NotificationRuleBalanceThreshold) error
MergeNotificationRuleBalanceThreshold performs a merge with any union data inside the NotificationRule, using the provided NotificationRuleBalanceThreshold
func (*NotificationRule) UnmarshalJSON ¶
func (t *NotificationRule) UnmarshalJSON(b []byte) error
func (NotificationRule) ValueByDiscriminator ¶
func (t NotificationRule) ValueByDiscriminator() (interface{}, error)
type NotificationRuleBalanceThreshold ¶
type NotificationRuleBalanceThreshold struct { // Channels List of notification channels the rule applies to. Channels []NotificationChannelMeta `json:"channels"` // CreatedAt Timestamp when the rule was created. CreatedAt time.Time `json:"createdAt"` // DeletedAt Timestamp when the channel was deleted. DeletedAt *time.Time `json:"deletedAt,omitempty"` // Disabled Whether the rule is disabled or not. Disabled bool `json:"disabled"` // Features Optional field containing list of features the rule applies to. Features *[]FeatureMeta `json:"features"` // Id A unique identifier for the notification rule. Id string `json:"id"` // Name The user friendly name of the notification rule. Name string `json:"name"` // Thresholds List of thresholds the rule suppose to be triggered. Thresholds []NotificationRuleBalanceThresholdValue `json:"thresholds"` // Type The type of the notification event. Type NotificationEventType `json:"type"` // UpdatedAt Timestamp when the rule was modified. UpdatedAt time.Time `json:"updatedAt"` }
NotificationRuleBalanceThreshold defines model for NotificationRuleBalanceThreshold.
type NotificationRuleBalanceThresholdCreateRequest ¶
type NotificationRuleBalanceThresholdCreateRequest struct { // Channels List of notification channel identifiers or names the rule applies to. Channels []string `json:"channels"` // Disabled Whether the rule is disabled or not. Disabled *bool `json:"disabled,omitempty"` // Features Optional field for defining the scope of notification by feature. It may contain features by id or key. Features *[]string `json:"features"` // Name The user friendly name of the notification rule. Name string `json:"name"` // Thresholds List of thresholds the rule suppose to be triggered. Thresholds []NotificationRuleBalanceThresholdValue `json:"thresholds"` // Type The type of the notification event. Type NotificationEventType `json:"type"` }
NotificationRuleBalanceThresholdCreateRequest defines model for NotificationRuleBalanceThresholdCreateRequest.
type NotificationRuleBalanceThresholdValue ¶
type NotificationRuleBalanceThresholdValue struct { Type NotificationRuleBalanceThresholdValueType `json:"type"` Value float64 `json:"value"` }
NotificationRuleBalanceThresholdValue Threshold value with multiple supported types.
type NotificationRuleBalanceThresholdValueType ¶
type NotificationRuleBalanceThresholdValueType string
NotificationRuleBalanceThresholdValueType defines model for NotificationRuleBalanceThresholdValue.Type.
const ( NUMBER NotificationRuleBalanceThresholdValueType = "NUMBER" PERCENT NotificationRuleBalanceThresholdValueType = "PERCENT" )
Defines values for NotificationRuleBalanceThresholdValueType.
type NotificationRuleCommon ¶
type NotificationRuleCommon struct { // Channels List of notification channels the rule applies to. Channels []NotificationChannelMeta `json:"channels"` // CreatedAt Timestamp when the rule was created. CreatedAt time.Time `json:"createdAt"` // DeletedAt Timestamp when the channel was deleted. DeletedAt *time.Time `json:"deletedAt,omitempty"` // Disabled Whether the rule is disabled or not. Disabled bool `json:"disabled"` // Id A unique identifier for the notification rule. Id string `json:"id"` // Name The user friendly name of the notification rule. Name string `json:"name"` // Type The type of the notification event. Type NotificationEventType `json:"type"` // UpdatedAt Timestamp when the rule was modified. UpdatedAt time.Time `json:"updatedAt"` }
NotificationRuleCommon defines model for NotificationRuleCommon.
type NotificationRuleCommonCreateRequest ¶
type NotificationRuleCommonCreateRequest struct { // Channels List of notification channel identifiers or names the rule applies to. Channels []string `json:"channels"` // Disabled Whether the rule is disabled or not. Disabled *bool `json:"disabled,omitempty"` // Name The user friendly name of the notification rule. Name string `json:"name"` // Type The type of the notification event. Type NotificationEventType `json:"type"` }
NotificationRuleCommonCreateRequest Defines the common fields for create notification rule request.
type NotificationRuleCreateRequest ¶
type NotificationRuleCreateRequest struct {
// contains filtered or unexported fields
}
NotificationRuleCreateRequest defines model for NotificationRuleCreateRequest.
func (NotificationRuleCreateRequest) AsNotificationRuleBalanceThresholdCreateRequest ¶
func (t NotificationRuleCreateRequest) AsNotificationRuleBalanceThresholdCreateRequest() (NotificationRuleBalanceThresholdCreateRequest, error)
AsNotificationRuleBalanceThresholdCreateRequest returns the union data inside the NotificationRuleCreateRequest as a NotificationRuleBalanceThresholdCreateRequest
func (NotificationRuleCreateRequest) Discriminator ¶
func (t NotificationRuleCreateRequest) Discriminator() (string, error)
func (*NotificationRuleCreateRequest) FromNotificationRuleBalanceThresholdCreateRequest ¶
func (t *NotificationRuleCreateRequest) FromNotificationRuleBalanceThresholdCreateRequest(v NotificationRuleBalanceThresholdCreateRequest) error
FromNotificationRuleBalanceThresholdCreateRequest overwrites any union data inside the NotificationRuleCreateRequest as the provided NotificationRuleBalanceThresholdCreateRequest
func (NotificationRuleCreateRequest) MarshalJSON ¶
func (t NotificationRuleCreateRequest) MarshalJSON() ([]byte, error)
func (*NotificationRuleCreateRequest) MergeNotificationRuleBalanceThresholdCreateRequest ¶
func (t *NotificationRuleCreateRequest) MergeNotificationRuleBalanceThresholdCreateRequest(v NotificationRuleBalanceThresholdCreateRequest) error
MergeNotificationRuleBalanceThresholdCreateRequest performs a merge with any union data inside the NotificationRuleCreateRequest, using the provided NotificationRuleBalanceThresholdCreateRequest
func (*NotificationRuleCreateRequest) UnmarshalJSON ¶
func (t *NotificationRuleCreateRequest) UnmarshalJSON(b []byte) error
func (NotificationRuleCreateRequest) ValueByDiscriminator ¶
func (t NotificationRuleCreateRequest) ValueByDiscriminator() (interface{}, error)
type NotificationRuleMeta ¶
type NotificationRuleMeta struct { // Id A unique identifier for the notification rule. Id string `json:"id"` // Type The type of the notification event. Type NotificationEventType `json:"type"` }
NotificationRuleMeta Defines the common fields of a notification rule.
type NotificationRules ¶
type NotificationRules = []NotificationRule
NotificationRules List of rules.
type NotificationRulesResponse ¶
type NotificationRulesResponse struct { // Items List of rules. Items NotificationRules `json:"items"` // Page Current page number. Page int `json:"page"` // PageSize Number of rules per page. PageSize int `json:"pageSize"` // TotalCount Total number of rules. TotalCount int `json:"totalCount"` }
NotificationRulesResponse defines model for NotificationRulesResponse.
type OverrideEntitlementJSONRequestBody ¶
type OverrideEntitlementJSONRequestBody = EntitlementCreateInputs
OverrideEntitlementJSONRequestBody defines body for OverrideEntitlement for application/json ContentType.
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 QueryFilterChannel ¶
type QueryFilterChannel = []string
QueryFilterChannel defines model for queryFilterChannel.
type QueryFilterEntitlementType ¶
type QueryFilterEntitlementType = []string
QueryFilterEntitlementType defines model for queryFilterEntitlementType.
type QueryFilterFeature ¶
type QueryFilterFeature = []string
QueryFilterFeature defines model for queryFilterFeature.
type QueryFilterGroupBy ¶
QueryFilterGroupBy Simple filter for group bys with exact match.
Usage: `?filterGroupBy[type]=input&filterGroupBy[model]=gpt-4`
type QueryFilterMeterSlug ¶
type QueryFilterMeterSlug = []string
QueryFilterMeterSlug defines model for queryFilterMeterSlug.
type QueryFilterSubject ¶
type QueryFilterSubject = []string
QueryFilterSubject defines model for queryFilterSubject.
type QueryIncludeDisabled ¶
type QueryIncludeDisabled = bool
QueryIncludeDisabled defines model for queryIncludeDisabled.
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 ReceiveSvixOperationalEventJSONRequestBody ¶
type ReceiveSvixOperationalEventJSONRequestBody = SvixOperationalWebhookRequest
ReceiveSvixOperationalEventJSONRequestBody defines body for ReceiveSvixOperationalEvent for application/json ContentType.
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 minute due to how historical meter data is stored. EffectiveAt *time.Time `json:"effectiveAt,omitempty"` // PreserveOverage Determines whether the overage is preserved or forgiven, overriding the entitlement's default behavior. // - If true, the overage is preserved. // - If false, the overage is forgiven. PreserveOverage *bool `json:"preserveOverage,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) // Get an entitlement // (GET /api/v1/entitlements/{entitlementId}) GetEntitlementById(w http.ResponseWriter, r *http.Request, entitlementId EntitlementId) // 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) // List notification channels // (GET /api/v1/notification/channels) ListNotificationChannels(w http.ResponseWriter, r *http.Request, params ListNotificationChannelsParams) // Create a notification channel // (POST /api/v1/notification/channels) CreateNotificationChannel(w http.ResponseWriter, r *http.Request) // Delete a notification channel // (DELETE /api/v1/notification/channels/{channelId}) DeleteNotificationChannel(w http.ResponseWriter, r *http.Request, channelId ChannelId) // Get notification channel // (GET /api/v1/notification/channels/{channelId}) GetNotificationChannel(w http.ResponseWriter, r *http.Request, channelId ChannelId) // Update notification channel // (PUT /api/v1/notification/channels/{channelId}) UpdateNotificationChannel(w http.ResponseWriter, r *http.Request, channelId ChannelId) // List notification evens // (GET /api/v1/notification/events) ListNotificationEvents(w http.ResponseWriter, r *http.Request, params ListNotificationEventsParams) // Get notification event // (GET /api/v1/notification/events/{eventId}) GetNotificationEvent(w http.ResponseWriter, r *http.Request, eventId EventId) // List notification rules // (GET /api/v1/notification/rules) ListNotificationRules(w http.ResponseWriter, r *http.Request, params ListNotificationRulesParams) // Create a notification rule // (POST /api/v1/notification/rules) CreateNotificationRule(w http.ResponseWriter, r *http.Request) // Delete a notification rule // (DELETE /api/v1/notification/rules/{ruleId}) DeleteNotificationRule(w http.ResponseWriter, r *http.Request, ruleId RuleId) // Get notification rule // (GET /api/v1/notification/rules/{ruleId}) GetNotificationRule(w http.ResponseWriter, r *http.Request, ruleId RuleId) // Update a notification rule // (PUT /api/v1/notification/rules/{ruleId}) UpdateNotificationRule(w http.ResponseWriter, r *http.Request, ruleId RuleId) // Test notification rule // (POST /api/v1/notification/rules/{ruleId}/test) TestNotificationRule(w http.ResponseWriter, r *http.Request, ruleId RuleId) // Receive Svix operational events // (POST /api/v1/notification/webhook/svix) ReceiveSvixOperationalEvent(w http.ResponseWriter, r *http.Request) // 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) // List grants for an entitlement // (GET /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants) ListEntitlementGrants(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, entitlementIdOrFeatureKey EntitlementIdOrFeatureKey, params ListEntitlementGrantsParams) // Create a grant // (POST /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants) CreateGrant(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, entitlementIdOrFeatureKey EntitlementIdOrFeatureKey) // Override an entitlement // (PUT /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/override) OverrideEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, entitlementIdOrFeatureKey EntitlementIdOrFeatureKey) // 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) // 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) CreateNotificationChannel ¶
func (siw *ServerInterfaceWrapper) CreateNotificationChannel(w http.ResponseWriter, r *http.Request)
CreateNotificationChannel operation middleware
func (*ServerInterfaceWrapper) CreateNotificationRule ¶
func (siw *ServerInterfaceWrapper) CreateNotificationRule(w http.ResponseWriter, r *http.Request)
CreateNotificationRule 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) DeleteNotificationChannel ¶
func (siw *ServerInterfaceWrapper) DeleteNotificationChannel(w http.ResponseWriter, r *http.Request)
DeleteNotificationChannel operation middleware
func (*ServerInterfaceWrapper) DeleteNotificationRule ¶
func (siw *ServerInterfaceWrapper) DeleteNotificationRule(w http.ResponseWriter, r *http.Request)
DeleteNotificationRule 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) GetEntitlementById ¶
func (siw *ServerInterfaceWrapper) GetEntitlementById(w http.ResponseWriter, r *http.Request)
GetEntitlementById 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) GetNotificationChannel ¶
func (siw *ServerInterfaceWrapper) GetNotificationChannel(w http.ResponseWriter, r *http.Request)
GetNotificationChannel operation middleware
func (*ServerInterfaceWrapper) GetNotificationEvent ¶
func (siw *ServerInterfaceWrapper) GetNotificationEvent(w http.ResponseWriter, r *http.Request)
GetNotificationEvent operation middleware
func (*ServerInterfaceWrapper) GetNotificationRule ¶
func (siw *ServerInterfaceWrapper) GetNotificationRule(w http.ResponseWriter, r *http.Request)
GetNotificationRule 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) ListNotificationChannels ¶
func (siw *ServerInterfaceWrapper) ListNotificationChannels(w http.ResponseWriter, r *http.Request)
ListNotificationChannels operation middleware
func (*ServerInterfaceWrapper) ListNotificationEvents ¶
func (siw *ServerInterfaceWrapper) ListNotificationEvents(w http.ResponseWriter, r *http.Request)
ListNotificationEvents operation middleware
func (*ServerInterfaceWrapper) ListNotificationRules ¶
func (siw *ServerInterfaceWrapper) ListNotificationRules(w http.ResponseWriter, r *http.Request)
ListNotificationRules 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) OverrideEntitlement ¶
func (siw *ServerInterfaceWrapper) OverrideEntitlement(w http.ResponseWriter, r *http.Request)
OverrideEntitlement 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) ReceiveSvixOperationalEvent ¶
func (siw *ServerInterfaceWrapper) ReceiveSvixOperationalEvent(w http.ResponseWriter, r *http.Request)
ReceiveSvixOperationalEvent operation middleware
func (*ServerInterfaceWrapper) ResetEntitlementUsage ¶
func (siw *ServerInterfaceWrapper) ResetEntitlementUsage(w http.ResponseWriter, r *http.Request)
ResetEntitlementUsage operation middleware
func (*ServerInterfaceWrapper) TestNotificationRule ¶
func (siw *ServerInterfaceWrapper) TestNotificationRule(w http.ResponseWriter, r *http.Request)
TestNotificationRule operation middleware
func (*ServerInterfaceWrapper) UpdateNotificationChannel ¶
func (siw *ServerInterfaceWrapper) UpdateNotificationChannel(w http.ResponseWriter, r *http.Request)
UpdateNotificationChannel operation middleware
func (*ServerInterfaceWrapper) UpdateNotificationRule ¶
func (siw *ServerInterfaceWrapper) UpdateNotificationRule(w http.ResponseWriter, r *http.Request)
UpdateNotificationRule 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 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 SvixOperationalWebhookRequest ¶
type SvixOperationalWebhookRequest struct { Data map[string]interface{} `json:"data"` Type SvixOperationalWebhookRequestType `json:"type"` }
SvixOperationalWebhookRequest defines model for SvixOperationalWebhookRequest.
type SvixOperationalWebhookRequestType ¶
type SvixOperationalWebhookRequestType string
SvixOperationalWebhookRequestType defines model for SvixOperationalWebhookRequest.Type.
const ( EndpointCreated SvixOperationalWebhookRequestType = "endpoint.created" EndpointDeleted SvixOperationalWebhookRequestType = "endpoint.deleted" EndpointDisabled SvixOperationalWebhookRequestType = "endpoint.disabled" EndpointUpdated SvixOperationalWebhookRequestType = "endpoint.updated" MessageAttemptExhausted SvixOperationalWebhookRequestType = "message.attempt.exhausted" MessageAttemptFailing SvixOperationalWebhookRequestType = "message.attempt.failing" MessageAttemptRecovered SvixOperationalWebhookRequestType = "message.attempt.recovered" )
Defines values for SvixOperationalWebhookRequestType.
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 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, entitlementIdOrFeatureKey EntitlementIdOrFeatureKey)
Create a grant (POST /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants)
func (Unimplemented) CreateMeter ¶
func (_ Unimplemented) CreateMeter(w http.ResponseWriter, r *http.Request)
☁ Create meter (POST /api/v1/meters)
func (Unimplemented) CreateNotificationChannel ¶
func (_ Unimplemented) CreateNotificationChannel(w http.ResponseWriter, r *http.Request)
Create a notification channel (POST /api/v1/notification/channels)
func (Unimplemented) CreateNotificationRule ¶
func (_ Unimplemented) CreateNotificationRule(w http.ResponseWriter, r *http.Request)
Create a notification rule (POST /api/v1/notification/rules)
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) DeleteNotificationChannel ¶
func (_ Unimplemented) DeleteNotificationChannel(w http.ResponseWriter, r *http.Request, channelId ChannelId)
Delete a notification channel (DELETE /api/v1/notification/channels/{channelId})
func (Unimplemented) DeleteNotificationRule ¶
func (_ Unimplemented) DeleteNotificationRule(w http.ResponseWriter, r *http.Request, ruleId RuleId)
Delete a notification rule (DELETE /api/v1/notification/rules/{ruleId})
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) GetEntitlementById ¶
func (_ Unimplemented) GetEntitlementById(w http.ResponseWriter, r *http.Request, entitlementId EntitlementId)
Get an entitlement (GET /api/v1/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) GetNotificationChannel ¶
func (_ Unimplemented) GetNotificationChannel(w http.ResponseWriter, r *http.Request, channelId ChannelId)
Get notification channel (GET /api/v1/notification/channels/{channelId})
func (Unimplemented) GetNotificationEvent ¶
func (_ Unimplemented) GetNotificationEvent(w http.ResponseWriter, r *http.Request, eventId EventId)
Get notification event (GET /api/v1/notification/events/{eventId})
func (Unimplemented) GetNotificationRule ¶
func (_ Unimplemented) GetNotificationRule(w http.ResponseWriter, r *http.Request, ruleId RuleId)
Get notification rule (GET /api/v1/notification/rules/{ruleId})
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, entitlementIdOrFeatureKey EntitlementIdOrFeatureKey, params ListEntitlementGrantsParams)
List grants for an entitlement (GET /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/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) ListNotificationChannels ¶
func (_ Unimplemented) ListNotificationChannels(w http.ResponseWriter, r *http.Request, params ListNotificationChannelsParams)
List notification channels (GET /api/v1/notification/channels)
func (Unimplemented) ListNotificationEvents ¶
func (_ Unimplemented) ListNotificationEvents(w http.ResponseWriter, r *http.Request, params ListNotificationEventsParams)
List notification evens (GET /api/v1/notification/events)
func (Unimplemented) ListNotificationRules ¶
func (_ Unimplemented) ListNotificationRules(w http.ResponseWriter, r *http.Request, params ListNotificationRulesParams)
List notification rules (GET /api/v1/notification/rules)
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) OverrideEntitlement ¶
func (_ Unimplemented) OverrideEntitlement(w http.ResponseWriter, r *http.Request, subjectIdOrKey SubjectIdOrKey, entitlementIdOrFeatureKey EntitlementIdOrFeatureKey)
Override an entitlement (PUT /api/v1/subjects/{subjectIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/override)
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) ReceiveSvixOperationalEvent ¶
func (_ Unimplemented) ReceiveSvixOperationalEvent(w http.ResponseWriter, r *http.Request)
Receive Svix operational events (POST /api/v1/notification/webhook/svix)
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) TestNotificationRule ¶
func (_ Unimplemented) TestNotificationRule(w http.ResponseWriter, r *http.Request, ruleId RuleId)
Test notification rule (POST /api/v1/notification/rules/{ruleId}/test)
func (Unimplemented) UpdateNotificationChannel ¶
func (_ Unimplemented) UpdateNotificationChannel(w http.ResponseWriter, r *http.Request, channelId ChannelId)
Update notification channel (PUT /api/v1/notification/channels/{channelId})
func (Unimplemented) UpdateNotificationRule ¶
func (_ Unimplemented) UpdateNotificationRule(w http.ResponseWriter, r *http.Request, ruleId RuleId)
Update a notification rule (PUT /api/v1/notification/rules/{ruleId})
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 ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error
type UpdateNotificationChannelJSONRequestBody ¶
type UpdateNotificationChannelJSONRequestBody = NotificationChannelCreateRequest
UpdateNotificationChannelJSONRequestBody defines body for UpdateNotificationChannel for application/json ContentType.
type UpdateNotificationRuleJSONRequestBody ¶
type UpdateNotificationRuleJSONRequestBody = NotificationRuleCreateRequest
UpdateNotificationRuleJSONRequestBody defines body for UpdateNotificationRule for application/json ContentType.
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 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. |