server

package
v0.0.0-...-04ccfb0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// ListenAddr sets the listen address of the portal server.
	PortalListenAddr         string `envconfig:"PORTAL_LISTEN_ADDR" default:"0.0.0.0:3003"`
	PortalInternalListenAddr string `envconfig:"PORTAL_INTERNAL_LISTEN_ADDR" default:"0.0.0.0:13003"`
	// ConfigSource configures the source of app configurations
	ConfigSource *configsource.Config `envconfig:"CONFIG_SOURCE"`
	// Authgear configures Authgear acting as authentication server for the portal.
	Authgear portalconfig.AuthgearConfig `envconfig:"AUTHGEAR"`
	// AdminAPI configures how portal interacts with Authgear Admin API.
	AdminAPI portalconfig.AdminAPIConfig `envconfig:"ADMIN_API"`
	// App configures the managed apps.
	App portalconfig.AppConfig `envconfig:"APP"`
	// SMTP configures SMTP.
	SMTP portalconfig.SMTPConfig `envconfig:"SMTP"`
	// Mail configures email settings.
	Mail portalconfig.MailConfig `envconfig:"MAIL"`

	// BuiltinResourceDirectory sets the directory for built-in resource files
	BuiltinResourceDirectory string `envconfig:"PORTAL_BUILTIN_RESOURCE_DIRECTORY" default:"resources/portal"`
	// CustomResourceDirectory sets the directory for customized resource files
	CustomResourceDirectory string `envconfig:"PORTAL_CUSTOM_RESOURCE_DIRECTORY"`

	// DomainImplementation indicates the domain implementation, only none or kubernetes are supported
	// if it sets to kubernetes, kubernetes resources will be created based on
	// APP_KUBERNETES_INGRESS_TEMPLATE_FILE when creating domains
	DomainImplementation portalconfig.DomainImplementationType `envconfig:"DOMAIN_IMPLEMENTATION"`

	// Kubernetes set the kubernetes related config if the portal is deployed in k8s
	// One of the purpose is for creating ingress when creating new domain
	Kubernetes portalconfig.KubernetesConfig `envconfig:"KUBERNETES"`

	// Search sets search related config.
	Search portalconfig.SearchConfig `envconfig:"SEARCH"`

	// AuditLog sets audit log related config.
	AuditLog portalconfig.AuditLogConfig `envconfig:"AUDIT_LOG"`

	// Analytic sets analytic dashboard related config.
	Analytic config.AnalyticConfig `envconfig:"ANALYTIC"`

	Stripe portalconfig.StripeConfig `envconfig:"STRIPE"`

	Osano portalconfig.OsanoConfig `envconfig:"OSANO"`

	GoogleTagManager portalconfig.GoogleTagManagerConfig `envconfig:"GTM"`

	PortalFrontendSentry portalconfig.PortalFrontendSentryConfig `envconfig:"PORTAL_FRONTEND_SENTRY"`

	Web3 portalconfig.Web3Config `envconfig:"WEB3"`

	*config.EnvironmentConfig
}

func LoadConfigFromEnv

func LoadConfigFromEnv() (*Config, error)

func (*Config) Validate

func (c *Config) Validate() error

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func (*Controller) Start

func (c *Controller) Start()

Jump to

Keyboard shortcuts

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