conf

package
v0.9.2-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnvConfig

func EnvConfig(appName string, conf interface{}) error

EnvConfig is a convenience function to process the envconfig ( https://github.com/kelseyhightower/envconfig) based configuration environment variables into conf. Additional notes:

Types

type Auth0

type Auth0 struct {
	AdminClientID        string `envconfig:"ADMIN_CLIENT_ID"`
	AdminClientSecret    string `envconfig:"ADMIN_CLIENT_SECRET"`
	AdminAudienceURL     string `envconfig:"ADMIN_AUDIENCE_URL"`
	PlatformClientSecret string `envconfig:"PLATFORM_CLIENT_SECRET" required:"true"`
	PlatformPubKeyFile   string `envconfig:"PLATFORM_JWT_PUB_KEY_FILE" required:"true"`
	PlatformPubKey       []byte
}

Auth0 hold information about auth0 authentication configuration

type Config

type Config struct {
	Auth0
	Host                        string `envconfig:"KUBERNETES_SERVICE_HOST" required:"true"`
	GitHome                     string `envconfig:"GIT_HOME" default:"/home/git"`
	CleanerPollSleepDurationSec int    `envconfig:"CLEANER_POLL_SLEEP_DURATION_SEC" default:"5"`
	LockTimeout                 int    `envconfig:"GIT_LOCK_TIMEOUT" default:"10"`
	GitAPIHostname              string
	TLSInsecure                 bool
	TLSConfig                   rest.TLSClientConfig
	// Not Implemented yet
	GitHubHookSecret string `envconfig:"GITHUB_HOOK_SECRET"`
}

Config represents the required SSH server configuration.

func (Config) CleanerPollSleepDuration

func (c Config) CleanerPollSleepDuration() time.Duration

CleanerPollSleepDuration returns c.CleanerPollSleepDurationSec as a time.Duration.

func (Config) GitLockTimeout

func (c Config) GitLockTimeout() time.Duration

GitLockTimeout return LockTimeout in minutes

func (*Config) ReadPubKey

func (c *Config) ReadPubKey() (err error)

ReadPubKey read a public file from Config.Auth0.PlatformPubKeyFile and stores in Config.Auth0.PlatfromPubKey

Jump to

Keyboard shortcuts

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