{"modulePath":"github.com/Stackdome/stackdome","version":"v0.0.7-alpha","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package environment\n\n## Constants\n\n```go\nconst (\n\tDEVELOPMENT_ENV = \"DEVELOPMENT\"\n\tPRODUCTION_ENV  = \"PRODUCTION\"\n)\n```\nSelectable values of STACKDOME\\_ENV. The test environment is not selectable here: it needs a session factory injected by the test bootstrap.\n\n## Functions\n\n```go\nfunc GetEnvironmentStrFromEnv() string\n```\n\n## Types\n\n```go\ntype ApplicationConfigOption func(*config.ApplicationConfig)\n```\n\n```go\nfunc (o ApplicationConfigOption) ApplyToEnv(env *Env)\n```\n\n```go\ntype Clients struct {\n\tDefaultClusterClient client.Client\n\tTurnstileVerifier    turnstile.Verifier\n}\n```\n\n```go\ntype Env struct {\n\tName                        string\n\tServices                    Services\n\tDBSession                   db.SessionFactory\n\tConfig                      *config.ApplicationConfig\n\tPlatformConfig              *config.PlatformConfig\n\tClients                     Clients\n\tClusterManager              clustermanager.ClusterManager\n\tWorkerManager               workermanager.WorkerManager\n\tResourceAccessPolicyManager resourceaccess.ResourceAccessPolicyManager\n\tPermissionService           auth.PermissionService\n\tRefreshTokenStore           stores.RefreshTokenStore\n\tOAuthStateStore             stores.OAuthStateStore\n\tEmailService                emailpkg.EmailService\n\tLeadershipFlag              *leadership.Flag\n\tEncryptionService           services.EncryptionService\n\tComputePolicy               computequota.Policy\n\tPasswordSignupProtection    signupprotection.PasswordSignupProtection\n\tSignupClientIPResolver      signupprotection.ClientIPResolver\n\tLogger                      applogger.Logger\n\tObservability               *observability.Metrics\n}\n```\n\n```go\ntype EnvConfigOption interface {\n\tApplyToEnv(env *Env)\n}\n```\n\n```go\nfunc WithApplicationConfig(cfg *config.ApplicationConfig) EnvConfigOption\n```\n\n```go\nfunc WithPlatformConfig(cfg *config.PlatformConfig) EnvConfigOption\n```\n\n```go\ntype EnvImpl interface {\n\tInit(context.Context) error\n\tInitDatabase(context.Context) error\n\tEnvironment() *Env\n\tShutdown(context.Context) error\n}\n```\n\n```go\nfunc LoadEnv() EnvImpl\n```\n\n```go\nfunc NewTestEnvironment(sessionFactory db.SessionFactory, opts ...EnvConfigOption) EnvImpl\n```\n\n```go\ntype PlatformConfigOption func(*config.PlatformConfig)\n```\n\n```go\nfunc (o PlatformConfigOption) ApplyToEnv(env *Env)\n```\n\n```go\ntype Services struct {\n\tUserService                 services.UserService\n\tOrganisationService         services.OrganisationService\n\tClusterService              services.ClusterService\n\tStackStorageService         services.StackStorageService\n\tVolumeService               services.VolumeService\n\tStackService                services.StackService\n\tStackResourceService        services.StackResourceService\n\tImageBuildService           services.ImageBuildService\n\tClusterImageRegistryService services.ImageRegistryService\n\tStackDomainService          services.StackDomainsService\n\tOrganisationDomainService   services.OrganisationDomainsService\n\tNamespaceService            services.NamespaceService\n\tLoggingService              services.LoggingService\n\tMetricsService              services.MetricsService\n\tSecretService               services.SecretService\n\tCredentialResolver          services.CredentialResolver\n\tRegistryCredentialService   services.RegistryCredentialService\n\tGitIntegrationService       services.GitIntegrationService\n\tGitHubWebhookService        services.GitHubWebhookService\n\tEncryptionService           services.EncryptionService\n\tObjectStoreService          services.ObjectStoreService\n\tPostgresAddonService        services.PostgresAddonService\n\tPostgresBackupService       services.PostgresBackupService\n\tAPITokenService             services.APITokenService\n\tProjectService              services.ProjectService\n\tOrgInviteService            services.OrgInviteService\n\tSignupService               services.SignupService\n\tStackReleaseService         services.StackReleaseService\n\tReleaseEventRecorder        services.ReleaseEventRecorder\n\tReferenceService            services.ReferenceService\n\tStackPreviewConfigService   services.StackPreviewConfigService\n\tPreviewStackService         services.PreviewStackService\n}\n```\n\n","path":"github.com/Stackdome/stackdome/cmd/environment","name":"environment","synopsis":"","isRedistributable":true}
