lark

package
v1.26.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModeWebhook   = "webhook"
	ModeWebsocket = "websocket"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Admin             string
	AppID             string `koanf:"app_id"`
	AppSecret         string `koanf:"app_secret"`
	VerificationToken string `koanf:"verification_token"`
	Mode              string
	EncryptKey        string `koanf:"encrypt_key"`
	TLSEnabled        bool   `koanf:"tls_enabled"`
	ProxyURL          string `koanf:"proxy_url"`
	ProxyInsecure     bool   `koanf:"proxy_insecure"`
}

func (Config) Validate

func (c Config) Validate() valid.Problems

type Lark

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

func New

func New(
	cfg *Config,
	log *slog.Logger,
	tel telemetry.Telemetry,
	tlsConfig *tls.Config,
	svc service.ServerService,
	domain string,
) (*Lark, error)

func (*Lark) Name

func (lrk *Lark) Name() string

func (*Lark) Notify

func (lrk *Lark) Notify(ctx context.Context, n *modules.Notification) error

func (*Lark) NotifyBatch added in v1.26.0

func (lrk *Lark) NotifyBatch(ctx context.Context, ns []*modules.Notification) error

func (*Lark) RateLimit added in v1.26.0

func (lrk *Lark) RateLimit() (rate.Limit, int)

RateLimit follows https://open.larksuite.com/document/server-docs/im-v1/message/create: 1000 per minute and 50 per second per app.

func (*Lark) Start

func (lrk *Lark) Start() error

Directories

Path Synopsis
card
v2

Jump to

Keyboard shortcuts

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