Documentation
¶
Index ¶
- func CloudEnabled(orgStore org.OrgStore, spaceStore space.SpaceStore) bool
- func InviteEnabled(orgStore org.OrgStore, spaceStore space.SpaceStore, ...) bool
- func OrgEnabled(store org.OrgStore) bool
- func SpaceEnabled(store space.SpaceStore) bool
- type AuthRoutesRegistrar
- type AutoMigrationConfig
- type AutoMigrationRunner
- type BillingServiceFactory
- type CloudConfig
- type CloudConfigLoader
- type CloudFactories
- type CloudHTTPServices
- type CloudStoresConfig
- type CloudStoresFactory
- type CloudWorkerRunner
- type CloudWorkerServices
- type HostedStorageObject
- type HostedStorageStore
- type HostedStorageUsageAggregator
- type ImagorSigningConfig
- type InternalRoutesRegistrar
- type InviteSenderConfig
- type InviteSenderFactory
- type OAuthConfig
- type ProcessingOriginResolverFactory
- type ProcessingUsageStore
- type ProcessingUsageSummary
- type SignupVerificationConfig
- type SignupVerificationFactory
- type SignupVerificationServices
- type TemplatePreviewRenderClientFactory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloudEnabled ¶
func CloudEnabled(orgStore org.OrgStore, spaceStore space.SpaceStore) bool
func InviteEnabled ¶
func InviteEnabled(orgStore org.OrgStore, spaceStore space.SpaceStore, inviteStore space.SpaceInviteStore, inviteSender space.InviteSender) bool
func OrgEnabled ¶
func SpaceEnabled ¶
func SpaceEnabled(store space.SpaceStore) bool
Types ¶
type AuthRoutesRegistrar ¶
type AuthRoutesRegistrar func(mux *http.ServeMux, cfg OAuthConfig, services CloudHTTPServices)
type AutoMigrationConfig ¶
type AutoMigrationRunner ¶
type BillingServiceFactory ¶
type BillingServiceFactory func(cfg CloudConfig, logger *zap.Logger, orgStore org.OrgStore, spaceStore space.SpaceStore) (billing.Service, error)
type CloudConfig ¶
type CloudConfig struct {
InternalAPISecret string
GoogleClientID string
GoogleClientSecret string
SESRegion string
SESFromEmail string
SESReplyToEmail string
AppAPIURL string
StripeSecretKey string
StripeWebhookSecret string
StripeStarterPriceID string
StripeProPriceID string
StripeTeamPriceID string
StripeBillingPortalConfigurationID string
ProcessingURLTemplate string
ManagementJobsEnabled bool
ProcessingUsageBatchCleanupRetention time.Duration
ProcessingUsageBatchCleanupInterval time.Duration
PlatformS3Bucket string
PlatformS3Region string
PlatformS3Endpoint string
PlatformS3AccessKeyID string
PlatformS3SecretKey string
PlatformS3UsePathStyle bool
PlatformS3Prefix string
PlatformConfigVersion int64
}
type CloudConfigLoader ¶
type CloudConfigLoader func(args []string) (CloudConfig, error)
type CloudFactories ¶
type CloudFactories struct {
ConfigLoader CloudConfigLoader
Stores CloudStoresFactory
InviteSender InviteSenderFactory
SignupVerification SignupVerificationFactory
AutoMigration AutoMigrationRunner
AuthRoutes AuthRoutesRegistrar
InternalRoutes InternalRoutesRegistrar
ProcessingOriginResolver ProcessingOriginResolverFactory
TemplatePreviewRenderer TemplatePreviewRenderClientFactory
BillingService BillingServiceFactory
}
type CloudHTTPServices ¶
type CloudHTTPServices struct {
TokenManager *auth.TokenManager
UserStore shareduser.OAuthStore
OrgStore org.OrgStore
SpaceStore space.SpaceStore
SpaceInviteStore space.SpaceInviteStore
HostedStorageStore HostedStorageStore
ProcessingUsageStore ProcessingUsageStore
BillingService billing.Service
SignupVerification sharedsignup.Runtime
CloudConfig CloudConfig
GlobalImagor ImagorSigningConfig
InternalAPISecret string
Logger *zap.Logger
}
type CloudStoresConfig ¶
type CloudStoresConfig struct {
InternalAPISecret string
}
type CloudStoresFactory ¶
type CloudStoresFactory func(cfg CloudStoresConfig, db *bun.DB, encryptionService *encryption.Service, logger *zap.Logger) (org.OrgStore, space.SpaceStore, space.SpaceInviteStore, HostedStorageStore, ProcessingUsageStore, error)
type CloudWorkerRunner ¶
type CloudWorkerRunner func(ctx context.Context, services CloudWorkerServices, cfg CloudConfig) error
type CloudWorkerServices ¶
type CloudWorkerServices struct {
DB *bun.DB
UserStore shareduser.OAuthStore
OrgStore org.OrgStore
SpaceStore space.SpaceStore
SpaceInviteStore space.SpaceInviteStore
HostedStorageStore HostedStorageStore
ProcessingUsageStore ProcessingUsageStore
BillingService billing.Service
SignupVerification sharedsignup.Runtime
CloudConfig CloudConfig
Logger *zap.Logger
}
type HostedStorageObject ¶
type HostedStorageStore ¶
type HostedStorageStore interface {
BeginPendingUpload(ctx context.Context, orgID, spaceID, objectKey string, expiresAt time.Time) error
FinalizePendingUpload(ctx context.Context, spaceID, objectKey string, sizeBytes int64) (bool, error)
DeleteReadyObject(ctx context.Context, spaceID, objectKey string) (int64, error)
MoveReadyObject(ctx context.Context, spaceID, fromKey, toKey string) error
CopyReadyObject(ctx context.Context, sourceSpaceID, sourceKey, destOrgID, destSpaceID, destKey string) (int64, error)
GetObject(ctx context.Context, spaceID, objectKey string) (*HostedStorageObject, error)
GetUsageBytes(ctx context.Context, orgID, spaceID string) (int64, error)
}
type ImagorSigningConfig ¶
type InternalRoutesRegistrar ¶
type InternalRoutesRegistrar func(mux *http.ServeMux, services CloudHTTPServices)
type InviteSenderConfig ¶
type InviteSenderConfig = sharedinvite.Config
type InviteSenderFactory ¶
type InviteSenderFactory func(cfg InviteSenderConfig) (space.InviteSender, error)
type OAuthConfig ¶
type ProcessingOriginResolverFactory ¶
type ProcessingOriginResolverFactory func(cfg CloudConfig, spaceStore space.SpaceStore) space.ProcessingOriginResolver
type ProcessingUsageStore ¶
type ProcessingUsageStore interface {
ApplyUsageBatch(ctx context.Context, batch processing.UsageBatch) (*processing.UsageBatchApplyResult, error)
CleanupUsageBatches(ctx context.Context, olderThan time.Time) error
GetCurrentUsageSummary(ctx context.Context, orgID string) (*ProcessingUsageSummary, error)
}
type ProcessingUsageSummary ¶
type SignupVerificationConfig ¶
type SignupVerificationConfig = sharedsignup.Config
type SignupVerificationFactory ¶
type SignupVerificationFactory func(cfg SignupVerificationConfig, services SignupVerificationServices) (sharedsignup.Runtime, error)
type SignupVerificationServices ¶
type SignupVerificationServices struct {
DB *bun.DB
UserStore shareduser.PasswordSignupStore
OrgStore org.OrgStore
SpaceStore space.SpaceStore
SpaceInviteStore space.SpaceInviteStore
Logger *zap.Logger
}
type TemplatePreviewRenderClientFactory ¶
type TemplatePreviewRenderClientFactory func(cfg CloudConfig) processing.TemplatePreviewRenderClient
Click to show internal directories.
Click to hide internal directories.