Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminConfig ¶
type AdminConfig struct { Enabled bool `split_words:"true" default:"true"` BindAddr string `split_words:"true" default:":4434"` Mode string `split_words:"true" default:"release"` AllowOrigins []string `split_words:"true" default:"http://localhost,http://localhost:3000,http://localhost:3001"` CookieDomain string `split_words:"true"` Audience string `split_words:"true"` Oauth OauthConfig // TokenKeys are the paths to RSA JWT signing keys in PEM encoded format. The // environment variable should be a comma separated list of keyid:path/to/key.pem // Multiple keys are used in order to rotate keys regularly; keyids therefore must // be sortable; in general we prefer to use ksuid for key ids. TokenKeys map[string]string `split_words:"true"` }
func (AdminConfig) Validate ¶
func (c AdminConfig) Validate() error
type BackupConfig ¶
type CertManConfig ¶
type Config ¶
type Config struct { DirectoryID string `split_words:"true" default:"vaspdirectory.net"` SecretKey string `split_words:"true" required:"true"` Maintenance bool `split_words:"true" default:"false"` LogLevel logger.LevelDecoder `split_words:"true" default:"info"` ConsoleLog bool `split_words:"true" default:"false"` GDS GDSConfig Admin AdminConfig Members MembersConfig Database DatabaseConfig Sectigo sectigo.Config Email EmailConfig CertMan CertManConfig Backup BackupConfig Secrets SecretsConfig Sentry sentry.Config // contains filtered or unexported fields }
Config uses envconfig to load required settings from the environment and validate them in preparation for running the TRISA Global Directory Service.
func (Config) GetLogLevel ¶
type DatabaseConfig ¶
type DatabaseConfig struct { URL string `split_words:"true" required:"true"` ReindexOnBoot bool `split_words:"true" default:"false"` Insecure bool `split_words:"true" default:"false"` CertPath string `split_words:"true"` PoolPath string `split_words:"true"` }
func (DatabaseConfig) Validate ¶ added in v1.3.1
func (c DatabaseConfig) Validate() error
type EmailConfig ¶
type EmailConfig struct { ServiceEmail string `envconfig:"GDS_SERVICE_EMAIL" default:"TRISA Directory Service <admin@vaspdirectory.net>"` AdminEmail string `envconfig:"GDS_ADMIN_EMAIL" default:"TRISA Admins <admin@trisa.io>"` SendGridAPIKey string `envconfig:"SENDGRID_API_KEY" required:"false"` DirectoryID string `envconfig:"GDS_DIRECTORY_ID" default:"vaspdirectory.net"` VerifyContactBaseURL string `envconfig:"GDS_VERIFY_CONTACT_URL" default:"https://vaspdirectory.net/verify"` AdminReviewBaseURL string `envconfig:"GDS_ADMIN_REVIEW_URL" default:"https://admin.vaspdirectory.net/vasps/"` Testing bool `split_words:"true" default:"false"` Storage string `split_words:"true" default:""` }
func (EmailConfig) Validate ¶
func (c EmailConfig) Validate() error
type GDSConfig ¶
type MembersConfig ¶
type MembersConfig struct { Enabled bool `split_words:"true" default:"true"` BindAddr string `split_words:"true" default:":4435"` Insecure bool `split_words:"true" default:"false"` Certs string `split_words:"true"` CertPool string `split_words:"true"` }
func (MembersConfig) Validate ¶
func (c MembersConfig) Validate() error
type OauthConfig ¶
type OauthConfig struct { GoogleAudience string `split_words:"true"` AuthorizedEmailDomains []string `split_words:"true"` }
func (OauthConfig) Validate ¶
func (c OauthConfig) Validate() error
type SecretsConfig ¶
Click to show internal directories.
Click to hide internal directories.