config

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 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 Config

type Config struct {
	LogLevel        string `env:"LOG_LEVEL"`
	SCM             SCM
	MessageHandlers MessageHandlers
	DataSources     DataSources
	Cors            Cors `yaml:"cors"`
}

func Load

func Load() (*Config, error)

type Cors added in v1.8.0

type Cors struct {
	AllowOrigins    []string `yaml:"allowOrigins" env:"CORS_ALLOW_ORIGINS" envSeparator:","`
	AllowAllOrigins bool     `yaml:"allowAllOrigins" env:"CORS_ALLOW_ALL_ORIGINS"`
	AllowHeaders    []string `yaml:"allowHeaders" env:"CORS_ALLOW_METHODS" envSeparator:","`
}

type DataSources added in v1.7.0

type DataSources struct {
	MongoDB struct {
		ConnectionString string `env:"MONGODB_CONNECTION_STRING"`
	}
}

type MessageHandlers

type MessageHandlers struct {
	Slack   Slack
	Webhook Webhook
}

type SCM

type SCM struct {
	User   string `env:"GIT_USER"`
	Token  string `env:"GIT_TOKEN"`
	Secret string `env:"GITHUB_SECRET"`
}

type Slack

type Slack struct {
	Token string `env:"SLACK_TOKEN"`
}

type Webhook

type Webhook struct {
	URL    string `env:"WEBHOOK_URL"`
	Token  string `env:"WEBHOOK_TOKEN"`
	Secret string `env:"WEBHOOK_SECRET"`
}

Jump to

Keyboard shortcuts

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