Versions in this module Expand all Collapse all v6 v6.0.0 Dec 23, 2020 Changes in this version + const MaxWriteLength + var ErrReadOnlyConfiguration = errors.New("configuration is read-only") + func FixInvalidLocales(cfg *model.Config) bool + func GenerateClientConfig(c *model.Config, telemetryID string, license *model.License) map[string]string + func GenerateLimitedClientConfig(c *model.Config, telemetryID string, license *model.License) map[string]string + func GetEnvironment() map[string]string + func GetValueByPath(path []string, obj interface{}) (interface{}, bool) + func IsDatabaseDSN(dsn string) bool + func IsJsonMap(data string) bool + func JSONToLogTargetCfg(data []byte) (mlog.LogTargetCfg, error) + func Merge(cfg *model.Config, patch *model.Config, mergeConfig *utils.MergeConfig) (*model.Config, error) + func Migrate(from, to string) error + type BackingStore interface + Close func() error + GetFile func(name string) ([]byte, error) + HasFile func(name string) (bool, error) + Load func() ([]byte, error) + RemoveFile func(name string) error + Set func(*model.Config) error + SetFile func(name string, data []byte) error + String func() string + Watch func(callback func()) error + type DatabaseStore struct + func NewDatabaseStore(dsn string) (ds *DatabaseStore, err error) + func (ds *DatabaseStore) Close() error + func (ds *DatabaseStore) GetFile(name string) ([]byte, error) + func (ds *DatabaseStore) HasFile(name string) (bool, error) + func (ds *DatabaseStore) Load() ([]byte, error) + func (ds *DatabaseStore) RemoveFile(name string) error + func (ds *DatabaseStore) Set(newCfg *model.Config) error + func (ds *DatabaseStore) SetFile(name string, data []byte) error + func (ds *DatabaseStore) String() string + func (ds *DatabaseStore) Watch(_ func()) error + type FeatureFlagSyncParams struct + Log *mlog.Logger + ServerID string + SplitKey string + SyncIntervalSeconds int + type FeatureFlagSynchronizer struct + func NewFeatureFlagSynchronizer(params FeatureFlagSyncParams) (*FeatureFlagSynchronizer, error) + func (f *FeatureFlagSynchronizer) Close() + func (f *FeatureFlagSynchronizer) EnsureReady() error + func (f *FeatureFlagSynchronizer) UpdateFeatureFlagValues(base model.FeatureFlags) model.FeatureFlags + type FileGetter interface + GetFile func(name string) ([]byte, error) + type FileStore struct + func NewFileStore(path string, watch bool) (fs *FileStore, err error) + func (fs *FileStore) Close() error + func (fs *FileStore) GetFile(name string) ([]byte, error) + func (fs *FileStore) GetFilePath(name string) string + func (fs *FileStore) HasFile(name string) (bool, error) + func (fs *FileStore) Load() ([]byte, error) + func (fs *FileStore) RemoveFile(name string) error + func (fs *FileStore) Set(newCfg *model.Config) error + func (fs *FileStore) SetFile(name string, data []byte) error + func (fs *FileStore) String() string + func (fs *FileStore) Watch(callback func()) error + type Listener func(oldConfig *model.Config, newConfig *model.Config) + type LogConfigSrc interface + AddListener func(listener LogSrcListener) string + Close func() error + Get func() mlog.LogTargetCfg + RemoveListener func(id string) + Set func(dsn string, fget FileGetter) (err error) + func NewLogConfigSrc(dsn string, isJSON bool, fget FileGetter) (LogConfigSrc, error) + type LogSrcListener func(old, new mlog.LogTargetCfg) + type MemoryStore struct + func NewMemoryStore() (*MemoryStore, error) + func NewMemoryStoreWithOptions(options *MemoryStoreOptions) (*MemoryStore, error) + func (ms *MemoryStore) Close() error + func (ms *MemoryStore) GetFile(name string) ([]byte, error) + func (ms *MemoryStore) HasFile(name string) (bool, error) + func (ms *MemoryStore) Load() ([]byte, error) + func (ms *MemoryStore) RemoveFile(name string) error + func (ms *MemoryStore) Set(newCfg *model.Config) error + func (ms *MemoryStore) SetFile(name string, data []byte) error + func (ms *MemoryStore) String() string + func (ms *MemoryStore) Watch(_ func()) error + type MemoryStoreOptions struct + IgnoreEnvironmentOverrides bool + InitialConfig *model.Config + InitialFiles map[string][]byte + SkipValidation bool + type Store struct + func NewStore(dsn string, watch bool, customDefaults *model.Config) (*Store, error) + func NewStoreFromBacking(backingStore BackingStore, customDefaults *model.Config) (*Store, error) + func NewTestMemoryStore() *Store + func (e *Store) AddListener(listener Listener) string + func (e *Store) RemoveListener(id string) + func (s *Store) Close() error + func (s *Store) Get() *model.Config + func (s *Store) GetEnvironmentOverrides() map[string]interface{} + func (s *Store) GetFile(name string) ([]byte, error) + func (s *Store) GetNoEnv() *model.Config + func (s *Store) HasFile(name string) (bool, error) + func (s *Store) Load() error + func (s *Store) PersistFeatures(persist bool) + func (s *Store) RemoveEnvironmentOverrides(cfg *model.Config) *model.Config + func (s *Store) RemoveFile(name string) error + func (s *Store) Set(newCfg *model.Config) (*model.Config, error) + func (s *Store) SetFile(name string, data []byte) error + func (s *Store) String() string Other modules containing this package github.com/adacta-ru/mattermost-server github.com/adacta-ru/mattermost-server/v5