config

package
v0.0.0-...-d9ac2dc Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	AdminEmails                []string `mapstructure:"admin_emails"`
	DatasourceConnectionString string   `mapstructure:"datasource_connection_string"`
	LogLevel                   string   `mapstructure:"log_level"`
	Timezone                   string   `mapstructure:"timezone"`
}

type Config

type Config struct {
	App       App       `mapstructure:"app"`
	Pritunl   Pritunl   `mapstructure:"pritunl"`
	Webserver Webserver `mapstructure:"webserver"`
	Slack     Slack     `mapstructure:"slack"`
	Timezone  *time.Location
}

func Load

func Load(path string) (*Config, error)

func (*Config) Validate

func (c *Config) Validate() error

type Pritunl

type Pritunl struct {
	Host           string `mapstructure:"host"`
	Token          string `mapstructure:"token"`
	Secret         string `mapstructure:"secret"`
	Organization   string `mapstructure:"organization"`
	WelcomeMessage string `mapstructure:"welcome_message"`
	HostEU         string `mapstructure:"host_eu"`
	TokenEU        string `mapstructure:"token_eu"`
	SecretEU       string `mapstructure:"secret_eu"`
	OrganizationEU string `mapstructure:"organization_eu"`
}

type Slack

type Slack struct {
	AuthToken string `mapstructure:"auth_token"`
	AppToken  string `mapstructure:"app_token"`
	Channel   string `mapstructure:"channel"`
}

type Webserver

type Webserver struct {
	ParentDomain   string              `mapstructure:"parent_domain"`
	AllowedSubnets []string            `mapstructure:"allowed_subnets"`
	DeniedIPs      []string            `mapstructure:"denied_ips"`
	Kind           string              `mapstructure:"kind"`
	Service        webserver.Webserver `mapstructure:"-"`
}

Jump to

Keyboard shortcuts

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