fs

package
v2.3.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 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 NewDefaultConfigurationStorage added in v2.3.0

func NewDefaultConfigurationStorage() (*ConfigurationStorage, error)

func (*ConfigurationStorage) CloseUpdateChan added in v2.3.0

func (cs *ConfigurationStorage) CloseUpdateChan()

CloseUpdateChan closes update channel.

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(forceReload bool) (model.ServerSettings, error)

LoadServerSettings loads server settings from the file.

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