config

package
v0.0.0-...-f758046 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2019 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Database DatabaseConfig `yaml:"database"`
	HTTP     HTTPConfig     `yaml:"http"`
	Ident    IdentConfig    `yaml:"ident"`
	Email    EmailConfig    `yaml:"email"`
}

func NewConfig

func NewConfig(filename string) (*Config, error)

func ParseConfig

func ParseConfig(b []byte) (*Config, error)

type DatabaseConfig

type DatabaseConfig struct {
	Driver     string `yaml:"driver"`
	ConnString string `yaml:"conn_string"`
}

type EmailConfig

type EmailConfig struct {
	From string     `yaml:"from"`
	SMTP SMTPConfig `yaml:"smtp"`
}

type HTTPConfig

type HTTPConfig struct {
	ListenAddr string `yaml:"listen_addr"`
}

type IdentConfig

type IdentConfig struct {
	ServerName string           `yaml:"server_name"`
	BaseURL    string           `yaml:"base_url"`
	SigningKey SigningKeyConfig `yaml:"signing_key"`
	Invites    InvitesConfig    `yaml:"invites"`
}

type InvitesConfig

type InvitesConfig struct {
	EmailTemplate   TemplateConfig `yaml:"email_template"`
	SubjectTemplate string         `yaml:"subject_template"`
}

type SMTPConfig

type SMTPConfig struct {
	Hostname  string `yaml:"hostname"`
	Port      string `yaml:"port"`
	Username  string `yaml:"username"`
	Password  string `yaml:"password"`
	EnableTLS bool   `yaml:"enable_tls"`
}

type SigningKeyConfig

type SigningKeyConfig struct {
	Algo         string `yaml:"algo"`
	ID           string `yaml:"id"`
	Seed         string `yaml:"seed"`
	PrivKey      ed25519.PrivateKey
	PubKey       ed25519.PublicKey
	PubKeyBase64 string
}

type TemplateConfig

type TemplateConfig struct {
	HTML string `yaml:"html"`
	Text string `yaml:"text"`
}

Jump to

Keyboard shortcuts

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