Documentation
¶
Index ¶
- Variables
- type Addon
- type AddonRateCard
- type AlignmentMixin
- type App
- type AppCustomInvoicing
- type AppCustomInvoicingCustomer
- type AppCustomer
- type AppStripe
- type AppStripeCustomer
- type BalanceSnapshot
- type BillingCustomerLock
- type BillingCustomerOverride
- type BillingInvoice
- type BillingInvoiceFlatFeeLineConfig
- type BillingInvoiceLine
- type BillingInvoiceLineDiscount
- type BillingInvoiceLineDiscountBase
- type BillingInvoiceLineUsageDiscount
- type BillingInvoiceUsageBasedLineConfig
- type BillingInvoiceValidationIssue
- type BillingProfile
- type BillingSequenceNumbers
- type BillingWorkflowConfig
- type Customer
- type CustomerSubjects
- type Entitlement
- type Feature
- type Grant
- type Meter
- type NotificationChannel
- type NotificationEvent
- type NotificationEventDeliveryStatus
- type NotificationRule
- type Plan
- type PlanAddon
- type PlanPhase
- type PlanRateCard
- type RateCard
- type Subscription
- type SubscriptionAddon
- type SubscriptionAddonQuantity
- type SubscriptionItem
- type SubscriptionPhase
- type TotalsMixin
- type UsageReset
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BillingDiscountsValueScanner = entutils.JSONStringValueScanner[*billing.Discounts]() BillingDiscountReasonValueScanner = entutils.JSONStringValueScanner[*billing.DiscountReason]() )
View Source
var ( EntitlementTemplateValueScanner = entutils.JSONStringValueScanner[*productcatalog.EntitlementTemplate]() TaxConfigValueScanner = entutils.JSONStringValueScanner[*productcatalog.TaxConfig]() PriceValueScanner = entutils.JSONStringValueScanner[*productcatalog.Price]() DiscountsValueScanner = entutils.JSONStringValueScanner[*productcatalog.Discounts]() )
View Source
var AnnotationsValueScanner = field.ValueScannerFunc[models.Annotations, *sql.NullString]{ V: func(annotations models.Annotations) (driver.Value, error) { b, err := json.Marshal(annotations) if err != nil { return nil, err } return string(b), nil }, S: func(ns *sql.NullString) (models.Annotations, error) { var annotations models.Annotations if ns == nil || !ns.Valid { return annotations, nil } if err := json.Unmarshal([]byte(ns.String), &annotations); err != nil { return nil, err } return annotations, nil }, }
View Source
var ChannelConfigValueScanner = field.ValueScannerFunc[notification.ChannelConfig, *sql.NullString]{ V: func(config notification.ChannelConfig) (driver.Value, error) { switch config.Type { case notification.ChannelTypeWebhook: serde := channelConfigSerde[notification.WebHookChannelConfig]{ ChannelConfigMeta: notification.ChannelConfigMeta{ Type: config.Type, }, Data: config.WebHook, } return json.Marshal(serde) default: return nil, fmt.Errorf("unknown channel type: %s", config.Type) } }, S: func(ns *sql.NullString) (notification.ChannelConfig, error) { var channelConfig notification.ChannelConfig if ns == nil || !ns.Valid { return channelConfig, nil } data := []byte(ns.String) var meta notification.ChannelConfigMeta if err := json.Unmarshal(data, &meta); err != nil { return channelConfig, err } switch meta.Type { case notification.ChannelTypeWebhook: serde := channelConfigSerde[notification.WebHookChannelConfig]{ ChannelConfigMeta: notification.ChannelConfigMeta{ Type: meta.Type, }, Data: notification.WebHookChannelConfig{}, } if err := json.Unmarshal(data, &serde); err != nil { return channelConfig, err } channelConfig = notification.ChannelConfig{ ChannelConfigMeta: serde.ChannelConfigMeta, WebHook: serde.Data, } default: return channelConfig, fmt.Errorf("unknown channel type: %s", meta.Type) } return channelConfig, nil }, }
View Source
var RuleConfigValueScanner = field.ValueScannerFunc[notification.RuleConfig, *sql.NullString]{ V: func(config notification.RuleConfig) (driver.Value, error) { switch config.Type { case notification.RuleTypeBalanceThreshold: serde := ruleConfigSerde[notification.BalanceThresholdRuleConfig]{ RuleConfigMeta: notification.RuleConfigMeta{ Type: config.Type, }, Data: config.BalanceThreshold, } return json.Marshal(serde) default: return nil, fmt.Errorf("unknown rule config type: %s", config.Type) } }, S: func(ns *sql.NullString) (notification.RuleConfig, error) { var ruleConfig notification.RuleConfig if ns == nil || !ns.Valid { return ruleConfig, nil } data := []byte(ns.String) var meta notification.RuleConfigMeta if err := json.Unmarshal(data, &meta); err != nil { return ruleConfig, err } switch meta.Type { case notification.RuleTypeBalanceThreshold: serde := ruleConfigSerde[notification.BalanceThresholdRuleConfig]{ RuleConfigMeta: notification.RuleConfigMeta{ Type: meta.Type, }, Data: notification.BalanceThresholdRuleConfig{}, } if err := json.Unmarshal(data, &serde); err != nil { return ruleConfig, err } ruleConfig = notification.RuleConfig{ RuleConfigMeta: serde.RuleConfigMeta, BalanceThreshold: serde.Data, } default: return ruleConfig, fmt.Errorf("unknown rule type: %s", meta.Type) } return ruleConfig, nil }, }
Functions ¶
This section is empty.
Types ¶
type AddonRateCard ¶
func (AddonRateCard) Edges ¶
func (AddonRateCard) Edges() []ent.Edge
func (AddonRateCard) Fields ¶
func (AddonRateCard) Fields() []ent.Field
func (AddonRateCard) Indexes ¶
func (AddonRateCard) Indexes() []ent.Index
func (AddonRateCard) Mixin ¶
func (AddonRateCard) Mixin() []ent.Mixin
type AlignmentMixin ¶
AlignmentMixin for Alignment config
func (AlignmentMixin) Fields ¶
func (AlignmentMixin) Fields() []ent.Field
type AppCustomInvoicing ¶
AppCustomInvoicing holds the schema definition for the AppCustomInvoicing entity.
func (AppCustomInvoicing) Edges ¶
func (AppCustomInvoicing) Edges() []ent.Edge
func (AppCustomInvoicing) Fields ¶
func (AppCustomInvoicing) Fields() []ent.Field
func (AppCustomInvoicing) Indexes ¶
func (AppCustomInvoicing) Indexes() []ent.Index
func (AppCustomInvoicing) Mixin ¶
func (AppCustomInvoicing) Mixin() []ent.Mixin
type AppCustomInvoicingCustomer ¶
AppCustomInvoicingCustomer holds the schema definition for the AppCustomInvoicingCustomer entity.
func (AppCustomInvoicingCustomer) Edges ¶
func (AppCustomInvoicingCustomer) Edges() []ent.Edge
func (AppCustomInvoicingCustomer) Fields ¶
func (AppCustomInvoicingCustomer) Fields() []ent.Field
func (AppCustomInvoicingCustomer) Indexes ¶
func (AppCustomInvoicingCustomer) Indexes() []ent.Index
func (AppCustomInvoicingCustomer) Mixin ¶
func (AppCustomInvoicingCustomer) Mixin() []ent.Mixin
type AppCustomer ¶
AppCustomer holds the schema definition for the AppCustomer entity.
func (AppCustomer) Edges ¶
func (AppCustomer) Edges() []ent.Edge
func (AppCustomer) Fields ¶
func (AppCustomer) Fields() []ent.Field
func (AppCustomer) Indexes ¶
func (AppCustomer) Indexes() []ent.Index
func (AppCustomer) Mixin ¶
func (AppCustomer) Mixin() []ent.Mixin
type AppStripeCustomer ¶
AppStripeCustomer holds the schema definition for the AppStripeCustomer entity.
func (AppStripeCustomer) Edges ¶
func (AppStripeCustomer) Edges() []ent.Edge
func (AppStripeCustomer) Fields ¶
func (AppStripeCustomer) Fields() []ent.Field
func (AppStripeCustomer) Indexes ¶
func (AppStripeCustomer) Indexes() []ent.Index
func (AppStripeCustomer) Mixin ¶
func (AppStripeCustomer) Mixin() []ent.Mixin
type BalanceSnapshot ¶
func (BalanceSnapshot) Edges ¶
func (BalanceSnapshot) Edges() []ent.Edge
func (BalanceSnapshot) Fields ¶
func (BalanceSnapshot) Fields() []ent.Field
func (BalanceSnapshot) Indexes ¶
func (BalanceSnapshot) Indexes() []ent.Index
func (BalanceSnapshot) Mixin ¶
func (BalanceSnapshot) Mixin() []ent.Mixin
type BillingCustomerLock ¶
func (BillingCustomerLock) Fields ¶
func (BillingCustomerLock) Fields() []ent.Field
func (BillingCustomerLock) Indexes ¶
func (BillingCustomerLock) Indexes() []ent.Index
func (BillingCustomerLock) Mixin ¶
func (BillingCustomerLock) Mixin() []ent.Mixin
type BillingCustomerOverride ¶
func (BillingCustomerOverride) Edges ¶
func (BillingCustomerOverride) Edges() []ent.Edge
func (BillingCustomerOverride) Fields ¶
func (BillingCustomerOverride) Fields() []ent.Field
func (BillingCustomerOverride) Indexes ¶
func (BillingCustomerOverride) Indexes() []ent.Index
func (BillingCustomerOverride) Mixin ¶
func (BillingCustomerOverride) Mixin() []ent.Mixin
type BillingInvoice ¶
func (BillingInvoice) Edges ¶
func (BillingInvoice) Edges() []ent.Edge
func (BillingInvoice) Fields ¶
func (BillingInvoice) Fields() []ent.Field
func (BillingInvoice) Indexes ¶
func (BillingInvoice) Indexes() []ent.Index
func (BillingInvoice) Mixin ¶
func (BillingInvoice) Mixin() []ent.Mixin
type BillingInvoiceFlatFeeLineConfig ¶
func (BillingInvoiceFlatFeeLineConfig) Fields ¶
func (BillingInvoiceFlatFeeLineConfig) Fields() []ent.Field
func (BillingInvoiceFlatFeeLineConfig) Mixin ¶
func (BillingInvoiceFlatFeeLineConfig) Mixin() []ent.Mixin
type BillingInvoiceLine ¶
func (BillingInvoiceLine) Edges ¶
func (BillingInvoiceLine) Edges() []ent.Edge
func (BillingInvoiceLine) Fields ¶
func (BillingInvoiceLine) Fields() []ent.Field
func (BillingInvoiceLine) Indexes ¶
func (BillingInvoiceLine) Indexes() []ent.Index
func (BillingInvoiceLine) Mixin ¶
func (BillingInvoiceLine) Mixin() []ent.Mixin
type BillingInvoiceLineDiscount ¶
TODO[later]: Rename to BillingInvoiceLineUsageDiscount
func (BillingInvoiceLineDiscount) Edges ¶
func (BillingInvoiceLineDiscount) Edges() []ent.Edge
func (BillingInvoiceLineDiscount) Fields ¶
func (BillingInvoiceLineDiscount) Fields() []ent.Field
func (BillingInvoiceLineDiscount) Indexes ¶
func (BillingInvoiceLineDiscount) Indexes() []ent.Index
func (BillingInvoiceLineDiscount) Mixin ¶
func (BillingInvoiceLineDiscount) Mixin() []ent.Mixin
type BillingInvoiceLineDiscountBase ¶
func (BillingInvoiceLineDiscountBase) Fields ¶
func (BillingInvoiceLineDiscountBase) Fields() []ent.Field
type BillingInvoiceLineUsageDiscount ¶
func (BillingInvoiceLineUsageDiscount) Edges ¶
func (BillingInvoiceLineUsageDiscount) Edges() []ent.Edge
func (BillingInvoiceLineUsageDiscount) Fields ¶
func (BillingInvoiceLineUsageDiscount) Fields() []ent.Field
func (BillingInvoiceLineUsageDiscount) Indexes ¶
func (BillingInvoiceLineUsageDiscount) Indexes() []ent.Index
func (BillingInvoiceLineUsageDiscount) Mixin ¶
func (BillingInvoiceLineUsageDiscount) Mixin() []ent.Mixin
type BillingInvoiceUsageBasedLineConfig ¶
func (BillingInvoiceUsageBasedLineConfig) Fields ¶
func (BillingInvoiceUsageBasedLineConfig) Fields() []ent.Field
func (BillingInvoiceUsageBasedLineConfig) Mixin ¶
func (BillingInvoiceUsageBasedLineConfig) Mixin() []ent.Mixin
type BillingInvoiceValidationIssue ¶
func (BillingInvoiceValidationIssue) Edges ¶
func (BillingInvoiceValidationIssue) Edges() []ent.Edge
func (BillingInvoiceValidationIssue) Fields ¶
func (BillingInvoiceValidationIssue) Fields() []ent.Field
func (BillingInvoiceValidationIssue) Indexes ¶
func (BillingInvoiceValidationIssue) Indexes() []ent.Index
func (BillingInvoiceValidationIssue) Mixin ¶
func (BillingInvoiceValidationIssue) Mixin() []ent.Mixin
type BillingProfile ¶
func (BillingProfile) Edges ¶
func (BillingProfile) Edges() []ent.Edge
func (BillingProfile) Fields ¶
func (BillingProfile) Fields() []ent.Field
func (BillingProfile) Indexes ¶
func (BillingProfile) Indexes() []ent.Index
func (BillingProfile) Mixin ¶
func (BillingProfile) Mixin() []ent.Mixin
type BillingSequenceNumbers ¶
func (BillingSequenceNumbers) Fields ¶
func (BillingSequenceNumbers) Fields() []ent.Field
func (BillingSequenceNumbers) Indexes ¶
func (BillingSequenceNumbers) Indexes() []ent.Index
func (BillingSequenceNumbers) Mixin ¶
func (BillingSequenceNumbers) Mixin() []ent.Mixin
type BillingWorkflowConfig ¶
func (BillingWorkflowConfig) Edges ¶
func (BillingWorkflowConfig) Edges() []ent.Edge
func (BillingWorkflowConfig) Fields ¶
func (BillingWorkflowConfig) Fields() []ent.Field
func (BillingWorkflowConfig) Indexes ¶
func (BillingWorkflowConfig) Indexes() []ent.Index
func (BillingWorkflowConfig) Mixin ¶
func (BillingWorkflowConfig) Mixin() []ent.Mixin
type CustomerSubjects ¶
CustomerSubject stores the subject keys for a customer
func (CustomerSubjects) Edges ¶
func (CustomerSubjects) Edges() []ent.Edge
func (CustomerSubjects) Fields ¶
func (CustomerSubjects) Fields() []ent.Field
func (CustomerSubjects) Indexes ¶
func (CustomerSubjects) Indexes() []ent.Index
func (CustomerSubjects) Mixin ¶
func (CustomerSubjects) Mixin() []ent.Mixin
type Entitlement ¶
func (Entitlement) Edges ¶
func (Entitlement) Edges() []ent.Edge
func (Entitlement) Fields ¶
func (Entitlement) Fields() []ent.Field
func (Entitlement) Indexes ¶
func (Entitlement) Indexes() []ent.Index
func (Entitlement) Mixin ¶
func (Entitlement) Mixin() []ent.Mixin
type NotificationChannel ¶
func (NotificationChannel) Edges ¶
func (NotificationChannel) Edges() []ent.Edge
func (NotificationChannel) Fields ¶
func (NotificationChannel) Fields() []ent.Field
func (NotificationChannel) Indexes ¶
func (NotificationChannel) Indexes() []ent.Index
func (NotificationChannel) Mixin ¶
func (NotificationChannel) Mixin() []ent.Mixin
type NotificationEvent ¶
func (NotificationEvent) Edges ¶
func (NotificationEvent) Edges() []ent.Edge
func (NotificationEvent) Fields ¶
func (NotificationEvent) Fields() []ent.Field
func (NotificationEvent) Indexes ¶
func (NotificationEvent) Indexes() []ent.Index
func (NotificationEvent) Mixin ¶
func (NotificationEvent) Mixin() []ent.Mixin
type NotificationEventDeliveryStatus ¶
func (NotificationEventDeliveryStatus) Edges ¶
func (NotificationEventDeliveryStatus) Edges() []ent.Edge
func (NotificationEventDeliveryStatus) Fields ¶
func (NotificationEventDeliveryStatus) Fields() []ent.Field
func (NotificationEventDeliveryStatus) Indexes ¶
func (NotificationEventDeliveryStatus) Indexes() []ent.Index
func (NotificationEventDeliveryStatus) Mixin ¶
func (NotificationEventDeliveryStatus) Mixin() []ent.Mixin
type NotificationRule ¶
func (NotificationRule) Edges ¶
func (NotificationRule) Edges() []ent.Edge
func (NotificationRule) Fields ¶
func (NotificationRule) Fields() []ent.Field
func (NotificationRule) Indexes ¶
func (NotificationRule) Indexes() []ent.Index
func (NotificationRule) Mixin ¶
func (NotificationRule) Mixin() []ent.Mixin
type PlanRateCard ¶
func (PlanRateCard) Edges ¶
func (PlanRateCard) Edges() []ent.Edge
func (PlanRateCard) Fields ¶
func (PlanRateCard) Fields() []ent.Field
func (PlanRateCard) Indexes ¶
func (PlanRateCard) Indexes() []ent.Index
func (PlanRateCard) Mixin ¶
func (PlanRateCard) Mixin() []ent.Mixin
type Subscription ¶
func (Subscription) Edges ¶
func (Subscription) Edges() []ent.Edge
func (Subscription) Fields ¶
func (Subscription) Fields() []ent.Field
func (Subscription) Indexes ¶
func (Subscription) Indexes() []ent.Index
func (Subscription) Mixin ¶
func (Subscription) Mixin() []ent.Mixin
type SubscriptionAddon ¶
SubscriptionAddon is an instantiated addon for a subscription
func (SubscriptionAddon) Edges ¶
func (SubscriptionAddon) Edges() []ent.Edge
func (SubscriptionAddon) Fields ¶
func (SubscriptionAddon) Fields() []ent.Field
func (SubscriptionAddon) Mixin ¶
func (SubscriptionAddon) Mixin() []ent.Mixin
type SubscriptionAddonQuantity ¶
func (SubscriptionAddonQuantity) Edges ¶
func (SubscriptionAddonQuantity) Edges() []ent.Edge
func (SubscriptionAddonQuantity) Fields ¶
func (SubscriptionAddonQuantity) Fields() []ent.Field
func (SubscriptionAddonQuantity) Indexes ¶
func (SubscriptionAddonQuantity) Indexes() []ent.Index
func (SubscriptionAddonQuantity) Mixin ¶
func (SubscriptionAddonQuantity) Mixin() []ent.Mixin
type SubscriptionItem ¶
func (SubscriptionItem) Edges ¶
func (SubscriptionItem) Edges() []ent.Edge
func (SubscriptionItem) Fields ¶
func (SubscriptionItem) Fields() []ent.Field
func (SubscriptionItem) Indexes ¶
func (SubscriptionItem) Indexes() []ent.Index
func (SubscriptionItem) Mixin ¶
func (SubscriptionItem) Mixin() []ent.Mixin
type SubscriptionPhase ¶
func (SubscriptionPhase) Edges ¶
func (SubscriptionPhase) Edges() []ent.Edge
func (SubscriptionPhase) Fields ¶
func (SubscriptionPhase) Fields() []ent.Field
func (SubscriptionPhase) Indexes ¶
func (SubscriptionPhase) Indexes() []ent.Index
func (SubscriptionPhase) Mixin ¶
func (SubscriptionPhase) Mixin() []ent.Mixin
type TotalsMixin ¶
func (TotalsMixin) Fields ¶
func (m TotalsMixin) Fields() []ent.Field
type UsageReset ¶
func (UsageReset) Edges ¶
func (UsageReset) Edges() []ent.Edge
func (UsageReset) Fields ¶
func (UsageReset) Fields() []ent.Field
func (UsageReset) Indexes ¶
func (UsageReset) Indexes() []ent.Index
func (UsageReset) Mixin ¶
func (UsageReset) Mixin() []ent.Mixin
Click to show internal directories.
Click to hide internal directories.