Documentation
¶
Index ¶
- type AdminAPISecret
- type App
- type AppListItem
- type AppResource
- type BotProtectionProviderSecret
- type Collaborator
- type CollaboratorInvitation
- type CollaboratorRole
- type OAuthClientSecret
- type OAuthClientSecretKey
- type OAuthSSOProviderClientSecret
- type OnboardEntry
- type Price
- type PriceType
- type SAMLIdpSigningCertificate
- type SAMLIdpSigningSecrets
- type SAMLSpSigningCertificate
- type SAMLSpSigningSecrets
- type SMSProviderConfigurationDenoInput
- type SMSProviderConfigurationInput
- type SMSProviderConfigurationTwilioInput
- type SMSProviderConfigurationWebhookInput
- type SMSProviderCustomSMSProviderConfigs
- type SMSProviderSecrets
- type SMSProviderTwilioCredentials
- type SMSRegion
- type SMTPSecret
- type SecretConfig
- type Subscription
- type SubscriptionCheckout
- type SubscriptionCheckoutStatus
- type SubscriptionPlan
- type SubscriptionUpdatePreview
- type SubscriptionUsage
- type SubscriptionUsageItem
- type SystemConfig
- type TransformQuantityRound
- type Usage
- type UsageItem
- type UsageType
- type User
- type WebhookSecret
- type WhatsappRegion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminAPISecret ¶
type App ¶
type App struct { ID string Context *config.AppContext }
type AppListItem ¶
type AppResource ¶
type AppResource struct { DescriptedPath resource.DescriptedPath Context *config.AppContext }
type BotProtectionProviderSecret ¶
type BotProtectionProviderSecret struct { Type config.BotProtectionProviderType `json:"type,omitempty"` SecretKey *string `json:"secretKey,omitempty"` }
type Collaborator ¶
type CollaboratorInvitation ¶
type CollaboratorRole ¶
type CollaboratorRole string
const ( CollaboratorRoleOwner CollaboratorRole = "owner" CollaboratorRoleEditor CollaboratorRole = "editor" )
func (CollaboratorRole) Level ¶
func (r CollaboratorRole) Level() int
type OAuthClientSecret ¶
type OAuthClientSecret struct { ClientID string `json:"clientID,omitempty"` Keys []OAuthClientSecretKey `json:"keys,omitempty"` }
type OAuthClientSecretKey ¶
type OnboardEntry ¶
type OnboardEntry struct {
SurveyJSON string `json:"onboarding_survey_json"`
}
type Price ¶
type Price struct { StripePriceID string `json:"stripePriceID"` StripeProductID string `json:"stripeProductID"` Type PriceType `json:"type"` UsageType UsageType `json:"usageType,omitempty"` SMSRegion SMSRegion `json:"smsRegion,omitempty"` WhatsappRegion WhatsappRegion `json:"whatsappRegion,omitempty"` Currency string `json:"currency"` UnitAmount int `json:"unitAmount"` FreeQuantity *int `json:"freeQuantity,omitempty"` TransformQuantityDivideBy *int `json:"transformQuantityDivideBy,omitempty"` TransformQuantityRound TransformQuantityRound `json:"transformQuantityRound,omitempty"` }
func (*Price) ShouldClearUsage ¶
type SAMLIdpSigningSecrets ¶
type SAMLIdpSigningSecrets struct {
Certificates []SAMLIdpSigningCertificate `json:"certificates,omitempty"`
}
type SAMLSpSigningSecrets ¶
type SAMLSpSigningSecrets struct { ClientID string `json:"clientID,omitempty"` Certificates []SAMLSpSigningCertificate `json:"certificates,omitempty"` }
type SMSProviderConfigurationInput ¶
type SMSProviderConfigurationInput struct { Twilio *SMSProviderConfigurationTwilioInput `json:"twilio,omitempty"` Webhook *SMSProviderConfigurationWebhookInput `json:"webhook,omitempty"` Deno *SMSProviderConfigurationDenoInput `json:"deno,omitempty"` }
type SMSProviderSecrets ¶
type SMSProviderSecrets struct { TwilioCredentials *SMSProviderTwilioCredentials `json:"twilioCredentials,omitempty"` CustomSMSProviderCredentials *SMSProviderCustomSMSProviderConfigs `json:"customSMSProviderCredentials,omitempty"` }
type SMTPSecret ¶
type SecretConfig ¶
type SecretConfig struct { OAuthSSOProviderClientSecrets []OAuthSSOProviderClientSecret `json:"oauthSSOProviderClientSecrets,omitempty"` WebhookSecret *WebhookSecret `json:"webhookSecret,omitempty"` AdminAPISecrets []AdminAPISecret `json:"adminAPISecrets,omitempty"` SMTPSecret *SMTPSecret `json:"smtpSecret,omitempty"` OAuthClientSecrets []OAuthClientSecret `json:"oauthClientSecrets,omitempty"` BotProtectionProviderSecret *BotProtectionProviderSecret `json:"botProtectionProviderSecret,omitempty"` SAMLIdpSigningSecrets *SAMLIdpSigningSecrets `json:"samlIdpSigningSecrets,omitempty"` SAMLSpSigningSecrets []SAMLSpSigningSecrets `json:"samlSpSigningSecrets,omitempty"` SMSProviderSecrets *SMSProviderSecrets `json:"smsProviderSecrets,omitempty"` }
func NewSecretConfig ¶
func NewSecretConfig(secretConfig *config.SecretConfig, unmaskedSecrets []config.SecretKey, now time.Time) (*SecretConfig, error)
type Subscription ¶
type Subscription struct { ID string `json:"id"` AppID string `json:"appID"` StripeSubscriptionID string `json:"stripeSubscriptionID"` StripeCustomerID string `json:"stripeCustomerID"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` CancelledAt *time.Time `json:"cancelledAt"` EndedAt *time.Time `json:"endedAt"` }
Subscription represents an app subscription. The keys in JSON struct tags are in camel case because this struct is directly returned in the GraphQL endpoint. Making the keys in camel case saves us from writing boilerplate resolver code.
type SubscriptionCheckout ¶
type SubscriptionCheckoutStatus ¶
type SubscriptionCheckoutStatus string
const ( // SubscriptionCheckoutStatusOpen is the initial status. SubscriptionCheckoutStatusOpen SubscriptionCheckoutStatus = "open" // SubscriptionCheckoutStatusCompleted represents the Stripe customer is created. SubscriptionCheckoutStatusCompleted SubscriptionCheckoutStatus = "completed" // SubscriptionCheckoutStatusSubscribed represents the Stripe subscription is active. SubscriptionCheckoutStatusSubscribed SubscriptionCheckoutStatus = "subscribed" // SubscriptionCheckoutStatusCancelled represents the Stripe subscription is cancelled. SubscriptionCheckoutStatusCancelled SubscriptionCheckoutStatus = "cancelled" // SubscriptionCheckoutStatusExpired represents the Stripe subscription is incomplete_expired. SubscriptionCheckoutStatusExpired SubscriptionCheckoutStatus = "expired" )
type SubscriptionPlan ¶
type SubscriptionPlan struct { Name string `json:"name"` Version string `json:"version"` Prices []*Price `json:"prices,omitempty"` }
func NewSubscriptionPlan ¶
func NewSubscriptionPlan(planName string, version string) *SubscriptionPlan
type SubscriptionUsage ¶
type SubscriptionUsage struct { NextBillingDate time.Time `json:"nextBillingDate"` Items []*SubscriptionUsageItem `json:"items,omitempty"` }
type SubscriptionUsageItem ¶
type SubscriptionUsageItem struct { Type PriceType `json:"type"` UsageType UsageType `json:"usageType"` SMSRegion SMSRegion `json:"smsRegion"` WhatsappRegion WhatsappRegion `json:"whatsappRegion"` Currency *string `json:"currency"` UnitAmount *int `json:"unitAmount"` FreeQuantity *int `json:"freeQuantity,omitempty"` TransformQuantityDivideBy *int `json:"transformQuantityDivideBy,omitempty"` TransformQuantityRound TransformQuantityRound `json:"transformQuantityRound,omitempty"` Quantity int `json:"quantity"` TotalAmount *int `json:"totalAmount"` }
func (*SubscriptionUsageItem) FillFrom ¶
func (i *SubscriptionUsageItem) FillFrom(p *Price) *SubscriptionUsageItem
func (*SubscriptionUsageItem) Match ¶
func (i *SubscriptionUsageItem) Match(p *Price) bool
type SystemConfig ¶
type SystemConfig struct { AuthgearClientID string `json:"authgearClientID"` AuthgearEndpoint string `json:"authgearEndpoint"` AuthgearWebSDKSessionType string `json:"authgearWebSDKSessionType"` SentryDSN string `json:"sentryDSN,omitempty"` AppHostSuffix string `json:"appHostSuffix"` AvailableLanguages []string `json:"availableLanguages"` BuiltinLanguages []string `json:"builtinLanguages"` Themes interface{} `json:"themes,omitempty"` Translations interface{} `json:"translations,omitempty"` SearchEnabled bool `json:"searchEnabled"` AuditLogEnabled bool `json:"auditLogEnabled"` AnalyticEnabled bool `json:"analyticEnabled"` AnalyticEpoch *timeutil.Date `json:"analyticEpoch,omitempty"` GitCommitHash string `json:"gitCommitHash,omitempty"` GTMContainerID string `json:"gtmContainerID,omitempty"` UIImplementation string `json:"uiImplementation,omitempty"` UISettingsImplementation string `json:"uiSettingsImplementation,omitempty"` ShowCustomSMSGateway bool `json:"showCustomSMSGateway,omitempty"` }
type TransformQuantityRound ¶
type TransformQuantityRound string
const ( TransformQuantityRoundNone TransformQuantityRound = "" TransformQuantityRoundUp TransformQuantityRound = "up" TransformQuantityRoundDown TransformQuantityRound = "down" )
func (TransformQuantityRound) Valid ¶
func (r TransformQuantityRound) Valid() error
type UsageItem ¶
type UsageItem struct { UsageType UsageType `json:"usageType"` SMSRegion SMSRegion `json:"smsRegion"` WhatsappRegion WhatsappRegion `json:"whatsappRegion"` Quantity int `json:"quantity"` }
type WebhookSecret ¶
type WebhookSecret struct {
Secret *string `json:"secret,omitempty"`
}
type WhatsappRegion ¶
type WhatsappRegion string
const ( WhatsappRegionNone WhatsappRegion = "" WhatsappRegionNorthAmerica WhatsappRegion = "north-america" WhatsappRegionOtherRegions WhatsappRegion = "other-regions" )
func (WhatsappRegion) Valid ¶
func (r WhatsappRegion) Valid() error
Click to show internal directories.
Click to hide internal directories.