push

package
v0.0.0-...-1525496 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPush = errors.New("推送失败")
View Source
var Errimg = errors.New("非图片")
View Source
var Erroverlimit = errors.New("文件大小超过设定的上限")

Functions

func Downloadimg

func Downloadimg(url string, i int) ([]byte, string, error)

func PostFile

func PostFile(filename string, file []byte, caption, chatid string) (bodyBuf *bytes.Buffer, ContentType string, err error)

func Split

func Split(s string, length int) []string

Types

type Httpgeterr

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

func (Httpgeterr) Error

func (h Httpgeterr) Error() string

type PushTg

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

func NewPushTg

func NewPushTg(key string) PushTg

func (*PushTg) Push

func (p *PushTg) Push(body []byte, ContentType string, a int)

func (*PushTg) Pushtext

func (p *PushTg) Pushtext(message, chatID string, a int)

Jump to

Keyboard shortcuts

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