Documentation ¶
Overview ¶
Package larkhertz is Hertz middleware for go-lark
Index ¶
- Constants
- type LarkMiddleware
- func (opt *LarkMiddleware) BindURLPrefix(prefix string) *LarkMiddleware
- func (opt LarkMiddleware) GetCardCallback(c *app.RequestContext) (*lark.EventCardCallback, bool)
- func (opt *LarkMiddleware) GetEvent(c *app.RequestContext) (*lark.EventV2, bool)
- func (opt *LarkMiddleware) GetMessage(c *app.RequestContext) (msg *lark.EventMessage, ok bool)
- func (opt LarkMiddleware) LarkCardHandler() app.HandlerFunc
- func (opt *LarkMiddleware) LarkChallengeHandler() app.HandlerFunc
- func (opt *LarkMiddleware) LarkEventHandler() app.HandlerFunc
- func (opt *LarkMiddleware) LarkMessageHandler() app.HandlerFunc
- func (opt *LarkMiddleware) SetCardKey(key string) *LarkMiddleware
- func (opt *LarkMiddleware) SetMessageKey(key string) *LarkMiddleware
- func (opt *LarkMiddleware) WithEncryption(key string) *LarkMiddleware
- func (opt *LarkMiddleware) WithTokenVerification(token string) *LarkMiddleware
Constants ¶
View Source
const DefaultLarkMessageKey = "go-lark-message"
DefaultLarkMessageKey compat legacy versions not use in this repo right now
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LarkMiddleware ¶
type LarkMiddleware struct {
// contains filtered or unexported fields
}
LarkMiddleware .
func (*LarkMiddleware) BindURLPrefix ¶
func (opt *LarkMiddleware) BindURLPrefix(prefix string) *LarkMiddleware
BindURLPrefix .
func (LarkMiddleware) GetCardCallback ¶ added in v1.1.0
func (opt LarkMiddleware) GetCardCallback(c *app.RequestContext) (*lark.EventCardCallback, bool)
GetCardCallback from gin context
func (*LarkMiddleware) GetEvent ¶
func (opt *LarkMiddleware) GetEvent(c *app.RequestContext) (*lark.EventV2, bool)
GetEvent should call GetEvent if you're using EventV2
func (*LarkMiddleware) GetMessage ¶
func (opt *LarkMiddleware) GetMessage(c *app.RequestContext) (msg *lark.EventMessage, ok bool)
GetMessage from hertz context
func (LarkMiddleware) LarkCardHandler ¶ added in v1.1.0
func (opt LarkMiddleware) LarkCardHandler() app.HandlerFunc
LarkCardHandler card callback handler Encryption is automatically ignored, because it's not supported officially
func (*LarkMiddleware) LarkChallengeHandler ¶
func (opt *LarkMiddleware) LarkChallengeHandler() app.HandlerFunc
LarkChallengeHandler Lark challenge handler
func (*LarkMiddleware) LarkEventHandler ¶
func (opt *LarkMiddleware) LarkEventHandler() app.HandlerFunc
LarkEventHandler handle lark event v2
func (*LarkMiddleware) LarkMessageHandler ¶
func (opt *LarkMiddleware) LarkMessageHandler() app.HandlerFunc
LarkMessageHandler Lark message handler
func (*LarkMiddleware) SetCardKey ¶ added in v1.1.0
func (opt *LarkMiddleware) SetCardKey(key string) *LarkMiddleware
SetCardKey .
func (*LarkMiddleware) SetMessageKey ¶
func (opt *LarkMiddleware) SetMessageKey(key string) *LarkMiddleware
SetMessageKey .
func (*LarkMiddleware) WithEncryption ¶
func (opt *LarkMiddleware) WithEncryption(key string) *LarkMiddleware
WithEncryption .
func (*LarkMiddleware) WithTokenVerification ¶
func (opt *LarkMiddleware) WithTokenVerification(token string) *LarkMiddleware
WithTokenVerification .
Click to show internal directories.
Click to hide internal directories.