Documentation ¶
Index ¶
- Constants
- Variables
- func CheckRequest(ts, sg string) bool
- func CheckRequestWithCredentials(ts, sg string) (clientId string, pass bool)
- func FirstCheck(rmsg *dingbot.ReceiveMsg) bool
- func GetBalance() (string, error)
- func GetReadTime(t time.Time) string
- func InitAiCli() *resty.Client
- func InitSvc()
- func JudgeAdminUsers(s string) bool
- func JudgeGroup(s string) bool
- func JudgeOutgoingGroup(s string) bool
- func JudgeSensitiveWord(s string) bool
- func JudgeUsers(s string) bool
- func JudgeVipUsers(s string) bool
- func SolveSensitiveWord(s string) string
- func WriteToFile(path string, data []byte) error
- type Bill
- type DailyCost
- type LineItem
- type Plan
- type Subscription
Constants ¶
View Source
const DingTalkClientIdKeyName = "DingTalkClientId"
Variables ¶
View Source
var Config *config.Configuration
View Source
var DingTalkClientManager dingbot.DingTalkClientManagerInterface
View Source
var Prompt *[]config.Prompt
View Source
var UserService cache.UserServiceInterface
Functions ¶
func CheckRequest ¶ added in v1.0.4
func CheckRequestWithCredentials ¶ added in v1.0.20
func FirstCheck ¶ added in v0.1.3
func FirstCheck(rmsg *dingbot.ReceiveMsg) bool
func GetReadTime ¶ added in v1.0.10
func JudgeAdminUsers ¶ added in v1.0.7
JudgeAdminUsers 判断用户是否为系统管理员
func JudgeOutgoingGroup ¶ added in v1.0.15
JudgeOutgoingGroup 判断群ID是否在为outgoing白名单
func JudgeSensitiveWord ¶ added in v1.0.17
JudgeSensitiveWord 判断内容是否包含敏感词
func SolveSensitiveWord ¶ added in v1.0.17
SolveSensitiveWord 将敏感词用 🚫 占位
func WriteToFile ¶ added in v1.0.7
将内容写入到文件,如果文件名带路径,则会判断路径是否存在,不存在则创建
Types ¶
type Subscription ¶ added in v1.0.13
type Subscription struct { Object string `json:"object"` HasPaymentMethod bool `json:"has_payment_method"` Canceled bool `json:"canceled"` CanceledAt interface{} `json:"canceled_at"` Delinquent interface{} `json:"delinquent"` AccessUntil int64 `json:"access_until"` SoftLimit int64 `json:"soft_limit"` HardLimit int64 `json:"hard_limit"` SystemHardLimit int64 `json:"system_hard_limit"` SoftLimitUsd float64 `json:"soft_limit_usd"` HardLimitUsd float64 `json:"hard_limit_usd"` SystemHardLimitUsd float64 `json:"system_hard_limit_usd"` Plan Plan `json:"plan"` AccountName string `json:"account_name"` PoNumber interface{} `json:"po_number"` BillingEmail interface{} `json:"billing_email"` TaxIDS interface{} `json:"tax_ids"` BillingAddress interface{} `json:"billing_address"` BusinessAddress interface{} `json:"business_address"` }
func GetSub ¶ added in v1.0.13
func GetSub() (Subscription, error)
Click to show internal directories.
Click to hide internal directories.