card

package
v0.0.0-...-ea7d51e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2024 License: MIT Imports: 9 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL