Documentation ¶
Index ¶
Constants ¶
View Source
const ( DriverPG = "pgx" DriverSqlite = "sqlite" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthConfig ¶
type Config ¶
type Config struct { PublicURL *url.URL `env:"PUBLIC_URL" required:"" help:"The public URL where the Oxidrive UI and API are exposed"` LogLevel zerolog.Level `env:"LOG_LEVEL" default:"info"` LogFormat LogFormat `env:"LOG_FORMAT" default:"json"` Host string `env:"HOST" default:"127.0.0.1"` Port int16 `env:"PORT" default:"4000"` AssetsFolder string `env:"OXIDRIVE_ASSETS_FOLDER" default:"./assets"` AuthConfig DatabaseConfig StorageConfig }
func (*Config) AssetsFolderPath ¶
func (*Config) ListenAddress ¶
type DatabaseConfig ¶
type DatabaseConfig struct { Url *url.URL `` /* 231-byte string literal not displayed */ PostgresHost string `group:"postgresql" xor:"host" required:"" env:"POSTGRES_HOST"` PostgresPort string `group:"postgresql" xor:"port" required:"" env:"POSTGRES_PORT"` PostgresUser string `group:"postgresql" xor:"user" env:"POSTGRES_USER"` PostgresPassword string `group:"postgresql" xor:"pwd" env:"POSTGRES_PASSWORD"` PostgresDB string `group:"postgresql" xor:"db" env:"POSTGRES_DB"` PostgresArgs string `group:"postgresql" xor:"args" env:"POSTGRES_ARGS"` }
func (*DatabaseConfig) DatabaseDriver ¶
func (p *DatabaseConfig) DatabaseDriver() string
func (*DatabaseConfig) DatabaseName ¶
func (p *DatabaseConfig) DatabaseName() string
func (*DatabaseConfig) DatabaseSource ¶
func (p *DatabaseConfig) DatabaseSource() string
func (*DatabaseConfig) DatabaseUrl ¶
func (p *DatabaseConfig) DatabaseUrl() *url.URL
type StorageConfig ¶
type StorageConfig struct { StoragePrefix string `group:"storage" default:"/files" env:"OXIDRIVE_STORAGE_PREFIX"` ThroughputInByte int `` /* 160-byte string literal not displayed */ MultipartMaxMemory int64 `` /* 139-byte string literal not displayed */ StorageFSConfig }
type StorageFSConfig ¶
type StorageFSConfig struct {
StorageFSDataDir string `group:"storage" type:"path" env:"OXIDRIVE_STORAGE_FS_DATA_DIR"`
}
Click to show internal directories.
Click to hide internal directories.