sender

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DingSign

func DingSign(t int64, secret string) string

DingSign 钉钉签名

Types

type Ding

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

Ding 钉钉消息发送

func NewDing

func NewDing(url string) (*Ding, error)

NewDing 创建钉钉消息发送

func (*Ding) Inject

func (d *Ding) Inject(data rabbit.Rule) (rabbit.Sender, error)

func (*Ding) Name

func (d *Ding) Name() string

Name 获取名称

func (*Ding) Send

func (d *Ding) Send(ctx context.Context, content []byte) error

Send 发送消息

type DingConfig

type DingConfig struct {
	Token     string `json:"token" yaml:"token"`
	Secret    string `json:"secret" yaml:"secret"`
	Sign      string `json:"sign" yaml:"sign"`
	Timestamp int64  `json:"timestamp" yaml:"timestamp"`
}

type DingConfigProvider

type DingConfigProvider struct {
}

DingConfigProvider 钉钉配置提供者

func (*DingConfigProvider) Provider

func (d *DingConfigProvider) Provider(in []byte, out any) error

Provider 配置提供者

type JsonProvider

type JsonProvider struct {
}

JsonProvider json

func (*JsonProvider) Provider

func (d *JsonProvider) Provider(in []byte, out any) error

Provider provider json

type YamlProvider

type YamlProvider struct {
}

YamlProvider yaml

func (*YamlProvider) Provider

func (d *YamlProvider) Provider(in []byte, out any) error

Provider provider yaml

Jump to

Keyboard shortcuts

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