config

package
v0.2.7-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2016 License: Apache-2.0 Imports: 7 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	IsDev                bool
	Port                 int
	DbAddress            string
	SecretsPath          string
	MigrationsPath       string
	ConstructionZonePath string
}

Config contains vital environment metadata used through out the backend.

func GetConfig

func GetConfig() *Config

GetConfig gets the configuration for the current execution environment.

func (*Config) String

func (c *Config) String() string

type Credentials

type Credentials struct {
	GithubPush UserPass `json:"githubPushCreds"`
}

Credentials holds all the authentication metadata needed by gophr backend modules.

func ReadCredentials

func ReadCredentials(conf *Config) (*Credentials, error)

ReadCredentials reads credentials from the credentials secret.

type UserPass

type UserPass struct {
	User string `json:"user"`
	Pass string `json:"password"`
}

UserPass is a tuple of user name and password.

Jump to

Keyboard shortcuts

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