config

package
v0.0.0-...-fa1582b Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(ignoreProtoc bool) error

func SafeInit

func SafeInit()

SafeInit is used from unit tests to ignore protoc

Types

type Config

type Config struct {
	// Server Settings
	BindAddress  string `` /* 144-byte string literal not displayed */
	ReadTimeout  int    `` /* 130-byte string literal not displayed */
	WriteTimeout int    `` /* 134-byte string literal not displayed */

	// Protobuf Compilation Settings
	CompileTimeout  int    `` /* 139-byte string literal not displayed */
	ProtocPath      string `` /* 129-byte string literal not displayed */
	ProtocGenGoPath string `` /* 175-byte string literal not displayed */
	// Database Settings
	DatabaseDriver string `long:"database-driver" env:"DATABASE_DRIVER" default:"memory" json:"database_driver" description:"The database driver to use"`

	// Storage Settings
	StorageDriver string `long:"storage-driver" env:"STORAGE_DRIVER" default:"file" json:"storage_driver" description:"The storage driver to use"`

	// File Storage settings
	FileStoragePath string `` /* 184-byte string literal not displayed */

	// Memory database settings
	PersistMemoryToDisk bool `` /* 155-byte string literal not displayed */

	// Pre-populate cache with remote dependencies
	PreCachedRemotes []string `` /* 155-byte string literal not displayed */

	// UI Settings
	RedirectNotFoundToUI bool `` /* 158-byte string literal not displayed */
	CORSEnabled          bool `long:"enable-cors" env:"ENABLE_CORS" json:"cors_enabled" description:"Enable CORS headers for requests"`

	// protobuf version as detected at boot
	ProtobufVersion string `no-flag:"" json:"protobuf_version"`

	// Compile environment - add a short t to trick unit test parsing
	GoVersion   string `hidden:"true" short:"t" json:"go_version"`
	GitCommit   string `hidden:"true" json:"git_commit"`
	CompileDate string `hidden:"true" json:"compile_date"`
}
var GlobalConfig *Config

func (*Config) JSON

func (c *Config) JSON() []byte

JSON returns the json bytes for the config object

Jump to

Keyboard shortcuts

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