config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAppBindEmpty          = errors.New("bind cannot be empty")
	ErrAppPortEmpty          = errors.New("port must be greater than zero")
	ErrAppDomainEmpty        = errors.New("domain cannot be empty")
	ErrAppSigningSecretEmpty = errors.New("signing secret cannot be empty")
)
View Source
var (
	ErrSlackAppIDEmpty         = errors.New("app id cannot be empty")
	ErrSlackClientIDEmpty      = errors.New("client id cannot be empty")
	ErrSlackClientSecretEmpty  = errors.New("client secret cannot be empty")
	ErrSlackSigningSecretEmpty = errors.New("signing secret cannot be empty")
)
View Source
var (
	ErrDBPathEmpty = errors.New("path cannot be empty")
)

Functions

This section is empty.

Types

type App

type App struct {
	Bind          string `toml:"bind"`
	Port          uint16 `toml:"port"`
	Domain        string `toml:"domain"`
	Secure        bool   `toml:"secure"`
	BehindProxy   bool   `toml:"behind_proxy"`
	SigningSecret string `toml:"signing_secret"`
}

func (App) Socket

func (a App) Socket() string

func (App) Validate

func (a App) Validate() error

type Config

type Config struct {
	App   App   `toml:"app"`
	Slack Slack `toml:"slack"`
	DB    DB    `toml:"db"`
}

func New

func New(r io.Reader) (*Config, error)

func (Config) Validate

func (c Config) Validate() error

type DB

type DB struct {
	Path string `toml:"path"`
}

func (DB) Validate

func (d DB) Validate() error

type Slack

type Slack struct {
	AppID         string `toml:"app_id"`
	ClientID      string `toml:"client_id"`
	ClientSecret  string `toml:"client_secret"`
	SigningSecret string `toml:"signing_secret"`
}

func (Slack) Validate

func (s Slack) Validate() error

Jump to

Keyboard shortcuts

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