appconfig

package
v0.0.0-...-dcff070 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: AGPL-3.0-or-later Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigFile = `config.yaml`

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	DefaultFolder string         `yaml:"defaultFolder"`
	ClientName    string         `yaml:"clientName"`
	Folders       []FolderConfig `yaml:"folders"`
}

func Load

func Load(path string) (AppConfig, error)

func LoadFromUser

func LoadFromUser() (AppConfig, error)

func (*AppConfig) GetDefault

func (c *AppConfig) GetDefault() FolderConfig

func (*AppConfig) GetFolder

func (c *AppConfig) GetFolder(name string) FolderConfig

type EfsProviderConfig

type EfsProviderConfig struct {
	Path       string `yaml:"path"`
	Passphrase string `yaml:"passphrase"`
}

Encrypted File System Provider Used as 'remote' but accessible through some file interface

type FolderConfig

type FolderConfig struct {
	Name   string         `yaml:"name"`
	Local  ProviderConfig `yaml:"local"`
	Remote ProviderConfig `yaml:"remote"`
}

type FsProviderConfig

type FsProviderConfig struct {
	Path string `yaml:"path"`
}

File System provider Local storage, used as 'local'

type ProviderConfig

type ProviderConfig struct {
	Type       string             `yaml:"type"`
	FsConfig   *FsProviderConfig  `yaml:"fsConfig,omitempty"`
	EfsConfig  *EfsProviderConfig `yaml:"efsConfig,omitempty"`
	S3Config   *S3ProviderConfig  `yaml:"s3Config,omitempty"`
	ClientName string             `yaml:"-"`
}

func (ProviderConfig) GetFolderPath

func (c ProviderConfig) GetFolderPath() string

type S3ProviderConfig

type S3ProviderConfig struct {
	Passphrase     string `yaml:"passphrase"`
	AccessKey      string `yaml:"accessKey"`
	SecretKey      string `yaml:"secretKey"`
	BasePath       string `yaml:"basePath"`
	Bucket         string `yaml:"bucket"`
	Endpoint       string `yaml:"endpoint"`
	ForcePathStyle bool   `yaml:"forcePathStyle"`
	Region         string `yaml:"region"`
}

S3 File System Provider

Jump to

Keyboard shortcuts

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