configs

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const LiveSessionName = "go-live-session"

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	SystemSummarySchedule   string `yaml:"systemSummarySchedule"`
	SystemSummaryTimeout    int    `yaml:"systemSummaryTimeout"`
	UpdateNormsSchedule     string `yaml:"updateNormsSchedule"`
	UpdateNormsTimeout      int    `yaml:"updateNormsTimeout"`
	UpdateMarksSchedule     string `yaml:"updateMarksSchedule"`
	UpdateMarksTimeout      int    `yaml:"updateMarksTimeout"`
	UpdateDurationsSchedule string `yaml:"updateDurationsSchedule"`
	UpdateDurationsTimeout  int    `yaml:"updateDurationsTimeout"`
	DefaultTimeLayout       string `yaml:"defaultTimeLayout"`
	Version                 string `yaml:"version"`
}

type AuthConfig

type AuthConfig struct {
	Secret  string
	Exp     int
	Google  Google
	Github  Github
	Twitter Twitter
}

type Config

type Config struct {
	Env      string
	DB       DBConfig
	Auth     AuthConfig
	Server   ServerConfig
	Data     DataConfig
	External ExternalConfig
	App      AppConfig
	Debug    DebugConfig
}

func ReadConfigs

func ReadConfigs(path string) (Config, error)

type DBConfig

type DBConfig struct {
	Driver string
	URI    string
}

type DataConfig

type DataConfig struct {
	Presets PresetsConfig
}

type DebugConfig

type DebugConfig struct {
	LogDBQueries bool `yaml:"logDBQueries"`
}

type ExternalConfig

type ExternalConfig struct {
	Telegram   TelegramConfig
	Sendinblue SendinblueConfig `yaml:"sendinblue"`
}

type Github

type Github struct {
	Client   string
	Secret   string
	Callback string
}

type Google

type Google struct {
	Client   string
	Secret   string
	Callback string
}

type PresetsConfig

type PresetsConfig struct {
	UserPresetsPaths []string `yaml:"userPresetsPaths"`
	TestPresetsPaths []string `yaml:"testPresetsPaths"`
	TagPresetsPaths  []string `yaml:"tagPresetsPaths"`
}

type SendinblueConfig

type SendinblueConfig struct {
	Key string `yaml:"key"`
}

type ServerConfig

type ServerConfig struct {
	Port    int
	TLSPort int `yaml:"tlsPort"`
	Host    string
	Domain  string
}

func (*ServerConfig) GetAddress

func (s *ServerConfig) GetAddress() string

type TelegramConfig

type TelegramConfig struct {
	TelegramTo    int64  `yaml:"telegramTo"`
	TelegramToken string `yaml:"telegramToken"`
}

type Twitter

type Twitter struct {
	Client   string
	Secret   string
	Callback string
}

Jump to

Keyboard shortcuts

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