config

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chart added in v0.4.0

type Chart struct {
	Repo string `envconfig:"CHART_REPO"`
	Path string `envconfig:"CHART_PATH"`
}

type Config

type Config struct {
	Logging                 Logging
	Host                    string `envconfig:"HOST"`
	JWTSecret               string `envconfig:"JWT_SECRET"`
	Github                  Github
	Database                Database
	GimletD                 GimletD
	Chart                   Chart
	RepoCachePath           string `envconfig:"REPO_CACHE_PATH"`
	WebhookSecret           string `envconfig:"WEBHOOK_SECRET"`
	ReleaseHistorySinceDays int    `envconfig:"RELEASE_HISTORY_SINCE_DAYS"`
}

func Environ

func Environ() (*Config, error)

Environ returns the settings from the environment.

func (*Config) IsGithub

func (c *Config) IsGithub() bool

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 GimletD

type GimletD struct {
	URL   string `envconfig:"GIMLETD_URL"`
	TOKEN string `envconfig:"GIMLETD_TOKEN"`
}

type Github

type Github struct {
	AppID          string    `envconfig:"GITHUB_APP_ID"`
	InstallationID string    `envconfig:"GITHUB_INSTALLATION_ID"`
	PrivateKey     Multiline `envconfig:"GITHUB_PRIVATE_KEY"`
	ClientID       string    `envconfig:"GITHUB_CLIENT_ID"`
	ClientSecret   string    `envconfig:"GITHUB_CLIENT_SECRET"`
	SkipVerify     bool      `envconfig:"GITHUB_SKIP_VERIFY"`
	Debug          bool      `envconfig:"GITHUB_DEBUG"`
	Org            string    `envconfig:"GITHUB_ORG"`
}

type Logging

type Logging struct {
	Debug bool `envconfig:"DEBUG"`
	Trace bool `envconfig:"TRACE"`
}

Logging provides the logging configuration.

type Multiline

type Multiline string

func (*Multiline) Decode

func (m *Multiline) Decode(value string) error

func (*Multiline) String

func (m *Multiline) String() string

Jump to

Keyboard shortcuts

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