config

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: Apache-2.0 Imports: 2 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 {
	Debug                          bool `envconfig:"DEBUG"`
	Logging                        Logging
	Host                           string `envconfig:"HOST"`
	Database                       Database
	GitopsRepo                     string `envconfig:"GITOPS_REPO"`
	GitopsRepoDeployKeyPath        string `envconfig:"GITOPS_REPO_DEPLOY_KEY_PATH"`
	Notifications                  Notifications
	GithubStatusToken              string `envconfig:"GITHUB_STATUS_TOKEN"` // a Github Personal Access Token with repo:status perm
	GithubChartAccessDeployKeyPath string `envconfig:"GITOPS_CHART_ACCESS_DEPLOY_KEY_PATH"`
}

func Environ

func Environ() (*Config, error)

Environ returns the settings from the environment.

func (*Config) String

func (c *Config) String() string

String returns the configuration in string format.

type Database

type Database struct {
	Driver string `envconfig:"DATABASE_DRIVER"`
	Config string `envconfig:"DATABASE_CONFIG"`
}

type Logging

type Logging struct {
	Debug  bool `envconfig:"DEBUG"`
	Trace  bool `envconfig:"TRACE"`
	Color  bool `envconfig:"LOGS_COLOR"`
	Pretty bool `envconfig:"LOGS_PRETTY"`
	Text   bool `envconfig:"LOGS_TEXT"`
}

Logging provides the logging configuration.

type Notifications

type Notifications struct {
	Provider       string `envconfig:"NOTIFICATIONS_PROVIDER"`
	Token          string `envconfig:"NOTIFICATIONS_TOKEN"`
	DefaultChannel string `envconfig:"NOTIFICATIONS_DEFAULT_CHANNEL"`
	ChannelMapping string `envconfig:"NOTIFICATIONS_CHANNEL_MAPPING"`
}

Jump to

Keyboard shortcuts

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