@@ -9,6 +9,7 @@ import (
|
||||
type Cfg struct {
|
||||
FileSystem *WebdavConfig `env:", prefix=FILESYSTEM_"`
|
||||
Cache *ValkeyConfig `env:", prefix=CACHE_"`
|
||||
Image *ImageConfig `env:", prefix=IMAGE_"`
|
||||
}
|
||||
|
||||
type WebdavConfig struct {
|
||||
@@ -30,7 +31,13 @@ type ValkeyConfig struct {
|
||||
InitAddress []string `env:"ADDRESS"`
|
||||
}
|
||||
|
||||
type ImageConfig struct {
|
||||
Concurency int64 `env:"CONCURENCY"`
|
||||
Quality int `env:"QUALITY"`
|
||||
}
|
||||
|
||||
func Read(ctx context.Context) (cfg Cfg, err error) {
|
||||
cfg = Default()
|
||||
err = envconfig.ProcessWith(ctx, &envconfig.Config{
|
||||
Target: &cfg,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user