Documentation ¶
Index ¶
- func CheckInvitation(hcontext *HanldeContext, score *score.MemberScore) (bool, error)
- func CheckOnceDay(hcontext *HanldeContext, score *score.MemberScore) (time.Time, bool)
- func CheckOnceDayWithKey(hcontext *HanldeContext, score *score.MemberScore, key string) (time.Time, bool)
- func GetFileMessageFromCache(id string) *model.FileMessage
- func NewDodoClient(options *DodoOptions) (client.Client, error)
- func ParseFileMessage(context *HanldeContext, message *websocket.ChannelMessageEventBody) *model.FileMessage
- func ParseTextMessage(context *HanldeContext, message *websocket.ChannelMessageEventBody) string
- func ServerAndFileMessageEquals(context *HanldeContext, message *websocket.ChannelMessageEventBody, ...) bool
- func ServerAndTxtMessageEquals(context *HanldeContext, message *websocket.ChannelMessageEventBody, ...) bool
- func SetFileMessageCache(id string, v *model.FileMessage)
- func TxtMessageEquals(context *HanldeContext, message *websocket.ChannelMessageEventBody, str string) bool
- func TxtMessageEqualsFunc(context *HanldeContext, message *websocket.ChannelMessageEventBody, ...) bool
- type ChannelMessageFunc
- type ChannelMessageHandler
- type ChannelMessageHandlerFunc
- type DodoOptions
- type DodoRobot
- type HanldeContext
- type OptionHandlerBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckInvitation ¶
func CheckInvitation(hcontext *HanldeContext, score *score.MemberScore) (bool, error)
检查邀请人数是否增加,赋予对应积分
func CheckOnceDay ¶
func CheckOnceDay(hcontext *HanldeContext, score *score.MemberScore) (time.Time, bool)
func CheckOnceDayWithKey ¶
func CheckOnceDayWithKey(hcontext *HanldeContext, score *score.MemberScore, key string) (time.Time, bool)
func GetFileMessageFromCache ¶
func GetFileMessageFromCache(id string) *model.FileMessage
func NewDodoClient ¶
func NewDodoClient(options *DodoOptions) (client.Client, error)
func ParseFileMessage ¶
func ParseFileMessage(context *HanldeContext, message *websocket.ChannelMessageEventBody) *model.FileMessage
func ParseTextMessage ¶
func ParseTextMessage(context *HanldeContext, message *websocket.ChannelMessageEventBody) string
func ServerAndFileMessageEquals ¶
func ServerAndFileMessageEquals(context *HanldeContext, message *websocket.ChannelMessageEventBody, groupId string) bool
func ServerAndTxtMessageEquals ¶
func ServerAndTxtMessageEquals(context *HanldeContext, message *websocket.ChannelMessageEventBody, groupId string, str string) bool
func SetFileMessageCache ¶
func SetFileMessageCache(id string, v *model.FileMessage)
func TxtMessageEquals ¶
func TxtMessageEquals(context *HanldeContext, message *websocket.ChannelMessageEventBody, str string) bool
func TxtMessageEqualsFunc ¶
func TxtMessageEqualsFunc(context *HanldeContext, message *websocket.ChannelMessageEventBody, predicate func(str string) bool) bool
Types ¶
type ChannelMessageFunc ¶
type ChannelMessageFunc = func(context *HanldeContext, message *websocket.ChannelMessageEventBody) error
type ChannelMessageHandler ¶
type ChannelMessageHandler interface {
Handle(context *HanldeContext, message *websocket.ChannelMessageEventBody) error
}
type ChannelMessageHandlerFunc ¶
type ChannelMessageHandlerFunc struct {
// contains filtered or unexported fields
}
func (ChannelMessageHandlerFunc) Handle ¶
func (h ChannelMessageHandlerFunc) Handle(context *HanldeContext, message *websocket.ChannelMessageEventBody) error
type DodoOptions ¶
type DodoRobot ¶
type DodoRobot struct {
// contains filtered or unexported fields
}
func NewDodoRobot ¶
func NewDodoRobot(options *DodoOptions, client client.Client) (DodoRobot, error)
type HanldeContext ¶
func NewHandleContext ¶
func NewHandleContext(client client.Client) HanldeContext
type OptionHandlerBuilder ¶
type OptionHandlerBuilder struct { }
func NewMessageHandlersBuilder ¶
func NewMessageHandlersBuilder() *OptionHandlerBuilder
func (*OptionHandlerBuilder) Build ¶
func (builder *OptionHandlerBuilder) Build(client client.Client) websocket.OptionHandler
Click to show internal directories.
Click to hide internal directories.