config

package
v0.0.0-...-e0f7ac1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: GPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeConfig

func InitializeConfig(target interface{})

func InitializeLogging

func InitializeLogging(logLevel, logFormat string)

InitializeLogging sets logrus log level and formatting style.

Types

type GitHubConfig

type GitHubConfig struct {
	GithubAccessTokens []string `envconfig:"GITHUB_ACCESS_TOKENS" required:"true"`
}

type GoogleCloudConfig

type GoogleCloudConfig struct {
	GoogleProjectID             string `envconfig:"GCLOUD_PROJECT_ID" required:"true"`
	GooglePubSubTopicRepository string `envconfig:"GCLOUD_PUBSUB_TOPIC_REPOSITORY" required:"true"`
}

type HTTPConfig

type HTTPConfig struct {
	HTTPPort       int      `envconfig:"HTTP_PORT" default:"8080"`
	HTTPBind       string   `envconfig:"HTTP_BIND" default:"0.0.0.0"`
	AllowedOrigins []string `envconfig:"ALLOWED_ORIGINS" default:"*"`
}

type LogConfig

type LogConfig struct {
	LogLevel  string `envconfig:"LOG_LEVEL" default:"info"`
	LogFormat string `envconfig:"LOG_FORMAT" default:"json"`
}

Jump to

Keyboard shortcuts

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