Files
backend/internal/pkg/gorse/config.go

24 lines
456 B
Go
Raw Normal View History

package gorse
import (
"carrot_bbs/internal/config"
)
// Config Gorse客户端配置从config.GorseConfig转换
type Config struct {
Address string
APIKey string
Enabled bool
Dashboard string
}
// ConfigFromAppConfig 从应用配置创建Gorse配置
func ConfigFromAppConfig(cfg *config.GorseConfig) Config {
return Config{
Address: cfg.Address,
APIKey: cfg.APIKey,
Enabled: cfg.Enabled,
Dashboard: cfg.Dashboard,
}
}