Initial backend repository commit.
Set up project files and add .gitignore to exclude local build/runtime artifacts. Made-with: Cursor
This commit is contained in:
23
internal/pkg/gorse/config.go
Normal file
23
internal/pkg/gorse/config.go
Normal file
@@ -0,0 +1,23 @@
|
||||
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,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user