Documentation ¶
Index ¶
- Variables
- func ComposeWebUIURL(useBackupPort bool) string
- func ComposeWebUIURLv2(useBackupPort bool) string
- func DeleteConfig() error
- func GetAddAtGroup() bool
- func GetAlias() []string
- func GetAliyunAccessKeyId() string
- func GetAliyunAccessKeySecret() string
- func GetAliyunAudit() bool
- func GetAliyunBucketName() string
- func GetAliyunEndpoint() string
- func GetArrayValue() bool
- func GetAtoPCount() int
- func GetAutoBind() bool
- func GetBackupPort() string
- func GetBaiduAudit() int
- func GetBaiduBCEAK() string
- func GetBaiduBCESK() string
- func GetBaiduBOSBucketName() string
- func GetBindPrefix() string
- func GetBlackPrefixMode() bool
- func GetBlackPrefixs() []string
- func GetCardAndNick() string
- func GetCrtPath() string
- func GetCustomBotName() string
- func GetDevBotid() string
- func GetDevMsgID() bool
- func GetDevelop_Acdir() string
- func GetDeveloperLog() bool
- func GetEnableWsServer() bool
- func GetForwardMsgLimit() int
- func GetGlobalChannelToGroup() bool
- func GetGuildUrlImageToBase64() bool
- func GetHashIDValue() bool
- func GetHeartBeatInterval() int
- func GetHttpAddress() string
- func GetHttpTimeOut() int
- func GetHttpVersion() int
- func GetIdentifyFile() bool
- func GetIdmapPro() bool
- func GetIgnoreBotMessage() bool
- func GetImageLimit() int
- func GetImageLimitB() int
- func GetKeyPath() string
- func GetLaunchReconectTimes() int
- func GetLazyMessageId() bool
- func GetLogLevel() int
- func GetLotusPassword() string
- func GetLotusValue() bool
- func GetMasterID() []string
- func GetMePrefix() string
- func GetNativeOb11() bool
- func GetNoWhiteResponse() string
- func GetOb11Int32() bool
- func GetOssType() int
- func GetPortValue() string
- func GetPostMaxRetries() []int
- func GetPostRetriesInterval() []int
- func GetPostSecret() []string
- func GetPostUrl() []string
- func GetQrSize() int
- func GetRamDomSeq() bool
- func GetReconnecTimes() int
- func GetRecordBitRate() int
- func GetRecordSampleRate() int
- func GetRegionID() string
- func GetRemoveAt() bool
- func GetRemoveBotAtGroup() bool
- func GetRemovePrefixValue() bool
- func GetRestartTime() int
- func GetSaveLogs() bool
- func GetSelfIntroduce() []string
- func GetSendDelay() int
- func GetSendError() bool
- func GetServerUserName() string
- func GetServerUserPassword() string
- func GetServer_dir() string
- func GetTencentAudit() bool
- func GetTencentBucketURL() string
- func GetTencentCosSecretid() string
- func GetTencentSecretKey() string
- func GetTransferUrl() bool
- func GetTwoWayEcho() bool
- func GetUnlockPrefix() string
- func GetUrlPicTransfer() bool
- func GetUrlToQrimage() bool
- func GetVisibleIP() bool
- func GetWhiteBypass() []int64
- func GetWhiteBypassRevers() bool
- func GetWhiteEnable(index int) bool
- func GetWhitePrefixMode() bool
- func GetWhitePrefixs() []string
- func GetWsAddress() []string
- func GetWsServerPath() string
- func GetWsServerToken() string
- func GetWsToken() []string
- func UpdateConfig(conf *Config, path string) error
- func WriteYAMLToFile(yamlContent string) error
- type Config
- type Settings
- type VisualPrefixConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var (
BotID string
)
Functions ¶
func ComposeWebUIURL ¶
ComposeWebUIURL 组合webui的完整访问地址 参数 useBackupPort 控制是否使用备用端口
func ComposeWebUIURLv2 ¶
ComposeWebUIURLv2 组合webui的完整访问地址 参数 useBackupPort 控制是否使用备用端口
func GetAliyunAccessKeyId ¶
func GetAliyunAccessKeyId() string
GetAliyunAccessKeyId 获取阿里云OSS的AccessKeyId
func GetAliyunAccessKeySecret ¶
func GetAliyunAccessKeySecret() string
GetAliyunAccessKeySecret 获取阿里云OSS的AccessKeySecret
func GetAliyunBucketName ¶
func GetAliyunBucketName() string
GetAliyunBucketName 获取阿里云OSS的AliyunBucketName
func GetBackupPort ¶
func GetBackupPort() string
GetLotusPort retrieves the LotusPort setting from your singleton instance.
func GetGlobalChannelToGroup ¶
func GetGlobalChannelToGroup() bool
func GetIgnoreBotMessage ¶
func GetIgnoreBotMessage() bool
func GetOb11Int32 ¶
func GetOb11Int32() bool
func GetRemovePrefixValue ¶
func GetRemovePrefixValue() bool
GetRemovePrefixValue 函数用于获取 remove_prefix 的配置值
func GetTencentBucketURL ¶
func GetTencentBucketURL() string
GetTencentBucketURL 获取 TencentBucketURL
func GetTencentCosSecretid ¶
func GetTencentCosSecretid() string
GetTencentCosSecretid 获取 TencentCosSecretid
func GetTencentSecretKey ¶
func GetTencentSecretKey() string
GetTencentSecretKey 获取 TencentSecretKey
func WriteYAMLToFile ¶
WriteYAMLToFile 将YAML格式的字符串写入到指定的文件路径
Types ¶
type Settings ¶
type Settings struct { WsAddress []string `yaml:"ws_address"` AppID uint64 `yaml:"app_id"` Token string `yaml:"token"` ClientSecret string `yaml:"client_secret"` TextIntent []string `yaml:"text_intent"` GlobalChannelToGroup bool `yaml:"global_channel_to_group"` GlobalPrivateToChannel bool `yaml:"global_private_to_channel"` Array bool `yaml:"array"` Server_dir string `yaml:"server_dir"` Lotus bool `yaml:"lotus"` Port string `yaml:"port"` RestartTime int `yaml:"restart_time"` WsToken []string `yaml:"ws_token,omitempty"` // 连接wss时使用,不是wss可留空 一一对应 MasterID []string `yaml:"master_id,omitempty"` // 如果需要在群权限判断是管理员是,将user_id填入这里,master_id是一个文本数组 EnableWsServer bool `yaml:"enable_ws_server,omitempty"` //正向ws开关 WsServerToken string `yaml:"ws_server_token,omitempty"` //正向ws token IdentifyFile bool `yaml:"identify_file"` // 域名校验文件 Crt string `yaml:"crt"` Key string `yaml:"key"` DeveloperLog bool `yaml:"developer_log"` Username string `yaml:"server_user_name"` Password string `yaml:"server_user_password"` ImageLimit int `yaml:"image_sizelimit"` RemovePrefix bool `yaml:"remove_prefix"` BackupPort string `yaml:"backup_port"` DevlopAcDir string `yaml:"develop_access_token_dir"` RemoveAt bool `yaml:"remove_at"` DevBotid string `yaml:"develop_bot_id"` SandBoxMode bool `yaml:"sandbox_mode"` Title string `yaml:"title"` HashID bool `yaml:"hash_id"` TwoWayEcho bool `yaml:"twoway_echo"` LazyMessageId bool `yaml:"lazy_message_id"` WhitePrefixMode bool `yaml:"white_prefix_mode"` WhitePrefixs []string `yaml:"white_prefixs"` BlackPrefixMode bool `yaml:"black_prefix_mode"` BlackPrefixs []string `yaml:"black_prefixs"` VisualPrefixs []VisualPrefixConfig `yaml:"visual_prefixs"` VisibleIp bool `yaml:"visible_ip"` ForwardMsgLimit int `yaml:"forward_msg_limit"` DevMessgeID bool `yaml:"dev_message_id"` LogLevel int `yaml:"log_level"` SaveLogs bool `yaml:"save_logs"` BindPrefix string `yaml:"bind_prefix"` MePrefix string `yaml:"me_prefix"` RemoveBotAtGroup bool `yaml:"remove_bot_at_group"` ImageLimitB int `yaml:"image_limit"` RecordSampleRate int `yaml:"record_sampleRate"` RecordBitRate int `yaml:"record_bitRate"` NoWhiteResponse string `yaml:"No_White_Response"` SendError bool `yaml:"send_error"` AddAtGroup bool `yaml:"add_at_group"` UrlPicTransfer bool `yaml:"url_pic_transfer"` LotusPassword string `yaml:"lotus_password"` WsServerPath string `yaml:"ws_server_path"` IdmapPro bool `yaml:"idmap_pro"` CardAndNick string `yaml:"card_nick"` AutoBind bool `yaml:"auto_bind"` CustomBotName string `yaml:"custom_bot_name"` SendDelay int `yaml:"send_delay"` AtoPCount int `yaml:"AMsgRetryAsPMsg_Count"` ReconnecTimes int `yaml:"reconnect_times"` HeartBeatInterval int `yaml:"heart_beat_interval"` LaunchReconectTimes int `yaml:"launch_reconnect_times"` UnlockPrefix string `yaml:"unlock_prefix"` WhiteBypass []int64 `yaml:"white_bypass"` TransferUrl bool `yaml:"transfer_url"` HttpAddress string `yaml:"http_address"` HttpVersion int `yaml:"http_version"` HttpTimeOut int `yaml:"http_timeout"` PostUrl []string `yaml:"post_url"` PostSecret []string `yaml:"post_secret"` PostMaxRetries []int `yaml:"post_max_retries"` PostRetriesInterval []int `yaml:"post_retries_interval"` NativeOb11 bool `yaml:"native_ob11"` RamDomSeq bool `yaml:"ramdom_seq"` UrlToQrimage bool `yaml:"url_to_qrimage"` QrSize int `yaml:"qr_size"` WhiteBypassRevers bool `yaml:"white_bypass_reverse"` GuildUrlImageToBase64 bool `yaml:"guild_url_image_to_base64"` TencentBucketName string `yaml:"t_COS_BUCKETNAME"` TencentBucketRegion string `yaml:"t_COS_REGION"` TencentCosSecretid string `yaml:"t_COS_SECRETID"` TencentSecretKey string `yaml:"t_COS_SECRETKEY"` TencentAudit bool `yaml:"t_audit"` OssType int `yaml:"oss_type"` BaiduBOSBucketName string `yaml:"b_BOS_BUCKETNAME"` BaiduBCEAK string `yaml:"b_BCE_AK"` BaiduBCESK string `yaml:"b_BCE_SK"` BaiduAudit int `yaml:"b_audit"` AliyunEndpoint string `yaml:"a_OSS_EndPoint"` AliyunAccessKeyId string `yaml:"a_OSS_AccessKeyId"` AliyunAccessKeySecret string `yaml:"a_OSS_AccessKeySecret"` AliyunBucketName string `yaml:"a_OSS_BucketName"` AliyunAudit bool `yaml:"a_audit"` Alias []string `yaml:"alias"` SelfIntroduce []string `yaml:"self_introduce"` WhiteEnable []bool `yaml:"white_enable"` KaiheilaApi string `yaml:"kaiheila_api"` Ob11Int32 bool `yaml:"ob11_int32"` IgnoreBotMessage bool `yaml:"ignore_bot_message"` }
type VisualPrefixConfig ¶
type VisualPrefixConfig struct { Prefix string `yaml:"prefix"` WhiteList []string `yaml:"whiteList"` NoWhiteResponse string `yaml:"No_White_Response"` }
func GetVisualkPrefixs ¶
func GetVisualkPrefixs() []VisualPrefixConfig
修改 GetVisualkPrefixs 函数以返回新类型
Click to show internal directories.
Click to hide internal directories.