qqbot

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: Apache-2.0, MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() im.AdapterFactory

Types

type Adapter

type Adapter struct {
	// contains filtered or unexported fields
}

func NewAdapter

func NewAdapter(client *Client) *Adapter

func (*Adapter) HandleURLVerification

func (a *Adapter) HandleURLVerification(c *gin.Context) bool

func (*Adapter) ParseCallback

func (a *Adapter) ParseCallback(c *gin.Context) (*im.IncomingMessage, error)

func (*Adapter) Platform

func (a *Adapter) Platform() im.Platform

func (*Adapter) SendReply

func (a *Adapter) SendReply(ctx context.Context, incoming *im.IncomingMessage, reply *im.ReplyMessage) error

func (*Adapter) VerifyCallback

func (a *Adapter) VerifyCallback(c *gin.Context) error

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(appID, clientSecret, apiBaseURL, gatewayURL string) (*Client, error)

func (*Client) AccessToken

func (c *Client) AccessToken(ctx context.Context) (string, error)

func (*Client) GatewayURL

func (c *Client) GatewayURL(ctx context.Context) (string, error)

func (*Client) SendC2CMessage

func (c *Client) SendC2CMessage(ctx context.Context, openID, content, msgID string) error

func (*Client) SendGroupMessage

func (c *Client) SendGroupMessage(ctx context.Context, groupOpenID, content, msgID string) error

type LongConnClient

type LongConnClient struct {
	// contains filtered or unexported fields
}

func NewLongConnClient

func NewLongConnClient(client *Client, handler MessageHandler) *LongConnClient

func (*LongConnClient) Start

func (c *LongConnClient) Start(ctx context.Context) error

func (*LongConnClient) Stop

func (c *LongConnClient) Stop()

type MessageHandler

type MessageHandler func(ctx context.Context, msg *im.IncomingMessage) error

Jump to

Keyboard shortcuts

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