push

package
v1.0.38 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: AGPL-3.0 Imports: 22 Imported by: 1

Documentation

Index

Constants

View Source
const (
	StartStudy = "start_study"

	SCORE = "score"
)

Variables

This section is empty.

Functions

func GetPush

func GetPush(config conf.Config) func(id string, kind string, message string)

func HandleWechat added in v1.0.33

func HandleWechat(rep http.ResponseWriter, req *http.Request)

HandleWechat

@Description:处理wechat的请求接口
* @param rep
* @param req

func InitPushDeer added in v1.0.33

func InitPushDeer() func(id, kind, message string)

func MarkDown

func MarkDown(title, text string, ats ...string) map[string]interface{}

func RegisterHandler added in v1.0.33

func RegisterHandler(key string, action WechatHandler)

func Text

func Text(text string, ats ...string) map[string]interface{}

func TgInit added in v1.0.33

func TgInit()

Types

type Ding

type Ding struct {
	Secret string `json:"Secret"`
	Token  string `json:"token"`
}

func (*Ding) Send

func (d *Ding) Send() func(id string, kind string, message string)

type Handle added in v1.0.33

type Handle interface {
	// contains filtered or unexported methods
}

type Mather added in v1.0.33

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

type PushPlus

type PushPlus struct {
	Token string
}

func (*PushPlus) Init

func (p *PushPlus) Init() func(id string, kind, message string)

type Telegram added in v1.0.33

type Telegram struct {
	Token  string
	ChatId int64

	Proxy string
	// contains filtered or unexported fields
}

Telegram @Description:

func (*Telegram) Init added in v1.0.33

func (t *Telegram) Init()

Init *

  • @Description:
  • @receiver t
  • @return func(kind string, message string)

func (*Telegram) SendMsg added in v1.0.33

func (t *Telegram) SendMsg(id int64, message string) int

func (*Telegram) SendPhoto added in v1.0.33

func (t *Telegram) SendPhoto(id int64, image []byte)

type TypeSecret

type TypeSecret struct {
	Webhook string
	Secret  string
}

func (*TypeSecret) SendMessage

func (t *TypeSecret) SendMessage(data map[string]interface{}) error

SendMessage Function to send message

type WechatHandler added in v1.0.33

type WechatHandler func(id string, msg string)

Jump to

Keyboard shortcuts

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