config

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {
	JWTKey         string `yaml:"jwt_key"`
	SessionTimeout int    `yaml:"session_timeout"`
}

type Config

type Config struct {
	Debug          bool                 `yaml:"debug,omitempty"`
	Server         ServerConfig         `yaml:"server"`
	Database       DatabaseConfig       `yaml:"database"`
	Initialization InitializationConfig `yaml:"initialization"`
	Providers      ProvidersConfig      `yaml:"providers,omitempty"`
	Auth           AuthConfig           `yaml:"auth"`
}

func LoadConfig

func LoadConfig(cfgFile string) (*Config, error)

type DatabaseConfig

type DatabaseConfig struct {
	Username string  `yaml:"username"`
	Password string  `yaml:"password"`
	Host     string  `yaml:"host"`
	Database *string `yaml:"database,omitempty"`
	Port     *int    `yaml:"port,omitempty"`
	SSL      *bool   `yaml:"ssl,omitempty"`
}

type DefaultAdminConfig

type DefaultAdminConfig struct {
	Username  string `yaml:"username"`
	Password  string `yaml:"password"`
	Email     string `yaml:"email"`
	FirstName string `yaml:"first_name"`
	LastName  string `yaml:"last_name"`
}

type InitializationConfig

type InitializationConfig struct {
	DefaultAdmin DefaultAdminConfig `yaml:"default_admin"`
	AdminGroup   string             `yaml:"admin_group"`
	Permissions  []PermissionConfig `yaml:"permissions,omitempty"`
}

type PermissionConfig

type PermissionConfig struct {
	Key         string `yaml:"key"`
	Component   string `yaml:"component,omitempty"`
	Description string `yaml:"description,omitempty"`
}

type ProvidersConfig

type ProvidersConfig struct {
	CacheDir string `yaml:"cache"`
}

type ServerConfig

type ServerConfig struct {
	Hostname         string   `yaml:"hostname"`
	Port             int      `yaml:"port"`
	SSL              bool     `yaml:"ssl"`
	AllowedOrigins   []string `yaml:"origins,omitempty"`
	GQlTrace         bool     `yaml:"gql_trace,omitempty"`
	GQlIntrospection bool     `yaml:"gql_introspection,omitempty"`
}

Jump to

Keyboard shortcuts

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