botconfig

package
v0.25.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultBotCfg = "/etc/solo-github-app/config.yml"

	BotConfigEnvVar     = "BOT_CONFIG"
	WebhookSecretEnvVar = "WEBHOOK_SECRET"
	PrivateKeyEnvVar    = "PRIVATE_KEY_FILE"
	IntegrationIdEnvVar = "INTEGRATION_ID"
)

Variables

View Source
var (
	FailedToReadFileError = func(err error, path string) error {
		return errors.Wrapf(err, "failed reading file: %s", path)
	}

	FailedToParseConfigError = func(err error, path string) error {
		return errors.Wrapf(err, "failed parsing configuration file: %s", path)
	}

	FailedToParseEnvVarError = func(err error, name, value string) error {
		return errors.Wrapf(err, "error parsing %s environment variable value: %s", name, value)
	}

	MissingBotConfigValueError = func(name string) error {
		return eris.Errorf("missing important bot config, use %s to provide it or include in config map", name)
	}
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Server baseapp.HTTPConfig `yaml:"server"`
	Github githubapp.Config   `yaml:"github"`
}

func ReadConfig

func ReadConfig() (*Config, error)

type ConfigReader added in v0.9.0

type ConfigReader interface {
	ReadConfig() (*Config, error)
}

func NewConfigReader added in v0.9.0

func NewConfigReader(os osutils.OsClient) ConfigReader

Jump to

Keyboard shortcuts

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