gopush

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentParams

type ContentParams struct {
	Tag  string `json:"tag"`
	Text string `json:"text"`
	Href string `json:"href"`
}

type ContentPost

type ContentPost struct {
	Post Post `json:"post"`
}

type FeishPush

type FeishPush struct {
	Token   string
	Message PostMessage
}

func (*FeishPush) Send

func (f *FeishPush) Send() error

Send Feishu message

type MailContent

type MailContent struct {
	PushHead PushMail
	Tomail   []string
	Title    string
	Text     []byte
}

func (*MailContent) Send

func (m *MailContent) Send() error

Send email message

type Post

type Post struct {
	ZhCn ZhCn `json:"zh_cn"`
}

type PostMessage

type PostMessage struct {
	Timestamp string      `json:"timestamp"`
	Sign      string      `json:"sign"`
	MsgType   string      `json:"msg_type"`
	Content   ContentPost `json:"content"`
}

type PushDeerPush

type PushDeerPush struct {
	Message struct {
		PushKey string `json:"pushkey"`
		Text    string `json:"text"`
		Desp    string `json:"desp"`
		Type    string `json:"type"`
	}
}

func (*PushDeerPush) Send

func (p *PushDeerPush) Send() error

type PushMail

type PushMail struct {
	Addr  string
	Port  string
	Mail  string
	Token string
}

func (*PushMail) SetContent

func (p *PushMail) SetContent(tomail []string, title string, text []byte) *MailContent

SetContent Set a set of sending parameters, MailContent carries the basic information of the mail.

type PushMessage

type PushMessage interface {
	Send() error
}

type ServerChanMessage

type ServerChanMessage struct {
	Title string `json:"title"`
	Desp  string `json:"desp"`
	Short string `json:"short"`
}

type ServerChanPush

type ServerChanPush struct {
	Key     string
	Message ServerChanMessage
}

func (*ServerChanPush) Send

func (s *ServerChanPush) Send() error

type ZhCn

type ZhCn struct {
	Title   string            `json:"title"`
	Content [][]ContentParams `json:"content"`
}

Jump to

Keyboard shortcuts

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