fs

package
v2.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDefaultConfigurationStorage added in v2.3.0

func NewDefaultConfigurationStorage() model.ConfigurationStorage

func NewFS

func NewFS(settings model.FileStorageLocal) fs.FS

func NewFSConnectionTester

func NewFSConnectionTester(settings model.FileStorageLocal, expectedFiles []string) model.ConnectionTester

func NewFSWithFiles

func NewFSWithFiles(settings model.FileStorageLocal, files map[string][]byte) fs.FS

NewFSWithFiles creates the fs which already has predefined files on top of the base fs

func NewKeyStorageConnectionTester

func NewKeyStorageConnectionTester(settings model.FileStorageLocal) model.ConnectionTester

Types

type BuildinConfigStorage added in v2.3.3

type BuildinConfigStorage struct {
	UpdateChan chan interface{}
	// contains filtered or unexported fields
}

func NewBuildingConfigurationStorage added in v2.3.3

func NewBuildingConfigurationStorage() *BuildinConfigStorage

func (*BuildinConfigStorage) CloseUpdateChan added in v2.3.3

func (cs *BuildinConfigStorage) CloseUpdateChan()

CloseUpdateChan closes update channel.

func (*BuildinConfigStorage) Errors added in v2.3.3

func (cs *BuildinConfigStorage) Errors() []error

func (*BuildinConfigStorage) ForceReloadOnWriteConfig added in v2.3.3

func (cs *BuildinConfigStorage) ForceReloadOnWriteConfig() bool

func (*BuildinConfigStorage) GetUpdateChan added in v2.3.3

func (cs *BuildinConfigStorage) GetUpdateChan() chan interface{}

func (*BuildinConfigStorage) LoadServerSettings added in v2.3.3

func (cs *BuildinConfigStorage) LoadServerSettings(validate bool) (model.ServerSettings, []error)

func (*BuildinConfigStorage) LoadedSettings added in v2.3.3

func (cs *BuildinConfigStorage) LoadedSettings() *model.ServerSettings

func (*BuildinConfigStorage) WriteConfig added in v2.3.3

func (cs *BuildinConfigStorage) WriteConfig(settings model.ServerSettings) error

type ConfigurationStorage added in v2.3.0

type ConfigurationStorage struct {
	ServerConfigPath string
	UpdateChan       chan interface{}
	// contains filtered or unexported fields
}

ConfigurationStorage is a wrapper over server configuration file.

func NewConfigurationStorage added in v2.3.0

func NewConfigurationStorage(config model.FileStorageSettings) (*ConfigurationStorage, error)

NewConfigurationStorage creates and returns new file configuration storage.

func (*ConfigurationStorage) CloseUpdateChan added in v2.3.0

func (cs *ConfigurationStorage) CloseUpdateChan()

CloseUpdateChan closes update channel.

func (*ConfigurationStorage) Errors added in v2.3.3

func (cs *ConfigurationStorage) Errors() []error

func (*ConfigurationStorage) ForceReloadOnWriteConfig added in v2.3.0

func (cs *ConfigurationStorage) ForceReloadOnWriteConfig() bool

func (*ConfigurationStorage) GetUpdateChan added in v2.3.0

func (cs *ConfigurationStorage) GetUpdateChan() chan interface{}

GetUpdateChan returns update channel.

func (*ConfigurationStorage) LoadServerSettings added in v2.3.0

func (cs *ConfigurationStorage) LoadServerSettings(validate bool) (model.ServerSettings, []error)

LoadServerSettings loads server settings from the file.

func (*ConfigurationStorage) LoadedSettings added in v2.3.3

func (cs *ConfigurationStorage) LoadedSettings() *model.ServerSettings

func (*ConfigurationStorage) WriteConfig added in v2.3.0

func (cs *ConfigurationStorage) WriteConfig(settings model.ServerSettings) error

WriteConfig writes new config to server configuration file.

type FSConnectionTester

type FSConnectionTester struct {
	// contains filtered or unexported fields
}

func (*FSConnectionTester) Connect

func (ct *FSConnectionTester) Connect() error

type KeyStorage

type KeyStorage struct {
	PrivateKeyPath string
}

KeyStorage is a wrapper over private key files

func NewKeyStorage

func NewKeyStorage(settings model.FileStorageLocal) (*KeyStorage, error)

NewKeyStorage creates and returns new key files storage.

func (*KeyStorage) LoadPrivateKey

func (ks *KeyStorage) LoadPrivateKey() (interface{}, error)

LoadPrivateKey loads private key from the storage

func (*KeyStorage) ReplaceKey

func (ks *KeyStorage) ReplaceKey(keyPEM []byte) error

ReplaceKey replaces private keys

type KeyStorageConnectionTester

type KeyStorageConnectionTester struct {
	// contains filtered or unexported fields
}

func (*KeyStorageConnectionTester) Connect

func (ct *KeyStorageConnectionTester) Connect() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL