env

package
v0.0.0-...-4a3359c Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ProjectDirectory, _ = os.Getwd()
	ParentDirecory      = filepath.Dir(ProjectDirectory)
	Environment         = os.Getenv("ENV")
	Host                = os.Getenv("HOST")
	HostName            = os.Getenv("HOSTNAME")
	ServiceConfigPath   = os.Getenv("CONFIG_PATH")
)

Functions

func InitEnvironment

func InitEnvironment()

Types

type AuthConfig

type AuthConfig struct {
	IssuerName           string `yaml:"issuerName"`
	TokenExpirationDelta int    `yaml:"tokenExpirationDelta"`
	PrivateKeyPath       string `yaml:"privateKeyPath"`
	PublicKeyPath        string `yaml:"publicKeyPath"`
	AccessKey            string `yaml:"accessKey"`
}

type MailConfig

type MailConfig struct {
	Server                string `yaml:"server"`
	Address               string `yaml:"address"`
	Password              string `yaml:"password"`
	VerifyEmailTemplate   string `yaml:"verifyEmailTemplate"`
	ResetPasswordTemplate string `yaml:"resetPasswordTemplate"`
	NotificationTemplate  string `yaml:"notificationTemplate"`
}

type PersonalConfig

type PersonalConfig struct {
	SunnyUserEmail    string `yaml:"sunnyUserEmail"`
	SunnyUserIdPrefix string `yaml:"sunnyUserIdPrefix"`
}

type ServiceConfig

type ServiceConfig struct {
	Common          config.CommonConfig    `yaml:"commonConfig"`
	Security        config.SecurityConfig  `yaml:"securityConfig"`
	UsersDB         config.DataStoreConfig `yaml:"usersDBConfig"`
	LikesDB         config.DataStoreConfig `yaml:"likesDBConfig"`
	RemotesDB       config.DataStoreConfig `yaml:"remotesDBConfig"`
	SubscriptionsDB config.DataStoreConfig `yaml:"subscriptionsDBConfig"`
	Auth            AuthConfig             `yaml:"authConfig"`
	Mail            MailConfig             `yaml:"mailConfig"`
	FallbackMail    MailConfig             `yaml:"fallbackMailConfig"`
	Personal        PersonalConfig         `yaml:"personalConfig"`
}

func ReadServiceConfig

func ReadServiceConfig(filename string) (sc ServiceConfig, err error)

Jump to

Keyboard shortcuts

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