Documentation
¶
Index ¶
- func CallerPackageName(skipPkgName string) string
- func CheckDetailType(tp string) zero.Rule
- func DirExists(path string) bool
- func FileExists(path string) bool
- func FormSetByStrings(slices ...[]string) map[string]struct{}
- func GetArgs(ctx *zero.Ctx) string
- func GetBotConfig() zero.Config
- func GetBotCtx() *zero.Ctx
- func GetBotNickname() string
- func GetPkgNameByFunc(fn interface{}) string
- func GetQQAvatar(qq int64, size int) (io.Reader, error)
- func GetQQGroupAvatar(id int64, size int) (io.Reader, error)
- func GoAndWait(handlers ...func() error) (err error)
- func IsMessagePrimary(ctx *zero.Ctx) bool
- func IsSameFunc(fnL, fnR interface{}) bool
- func IsSuperUser(userID int64) bool
- func MakeDir(path string) (string, error)
- func MakeDirWithMode(path string, perm os.FileMode) (string, error)
- func MergeStringSlices(slices ...[]string) (res []string)
- func NewGormLogger() *loggerGorm
- func PathExists(path string) bool
- func PathJoin(paths ...string) string
- func PathSize(path string) uint64
- func RemovePath(path string) error
- func SendToSuper(message ...message.MessageSegment)
- type LoggerCron
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallerPackageName ¶
func CheckDetailType ¶
CheckDetailType 检查事件DetailType(MessageType/NoticeType/RequestType)
func FormSetByStrings ¶
FormSetByStrings 将字符串切片形成Set
func GetPkgNameByFunc ¶
func GetPkgNameByFunc(fn interface{}) string
func GetQQGroupAvatar ¶
GetQQGroupAvatar 快捷获取QQ群头像
func IsSameFunc ¶
func IsSameFunc(fnL, fnR interface{}) bool
func MakeDirWithMode ¶
MakeDirWithMode 依据文件夹权限创建文件夹并返回文件夹绝对路径
func MergeStringSlices ¶
MergeStringSlices 合并多个字符串切片并去重、去除空字符串
func NewGormLogger ¶
func NewGormLogger() *loggerGorm
func RemovePath ¶
func SendToSuper ¶
func SendToSuper(message ...message.MessageSegment)
SendToSuper 将消息发送给所有后端的所有超级用户
Types ¶
type LoggerCron ¶
type LoggerCron struct{}
func NewCronLogger ¶
func NewCronLogger() *LoggerCron
func (*LoggerCron) Error ¶
func (l *LoggerCron) Error(err error, msg string, keysAndValues ...interface{})
func (*LoggerCron) Info ¶
func (l *LoggerCron) Info(msg string, keysAndValues ...interface{})
Click to show internal directories.
Click to hide internal directories.