config

package
v0.0.0-...-9591dfb Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2018 License: MIT Imports: 1 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 {
	ServerURL string `envconfig:"server_url" default:"localhost:8080"`
	Dev       bool   `envconfig:"dev" default:"false"`
	Debug     bool   `envconfig:"debug" default:"false"`
	Slack     *SlackConfig
}

Config refers to general application configuration

func FromEnv

func FromEnv() (*Config, error)

FromEnv pulls configuration from environment variables

type SlackConfig

type SlackConfig struct {
	AppToken string `envconfig:"slack_app_token" required:"true"`
	BotToken string `envconfig:"slack_bot_token" required:"true"`
}

SlackConfig refers to slack chat connection settings

Jump to

Keyboard shortcuts

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