Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CardMessager ¶
type CardMessager struct { CardActionHandlers *syncx.Map[string, interface{}] EncryptKey *atomic.String VerificationToken *atomic.String // contains filtered or unexported fields }
func NewCardMessager ¶
func NewCardMessager(client *lark.Client, options ...CardOption) *CardMessager
func (*CardMessager) Handler ¶
func (c *CardMessager) Handler() func(ctx context.Context, action *larkcard.CardAction) (interface{}, error)
func (*CardMessager) RegisterCardActionHandler ¶
func (c *CardMessager) RegisterCardActionHandler(key string, handler interface{}) CardMessagerInterface
func (*CardMessager) RegisterRoute ¶
func (c *CardMessager) RegisterRoute(path string, g *gin.RouterGroup)
type CardMessagerInterface ¶
type CardMessagerInterface interface { RegisterCardActionHandler(key string, handler interface{}) CardMessagerInterface RegisterRoute(path string, g *gin.RouterGroup) }
type CardOption ¶
type CardOption func(u *CardMessager)
func WithEncryptKey ¶
func WithEncryptKey(encryptKey string) CardOption
func WithVerificationToken ¶
func WithVerificationToken(verificationToken string) CardOption
Click to show internal directories.
Click to hide internal directories.