Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataSource ¶
type DataSource interface { // Get returns the value of the given key. // key support dot notation. // Example: // - Get("port", "port") // - Get("redis.port", "port") // - Get("address.city.houses.0.id", "id") Get(path string, key string) any }
DataSource defines the interface for loading data from a data source.
func GetterToDataSource ¶ added in v1.3.2
func GetterToDataSource(s Getter) DataSource
func NewEnvSource ¶ added in v1.2.7
func NewEnvSource() DataSource
NewEnvSource creates a new envDataSource.
func NewMapDataSource ¶
func NewMapDataSource(data map[string]any) DataSource
NewMapDataSource creates a new MapDataSource.
Click to show internal directories.
Click to hide internal directories.