backend.go

 1package config
 2
 3// BackendConfig is the backend configuration.
 4type BackendConfig struct {
 5	// Settings is the settings backend.
 6	Settings string `env:"SETTINGS" yaml:"settings"`
 7
 8	// Access is the access backend.
 9	Access string `env:"ACCESS" yaml:"access"`
10
11	// Store is the store backend.
12	Store string `env:"STORE" yaml:"store"`
13
14	// Auth is the auth backend.
15	Auth string `env:"AUTH" yaml:"auth"`
16}
17
18// Environ returns the environment variables for the backend configuration.
19func (b BackendConfig) Environ() []string {
20	envs := []string{
21		"SOFT_SERVE_BACKEND_SETTINGS=" + b.Settings,
22		"SOFT_SERVE_BACKEND_ACCESS=" + b.Access,
23		"SOFT_SERVE_BACKEND_STORE=" + b.Store,
24		"SOFT_SERVE_BACKEND_AUTH=" + b.Auth,
25	}
26
27	return envs
28}