config

package
v0.0.0-...-ffb091d Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PathExists

func PathExists(path string) bool

Types

type Config

type Config struct {
	Port              string           `json:"port" yaml:"port"`
	Database          string           `json:"database" yaml:"database"`
	DatabaseSettings  DatabaseSettings `json:"database_settings" yaml:"database_settings"`
	StorageBackend    string           `json:"storage_backend" yaml:"storage_backend"`
	StorageSettings   StorageSettings  `json:"storage_settings" yaml:"storage_settings"`
	EventServiceURL   string           `json:"event_service_url" yaml:"event_service_url"`
	UserServiceURL    string           `json:"user_service_url" yaml:"user_service_url"`
	StateServiceURL   string           `json:"state_service_url" yaml:"state_service_url"`
	WebHook           string           `json:"web_hook" yaml:"web_hook"`
	Dev               bool             `json:"dev" yaml:"dev"`
	BasicAuthUsername string           `json:"basic_auth_username" yaml:"basic_auth_username"`
	BasicAuthPassword string           `json:"basic_auth_password" yaml:"basic_auth_password"`
}

func LoadConfig

func LoadConfig(file string, env []string) (*Config, error)

func NewConfig

func NewConfig(env []string) (*Config, error)

type DatabaseSettings

type DatabaseSettings struct {
	Path        string `json:"path" yaml:"path"`
	PostgresUrl string `json:"postgres_url" yaml:"postgres_url"`
}

type StorageSettings

type StorageSettings struct {
	Path        string `json:"path" yaml:"path"`
	Bucket      string `json:"bucket" yaml:"bucket"`
	Credentials string `json:"credentials" yaml:"credentials"`
}

Jump to

Keyboard shortcuts

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