config

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database struct {
	DBAccount  string
	DBPassword string
	DBHost     string
	DBName     string
	DBPort     int
	DBSSLMode  bool
}

type Keys

type Keys struct {
	PrivateKeyLocation string `json:"private_key" mapstructure:"private_key"`
	PublicKeyLocation  string `json:"public_key" mapstructure:"public_key"`
	PrivateKey         *rsa.PrivateKey
	PublicKey          *rsa.PublicKey
}

func (*Keys) MustParse

func (k *Keys) MustParse()

func (*Keys) Parse

func (k *Keys) Parse() error

type Server

type Server struct {
	Mode         string
	Hostname     string
	Url          string
	Port         string
	ProblemsDir  string
	TemplatesDir string

	CookieSecret string

	GoogleAuth struct {
		Enabled   bool   `json:"enabled" mapstructure:"enabled"`
		ClientKey string `json:"client_key" mapstructure:"client_key"`
		Secret    string `json:"secret" mapstructure:"secret"`
		Callback  string `json:"callback" mapstructure:"callback"`
	} `json:"googleAuth" mapstructure:"googleAuth"`

	Sendgrid struct {
		Enabled       bool   `json:"enabled" mapstructure:"enabled"`
		ApiKey        string `json:"api_key" mapstructure:"api_key"`
		SenderName    string `json:"sender_name" mapstructure:"sender_name"`
		SenderAddress string `json:"sender_address" mapstructure:"sender_address"`
	} `json:"sendgrid" mapstructure:"sendgrid"`

	SMTP struct {
		Enabled             bool   `json:"enabled" mapstructure:"enabled"`
		MailAccount         string `json:"mail_account" mapstructure:"mail_account"`
		MailServerHost      string `json:"mail_server" mapstructure:"mail_server"`
		MailServerPort      string `json:"mail_port" mapstructure:"mail_port"`
		MailAccountPassword string `json:"mail_password" mapstructure:"mail_password"`
	} `json:"smtp" mapstructure:"smtp"`

	Database `mapstructure:",squash"`

	Keys Keys
}

Jump to

Keyboard shortcuts

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