Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadDotEnv ¶
LoadDotEnv 从指定文件加载 .env 到进程环境变量。 不传文件名时默认查找 ./.env 和 ../.env。 已存在的环境变量不会被覆盖。
Types ¶
type Config ¶
type Config struct {
Host string
Port int
Debug bool
ProjectName string
LogLevel string
LogFormat string
LogPath string
LogStdout bool
LogNoColor bool
LogFileEnabled bool
LogRotateDaily bool
LogMaxSizeMB int
LogMaxAgeDays int
LogMaxBackups int
LogCompress bool
MessageDebugStreamEvent bool
APIPrefix string
WebSocketPath string
DefaultAgentID string
DefaultTimezone string
WorkspacePath string
CacheFileDir string
WebDistDir string
AppMode string
DesktopSessionToken string
SkillsAPIURL string
SkillsSourceURLs string
SkillsDefaultSourcesEnabled bool
SkillsAPISearchLimit int
DatabaseDriver string
DatabaseURL string
AccessToken string
AuthSessionCookieName string
AuthCookieSameSite string
AuthCookieSecure bool
AuthSessionTTLHours int
BaseSystemPrompt string
MainAgentSystemPrompt string
MemoryEnabled bool
MemoryAutoRecall bool
MemoryAutoExtract bool
MemoryMaxResults int
MemoryScoreThreshold float64
DiscordEnabled bool
DiscordBotToken string
TelegramEnabled bool
TelegramBotToken string
ConnectorOAuthRedirectURI string
ConnectorOAuthAllowedOrigins []string
AllowedWebSocketOrigins []string
ConnectorOAuthStateTTLSeconds int
AutomationRunTimeoutSeconds int
ConnectorCredentialsKey string
ConnectorGitHubClientID string
ConnectorGitHubClientSecret string
ConnectorGoogleClientID string
ConnectorGoogleClientSecret string
ConnectorLinkedInClientID string
ConnectorLinkedInClientSecret string
ConnectorTwitterClientID string
ConnectorTwitterClientSecret string
ConnectorInstagramClientID string
ConnectorInstagramClientSecret string
ConnectorShopifyClientID string
ConnectorShopifyClientSecret string
}
Config 承载 Go 服务运行时配置。
Click to show internal directories.
Click to hide internal directories.