Documentation ¶
Overview ¶
Package conf parses start up args and config file
Index ¶
- Constants
- Variables
- func Bool(s string) bool
- func Initialize() (err error)
- func Print()
- type Config_store
- func (this *Config_store) AddBool(target *bool, default_value bool, section string, key string, ...)
- func (this *Config_store) AddInt(target *int, default_value int, section string, key string, descr_short string, ...)
- func (this *Config_store) AddString(target *string, default_value string, section string, key string, ...)
- func (this Config_store) Parse()
- func (this Config_store) PrintHelp()
- type Config_value
- type Config_value_bool
- type Config_value_int
- type Config_value_string
Constants ¶
View Source
const VERSION string = "[% VERSION %]"
Variables ¶
View Source
var ( // Admin ADMIN_EMAIL string ADMIN_USERS string AdminUsers []string // Permissions for anonymous user ANON_READ bool ANON_WRITE bool ANON_DELETE bool // Address API_IP string API_PORT int API_URL string // for external address only // Auth AUTH_BASIC bool AUTH_GLOBUS_TOKEN_URL string AUTH_GLOBUS_PROFILE_URL string AUTH_OAUTH_URL_STR string AUTH_OAUTH_BEARER_STR string AUTH_CACHE_TIMEOUT int AUTH_OAUTH = make(map[string]string) OAUTH_DEFAULT string // first value in AUTH_OAUTH_URL_STR // Default Chunksize for size virtual index CHUNK_SIZE int64 = 1048576 // Config File CONFIG_FILE string // Runtime EXPIRE_WAIT int // wait time for reaper in minutes GOMAXPROCS string MAX_REVISIONS int // max number of node revisions to keep; values < 0 mean keep all // Logs LOG_PERF bool // Indicates whether performance logs should be stored LOG_ROTATE bool // Indicates whether logs should be rotated daily LOG_OUTPUT string // Mongo information MONGODB_HOSTS string MONGODB_DATABASE string MONGODB_USER string MONGODB_PASSWORD string MONGODB_ATTRIBUTE_INDEXES string // Node Indices NODE_IDXS map[string]idxOpts = nil // Paths PATH_SITE string PATH_DATA string PATH_LOGS string PATH_LOCAL string PATH_PIDFILE string // Reload RELOAD string // SSL SSL bool SSL_KEY string SSL_CERT string // Versions VERSIONS = make(map[string]int) PRINT_HELP bool // full usage SHOW_HELP bool // simple usage SHOW_VERSION bool // internal config control FAKE_VAR = false )
View Source
var LOG_OUTPUTS = [3]string{"file", "console", "both"}
Functions ¶
func Initialize ¶
func Initialize() (err error)
Initialize is an explicit init. Enables outside use of shock-server packages. Parses config and populates the conf variables.
Types ¶
type Config_store ¶ added in v0.9.22
type Config_store struct { Store []*Config_value Fs *flag.FlagSet Con *config.Config }
func NewCS ¶ added in v0.9.22
func NewCS(c *config.Config) *Config_store
func (Config_store) Parse ¶ added in v0.9.22
func (this Config_store) Parse()
func (Config_store) PrintHelp ¶ added in v0.9.22
func (this Config_store) PrintHelp()
type Config_value ¶ added in v0.9.22
type Config_value struct { Conf_type string Conf_str *Config_value_string Conf_int *Config_value_int Conf_bool *Config_value_bool }
type Config_value_bool ¶ added in v0.9.22
type Config_value_int ¶ added in v0.9.22
Click to show internal directories.
Click to hide internal directories.