Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigAPI ¶
type ConfigAPI struct {
// contains filtered or unexported fields
}
func (*ConfigAPI) ConfigGet ¶
ConfigGet gets config parameters from the given path. The path may be either a single field name, or a dotted path to a field.
func (*ConfigAPI) ConfigSet ¶
ConfigSet sets the given parameters at the given path in the local config. The given path may be either a single field name, or a dotted path to a field. The JSON value may be either a single value or a whole data structure to be replace. For example: ConfigSet("datastore.path", "dev/null") and ConfigSet("datastore", "{\"path\":\"dev/null\"}") are the same operation.
type ConfigModule ¶
type ConfigModule struct {
// contains filtered or unexported fields
}
configModule is plumbing implementation for setting and retrieving values from local config.
func NewConfigModule ¶
func NewConfigModule(repo repo2.Repo) *ConfigModule
NewConfig returns a new configModule.
func (*ConfigModule) API ¶
func (s *ConfigModule) API() *ConfigAPI
func (*ConfigModule) Get ¶
func (s *ConfigModule) Get(dottedKey string) (interface{}, error)
Get gets a value from config