Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type External ¶ added in v1.4.0
type External interface { // TagName is key name in golang struct tag (json, yaml, toml etc.). TagName() []string // Unmarshal parses the external data and stores the result // in the value pointed to by v. // Usually, it just wraps the existing `Unmarshal` function of third-party libraries Unmarshal(v interface{}) error }
External config source Implementation of this interface should be able to `Unmarshal` data into map[string]interface{}, where interface{} should be also same map type for the nested structures
type ExternalConfigMapper ¶ added in v1.4.0
type ExternalConfigMapper struct {
// contains filtered or unexported fields
}
func NewExternalConfigMapper ¶ added in v1.4.0
func NewExternalConfigMapper(ext External) *ExternalConfigMapper
func (*ExternalConfigMapper) Data ¶ added in v1.4.0
func (c *ExternalConfigMapper) Data() ExternalSource
func (*ExternalConfigMapper) Unmarshal ¶ added in v1.4.0
func (c *ExternalConfigMapper) Unmarshal(v interface{}) error
type ExternalSource ¶ added in v1.4.0
func AsExternalSource ¶ added in v1.4.0
func AsExternalSource(name string, es ExternalSource) ExternalSource
type NilContainer ¶ added in v1.4.0
type NilContainer struct{}
func (NilContainer) Read ¶ added in v1.4.0
func (NilContainer) Read(index string) (interface{}, bool)
Click to show internal directories.
Click to hide internal directories.