pusher

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, exec CreateFunc)

Types

type Config

type Config struct {
	AppKey          string
	AppMasterSecret string
	MiActivity      string
	Environment     string
}

type CreateFunc

type CreateFunc func(cfg Config) IPusher

func Load

func Load(name string) (CreateFunc, error)

type Extra

type Extra struct {
	Address     string `json:"address"`
	ChannelType int32  `json:"channelType"`
	TimeOutTime int64  `json:"-"`
}

func (*Extra) ToBytes

func (e *Extra) ToBytes() ([]byte, error)

type IPusher

type IPusher interface {
	SinglePush(deviceToken, title, text string, extra *Extra) error
	SingleCustomPush(address, title, text string, extra *Extra) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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