config

package
v0.0.0-...-a5482e1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminConfig

type AdminConfig struct {
	Key string `env:"ADMIN_KEY,required"`
}

type AppConfig

type AppConfig struct {
	CORS                                   CORSConfig
	TrackingPublicUrl                      string `env:"TRACKING_PUBLIC_URL" envDefault:"https://custosmetrics.com"`
	InvoicePaidRedirectUrl                 string `env:"INVOICE_PAID_REDIRECT_URL" envDefault:"https://customeros.ai/payments/status/paid/"`
	Mailstack                              MailstackConfig
	DefaultGlobalOrgPrimaryDomainsInSearch []string `` /* 508-byte string literal not displayed */
}

type CORSConfig

type CORSConfig struct {
	AllowOrigins []string `env:"ALLOW_ORIGINS" envDefault:"*"`
	AllowHeaders []string `env:"ALLOW_HEADERS" envDefault:"x-openline-username"`
}

type Config

type Config struct {
	Server           ServerConfig
	GraphQL          GraphQLConfig
	Admin            AdminConfig
	Database         DatabaseConfig
	Messaging        MessagingConfig
	Observability    ObservabilityConfig
	App              AppConfig
	InternalServices InternalServicesConfig
	ExternalServices ExternalServicesConfig
	GrpcClient       config.GrpcClientConfig
}

func InitConfig

func InitConfig() (*Config, error)

type DatabaseConfig

type DatabaseConfig struct {
	Postgres      config.PostgresConfig
	PostgresAsync config.PostgresAsyncConfig
	Neo4j         config.Neo4jConfig
}

type ExternalServicesConfig

type ExternalServicesConfig struct {
	Anthropic      config.AnthropicConfig
	Cloudflare     config.CloudflareConfig
	IntegrationApp IntegrationAppConfig
	Namecheap      config.NamecheapConfig
	OpenSRS        config.OpenSRSConfig
	Postmark       config.PostmarkConfig
	Stripe         config.StripeConfig
}

type GraphQLConfig

type GraphQLConfig struct {
	PlaygroundEnabled    bool `env:"GRAPHQL_PLAYGROUND_ENABLED" envDefault:"false"`
	FixedComplexityLimit int  `env:"GRAPHQL_FIXED_COMPLEXITY_LIMIT" envDefault:"200"`
}

type IntegrationAppConfig

type IntegrationAppConfig struct {
	WorkspaceKey                    string `env:"INTEGRATION_APP_WORKSPACE_KEY"`
	WorkspaceSecret                 string `env:"INTEGRATION_APP_WORKSPACE_SECRET"`
	ApiTriggerUrlCreatePaymentLinks string `env:"INTEGRATION_APP_API_TRIGGER_URL_CREATE_PAYMENT_LINKS"`
}

type InternalServicesConfig

type InternalServicesConfig struct {
	CustomerOsApiUrl string `env:"CUSTOMER_OS_API_URL" envDefault:"https://api.customeros.ai" validate:"required"`
	ValidationApi    string `env:"VALIDATION_API" validate:"required"`
	ValidationApiKey string `env:"VALIDATION_API_KEY" validate:"required"`
	EnrichmentApiUrl string `env:"ENRICHMENT_API_URL" validate:"required"`
	EnrichmentApiKey string `env:"ENRICHMENT_API_KEY" validate:"required"`
	FileStoreApi     fsc.FileStoreApiConfig
}

type MailstackConfig

type MailstackConfig struct {
	SupportedTlds []string `env:"MAILSTACK_SUPPORTED_TLDS" envDefault:"com"`
}

type MessagingConfig

type MessagingConfig struct {
	RabbitMQ config.RabbitMQConfig
}

type ObservabilityConfig

type ObservabilityConfig struct {
	Jaeger  tracing.JaegerConfig
	Metrics metrics.Config
}

type ServerConfig

type ServerConfig struct {
	ApiPort     string `env:"PORT" envDefault:"10000" validate:"required"`
	MetricsPort string `env:"PORT_METRICS" envDefault:"10000" validate:"required"`
	Logger      logger.Config
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL