config

package
v0.0.0-...-dba37e9 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenDB

func OpenDB() (*ent.Client, error)

func OpenLDAP

func OpenLDAP() (*ldap.Conn, error)

Types

type SystemConfig

type SystemConfig struct {
	Prod bool `env:"PROD,default=false"`
	Port int  `env:"PORT,default=8000"`
	DB   struct {
		Hostname string `env:"DB_HOSTNAME"`
		Username string `env:"DB_USRNAME"`
		Password string `env:"DB_PASSWORD"`
		DBName   string `env:"DB_NAME"`
	}
	LDAP struct {
		Hostname        string `env:"LDAP_HOSTNAME"`
		Username        string `env:"LDAP_USERNAME"`
		Password        string `env:"LDAP_PASSWORD"`
		BaseDN          string `env:"LDAP_BASE_DN"`
		DomainName      string `env:"LDAP_DOMAIN_NAME"`
		EmailDomainName string `env:"LDAP_EMAIL_DOMAIN_NAME"`
	}
	Security struct {
		Salt      string `env:"SECURE_SALT"`
		A2ASecret string `env:"SECURE_A2A_SECRET"`
	}
}
var (
	SystemConfigVar SystemConfig
)

Jump to

Keyboard shortcuts

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