Documentation ¶
Index ¶
- Constants
- type Collection
- type CollectionLoader
- type CollectionLoaderFunc
- type CollectionNotFoundError
- type Config
- type ConfigSchemaProvider
- type DirectoryConfigProvider
- func (d *DirectoryConfigProvider) CanSave(key string) bool
- func (d *DirectoryConfigProvider) Has(key string) bool
- func (d *DirectoryConfigProvider) RegisterFiletype(t FileType)
- func (d *DirectoryConfigProvider) Save(key string, v interface{}) error
- func (d *DirectoryConfigProvider) Unmarshal(key string, v interface{}) error
- type EnvConfigProvider
- type FileType
- type JSON
- type MemoryConfigProvider
- type Provider
- type Saver
- type Store
- func (s *Store) AddCollection(namespace string, collection *Collection)
- func (s *Store) AddCollectionLoaders(cl ...CollectionLoader)
- func (s *Store) ClearAllCaches()
- func (s *Store) Get(namespace string) Config
- func (s *Store) GetWritable(namespace string) WritableConfig
- func (s *Store) MaybeRegisterSchema(v interface{})
- func (s *Store) RegisterSchema(name string, schema reflect.Type)
- func (s *Store) RemoveTemporary()
- type TOML
- type WritableConfig
- type WritableProvider
- type XML
- type YAML
Constants ¶
View Source
const (
Default = ""
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection struct {
// contains filtered or unexported fields
}
func NewCollection ¶
func NewCollection() *Collection
func (*Collection) AddProviders ¶
func (c *Collection) AddProviders(providers ...Provider)
func (*Collection) ClearCache ¶
func (c *Collection) ClearCache()
func (*Collection) SetTemporary ¶
func (c *Collection) SetTemporary(temporary bool)
type CollectionLoader ¶
type CollectionLoader interface {
Load(name string) (*Collection, error)
}
type CollectionLoaderFunc ¶
type CollectionLoaderFunc func(name string) (*Collection, error)
func (CollectionLoaderFunc) Load ¶
func (f CollectionLoaderFunc) Load(name string) (*Collection, error)
type CollectionNotFoundError ¶
type CollectionNotFoundError struct {
Name string
}
func (CollectionNotFoundError) Error ¶
func (e CollectionNotFoundError) Error() string
type ConfigSchemaProvider ¶
type DirectoryConfigProvider ¶
type DirectoryConfigProvider struct {
// contains filtered or unexported fields
}
func NewDirectoryConfigProvider ¶
func NewDirectoryConfigProvider(base string, readOnly bool) *DirectoryConfigProvider
func (*DirectoryConfigProvider) CanSave ¶
func (d *DirectoryConfigProvider) CanSave(key string) bool
func (*DirectoryConfigProvider) Has ¶
func (d *DirectoryConfigProvider) Has(key string) bool
func (*DirectoryConfigProvider) RegisterFiletype ¶
func (d *DirectoryConfigProvider) RegisterFiletype(t FileType)
func (*DirectoryConfigProvider) Save ¶
func (d *DirectoryConfigProvider) Save(key string, v interface{}) error
func (*DirectoryConfigProvider) Unmarshal ¶
func (d *DirectoryConfigProvider) Unmarshal(key string, v interface{}) error
type EnvConfigProvider ¶
type EnvConfigProvider struct { Prefix string Separator string // contains filtered or unexported fields }
func NewEnvConfigProvider ¶
func NewEnvConfigProvider() *EnvConfigProvider
func (*EnvConfigProvider) Has ¶
func (e *EnvConfigProvider) Has(key string) bool
func (*EnvConfigProvider) Reset ¶
func (e *EnvConfigProvider) Reset()
func (*EnvConfigProvider) Unmarshal ¶
func (e *EnvConfigProvider) Unmarshal(key string, v interface{}) error
type JSON ¶
func (*JSON) Extensions ¶
type MemoryConfigProvider ¶
type MemoryConfigProvider struct {
// contains filtered or unexported fields
}
func NewMemoryConfigProvider ¶
func NewMemoryConfigProvider() *MemoryConfigProvider
func (*MemoryConfigProvider) CanSave ¶
func (m *MemoryConfigProvider) CanSave(key string) bool
func (*MemoryConfigProvider) Has ¶
func (m *MemoryConfigProvider) Has(key string) bool
func (*MemoryConfigProvider) Reset ¶
func (m *MemoryConfigProvider) Reset()
func (*MemoryConfigProvider) Save ¶
func (m *MemoryConfigProvider) Save(key string, v interface{}) error
func (*MemoryConfigProvider) Unmarshal ¶
func (m *MemoryConfigProvider) Unmarshal(key string, v interface{}) error
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) AddCollection ¶
func (s *Store) AddCollection(namespace string, collection *Collection)
func (*Store) AddCollectionLoaders ¶
func (s *Store) AddCollectionLoaders(cl ...CollectionLoader)
func (*Store) ClearAllCaches ¶
func (s *Store) ClearAllCaches()
func (*Store) GetWritable ¶
func (s *Store) GetWritable(namespace string) WritableConfig
func (*Store) MaybeRegisterSchema ¶
func (s *Store) MaybeRegisterSchema(v interface{})
func (*Store) RemoveTemporary ¶
func (s *Store) RemoveTemporary()
type TOML ¶
func (*TOML) Extensions ¶
type WritableConfig ¶
type WritableProvider ¶
Click to show internal directories.
Click to hide internal directories.