config

package
v0.0.0-...-72e0103 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Debug   bool   `json:"debug"`
	Address string `json:"address"`
	Port    int32  `json:"port"`

	PoolName                 string `json:"pool_name" split_words:"true"`
	PoolPath                 string `json:"pool_path" split_words:"true"`
	PoolDev                  string `json:"pool_dev" split_words:"true"`
	FilesystemName           string `json:"filesystem_name" split_words:"true"`
	FilesystemPath           string `json:"filesystem_path" split_words:"true"`
	CastPath                 string `json:"cast_path" split_words:"true"`
	ReplicaPath              string `json:"replica_path" split_words:"true"`
	PortLowerBound           int32  `json:"port_from" split_words:"true"`
	PortUpperBound           int32  `json:"port_to" split_words:"true"`
	MainUnit                 string `json:"main_unit" split_words:"true"`
	ConfigTemplatePath       string `json:"config_template_path" split_words:"true"`
	UnitTemplateString       string `json:"unit_template_string" split_words:"true"`
	ConfigPathTemplateString string `json:"config_path_template_string" split_words:"true"`
}

Config stores the configuration loaded during startup.

func NewConfig

func NewConfig(name string) (*Config, error)

NewConfig creates an empty config instance.

func (*Config) LoadJson

func (c *Config) LoadJson(p string) error

LoadJson loads the json values to the config instance.

type MissingConfigurationVariableError

type MissingConfigurationVariableError struct {
	// contains filtered or unexported fields
}

func (MissingConfigurationVariableError) Error

Jump to

Keyboard shortcuts

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