Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Port fs db server port. // Default: 8888 // Env: PORT Port int `yaml:"port"` // Storage fs db storage options. Storage Storage `yaml:"storage"` }
Config provides fs db configuration options.
Default: port: 8888 storage: dbPath: test.db maxDirCount: 1000000 rootDirs: - ./testStorage
func ParseConfig ¶
ParseConfig returns filled Config options from a configuration file.
type Storage ¶
type Storage struct { // DbPath path to the SQLite database file. // Default: test.db // Env: DB_PATH DbPath string `yaml:"dbPath"` // MaxDirCount max number of files in one subdirectory. // Default: 1_000_000 // Env: DIR_COUNT MaxDirCount uint64 `yaml:"maxDirCount"` // RootDirs slice with root directories. // Default: ["./testStorage"] // Env: ROOT_DIRS RootDirs []string `yaml:"rootDirs"` }
Storage provides configuration options for fs db storage.
Default: dbPath: test.db maxDirCount: 1000000 rootDirs: - ./testStorage
Click to show internal directories.
Click to hide internal directories.