config

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigTemplate string

Functions

func DefaultBeeWorkDir

func DefaultBeeWorkDir() string

DefaultBeeWorkDir returns the hardcoded bee working directory: ~/.openbee/bee

func DefaultLogsDir added in v0.0.4

func DefaultLogsDir() string

DefaultLogsDir returns the execution log directory: ~/.openbee/logs

func DefaultWorkerBaseDir

func DefaultWorkerBaseDir() string

DefaultWorkerBaseDir returns the hardcoded worker base directory: ~/.openbee/worker

Types

type BeeConfig

type BeeConfig struct {
	MessageDebounce time.Duration   `yaml:"message_debounce"`
	Claude          ClaudeConfig    `yaml:"claude"`
	Feeder          FeederConfig    `yaml:"feeder"`
	Platforms       PlatformsConfig `yaml:"platforms"`
	MCP             MCPConfig       `yaml:"mcp"`
	Media           MediaConfig     `yaml:"media"`

	// Derived fields — not in YAML, computed by Load()
	MCPBaseURL string `yaml:"-"` // http://host:port (no path suffix)
}

type ClaudeConfig

type ClaudeConfig struct {
	Path    string        `yaml:"path"`
	Timeout time.Duration `yaml:"timeout"`
}

type Config

type Config struct {
	Server   ServerConfig   `yaml:"server"`
	Database DatabaseConfig `yaml:"database"`
	Bee      BeeConfig      `yaml:"bee"`
}

func Load

func Load(path string) (Config, error)

type DatabaseConfig

type DatabaseConfig struct {
	Path string `yaml:"path"`
}

type DingTalkConfig

type DingTalkConfig struct {
	Enabled      bool   `yaml:"enabled"`
	ClientID     string `yaml:"client_id"`
	ClientSecret string `yaml:"client_secret"`
}

type FeederConfig

type FeederConfig struct {
	Timeout time.Duration `yaml:"timeout"`
}

type FeishuConfig

type FeishuConfig struct {
	Enabled      bool   `yaml:"enabled"`
	AppID        string `yaml:"app_id"`
	AppSecret    string `yaml:"app_secret"`
	MaxMediaSize int    `yaml:"max_media_size"` // 最大媒体下载大小(字节),默认 100MB
}

type MCPConfig

type MCPConfig struct {
	APIKey string `yaml:"api_key"`
}

type MediaConfig

type MediaConfig struct {
	FFprobePath string `yaml:"ffprobe_path"`
	FFmpegPath  string `yaml:"ffmpeg_path"`
}

type PlatformsConfig

type PlatformsConfig struct {
	Feishu   FeishuConfig   `yaml:"feishu"`
	DingTalk DingTalkConfig `yaml:"dingtalk"`
	WeCom    WeComConfig    `yaml:"wecom"`
	Telegram TelegramConfig `yaml:"telegram"`
	Weixin   WeixinConfig   `yaml:"weixin"`
}

type ServerConfig

type ServerConfig struct {
	Port  int    `yaml:"port"`
	Host  string `yaml:"host"`
	Debug bool   `yaml:"debug"`
}

type TelegramConfig added in v0.0.5

type TelegramConfig struct {
	Enabled      bool   `yaml:"enabled"`
	Token        string `yaml:"token"`
	MaxMediaSize int    `yaml:"max_media_size"` // bytes; default 50MB
	AuthCode     string `yaml:"auth_code"`      // passcode for user authorization; empty = no auth required
}

type WeComConfig

type WeComConfig struct {
	Enabled      bool   `yaml:"enabled"`
	BotID        string `yaml:"bot_id"`
	Secret       string `yaml:"secret"`
	WebSocketURL string `yaml:"websocket_url"`
}

type WeixinConfig added in v0.0.6

type WeixinConfig struct {
	Enabled      bool   `yaml:"enabled"`
	Token        string `yaml:"token"`
	BaseURL      string `yaml:"base_url"`
	CDNBaseURL   string `yaml:"cdn_base_url"`
	RouteTag     int    `yaml:"route_tag"`
	UserID       string `yaml:"user_id"`
	MaxMediaSize int    `yaml:"max_media_size"` // bytes; default 100MB
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL