Documentation
¶
Index ¶
- func ComposeWebUIURL(useBackupPort bool) string
- func ComposeWebUIURLv2(useBackupPort bool) string
- func DeleteConfig() error
- func ExtractAndTruncateDigits(input string) string
- func GetAlias() []string
- func GetAliyunAccessKeyId() string
- func GetAliyunAccessKeySecret() string
- func GetAliyunAudit() bool
- func GetAliyunBucketName() string
- func GetAliyunEndpoint() string
- func GetArrayValue() 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 GetBotID() string
- func GetBotToken() string
- func GetCardAndNick() string
- func GetCrtPath() string
- func GetCustomBotName() string
- func GetCustomCert() bool
- func GetCustomTemplateID() string
- func GetDefaultContent() []string
- func GetDefaultDailyReplyLimit() int
- func GetDeveloperLog() bool
- func GetEnableWsServer() bool
- func GetEnters() []string
- func GetForwardMsgLimit() int
- func GetGlobalGroupOrPrivate() bool
- func GetHashIDValue() bool
- func GetHeartBeatInterval() int
- func GetHighWay() bool
- func GetHttpAddress() string
- func GetHttpGetMsg() bool
- func GetHttpTimeOut() int
- func GetHttpVersion() int
- func GetIdentifyAppids() []int64
- func GetIdentifyFile() bool
- func GetIdmapPro() bool
- func GetImageLimit() int
- func GetImageLimitB() int
- func GetKeyBoardID() string
- func GetKeyPath() string
- func GetLaunchReconectTimes() int
- func GetLinkBots() []string
- func GetLinkPic() string
- func GetLinkPrefix() string
- func GetLinkText() string
- func GetLogLevel() int
- func GetLongQueryCommands() []string
- func GetLotusPassword() string
- func GetLotusValue() bool
- func GetMasterID() []string
- func GetMePrefix() string
- func GetMsgTimeOut() int
- func GetNativeOb11() bool
- func GetNgrokKey() string
- func GetNoWhiteResponse() string
- 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() string
- func GetRegionID() string
- func GetRemovePrefixValue() bool
- func GetSaveLogs() bool
- func GetSelfIntroduce() []string
- func GetSendDelay() int
- func GetSendDirectResponse() bool
- func GetSendError() bool
- func GetServerUserName() string
- func GetServerUserPassword() string
- func GetServer_dir() string
- func GetSubscribeMsgType() int
- func GetSubscribeMsgs() []string
- func GetTencentAudit() bool
- func GetTencentBucketURL() string
- func GetTencentCosSecretid() string
- func GetTencentSecretKey() string
- func GetTimeOut() int
- func GetTransFormApiIds() bool
- func GetTransferUrl() bool
- func GetTwoWayEcho() bool
- func GetUinStr() string
- func GetUrlToQrimage() bool
- func GetUseNgrok() bool
- func GetVisibleIP() bool
- func GetVwhitePrefixMode() bool
- func GetWhiteBypass() []int64
- func GetWhiteBypassRevers() bool
- func GetWhitePrefixMode() bool
- func GetWhitePrefixs() []string
- func GetWsAddress() []string
- func GetWsServerPath() string
- func GetWsServerToken() string
- func GetWsToken() []string
- func SetBotID(id 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 ¶
This section is empty.
Functions ¶
func ComposeWebUIURL ¶
ComposeWebUIURL 组合webui的完整访问地址 参数 useBackupPort 控制是否使用备用端口
func ComposeWebUIURLv2 ¶
ComposeWebUIURLv2 组合webui的完整访问地址 参数 useBackupPort 控制是否使用备用端口
func ExtractAndTruncateDigits ¶
extractAndTruncateDigits 提取字符串中的数字并截取前10位(如果有的话)
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 GetDefaultDailyReplyLimit ¶
func GetDefaultDailyReplyLimit() int
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"` BotToken string `yaml:"botToken"` WebHookPath string `yaml:"webHookPath"` TimeOut int `yaml:"timeOut"` GlobalGroupOrPrivate bool `yaml:"global_group_or_private"` Array bool `yaml:"array"` Server_dir string `yaml:"server_dir"` Lotus bool `yaml:"lotus"` Port string `yaml:"port"` 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"` Title string `yaml:"title"` HashID bool `yaml:"hash_id"` TwoWayEcho bool `yaml:"twoway_echo"` 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"` LogLevel int `yaml:"log_level"` SaveLogs bool `yaml:"save_logs"` BindPrefix string `yaml:"bind_prefix"` MePrefix string `yaml:"me_prefix"` ImageLimitB int `yaml:"image_limit"` RecordBitRate string `yaml:"record_bitRate"` NoWhiteResponse string `yaml:"No_White_Response"` SendError bool `yaml:"send_error"` LotusPassword string `yaml:"lotus_password"` WsServerPath string `yaml:"ws_server_path"` IdmapPro bool `yaml:"idmap_pro"` CardAndNick string `yaml:"card_nick"` CustomBotName string `yaml:"custom_bot_name"` SendDelay int `yaml:"send_delay"` ReconnecTimes int `yaml:"reconnect_times"` HeartBeatInterval int `yaml:"heart_beat_interval"` LaunchReconectTimes int `yaml:"launch_reconnect_times"` 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"` 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"` IdentifyAppids []int64 `yaml:"identify_appids"` TransFormApiIds bool `yaml:"transform_api_ids"` CustomTemplateID string `yaml:"custom_template_id"` KeyBoardID string `yaml:"keyboard_id"` Uin int64 `yaml:"uin"` VwhitePrefixMode bool `yaml:"v_white_prefix_mode"` Enters []string `yaml:"enters"` LinkPrefix string `yaml:"link_prefix"` LinkBots []string `yaml:"link_bots"` LinkText string `yaml:"link_text"` LinkPic string `yaml:"link_pic"` DefaultContent []string `yaml:"default_content"` DefaultDailyReplyLimit int `yaml:"default_daily_reply_limit"` LongQueryCommands []string `yaml:"long_query_commands"` SubScribeMsgType int `yaml:"subscribe_msg_type"` SubscribeMsgs []string `yaml:"subscribe_msgs"` CustomCert bool `yaml:"customcert"` UseNgrok bool `yaml:"useNgrok"` HttpGetMsg bool `yaml:"httpGetMsg"` GetMsgTimeOut int `yaml:"getMsgTimeOut"` NgrokKey string `yaml:"ngrokKey"` HighWay bool `yaml:"highway"` SendDirectResponse bool `yaml:"sendDirectResponse"` }
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.