Files
backend/internal/pkg/gorse/config.go
lan 4d8f2ec997 Initial backend repository commit.
Set up project files and add .gitignore to exclude local build/runtime artifacts.

Made-with: Cursor
2026-03-09 21:28:58 +08:00

24 lines
456 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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,
}
}