push

package
v0.0.0-...-538343a Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Region          string
	AccessKeyID     string
	AccessKeySecret string
}

Client is used to send push request.

func NewClient

func NewClient(region, accessKeyID, accessKeySecret string) *Client

NewClient function construct a new Client.

func (Client) SendRequest

func (c Client) SendRequest(r *PushRequest) (string, error)

SendRequest method sends out a PushRequest.

type PushRequest

type PushRequest struct {
	// push target
	AppKey      string
	Target      string
	TargetValue string
	DeviceType  int

	// push configuration
	Type    int
	Title   string
	Body    string
	Summary string

	// IOS specific
	IOSBadge         string
	IOSMusic         string
	IOSExtParameters string
	ApnsEnv          string
	Remind           bool

	// Android specific
	AndroidOpenType      int
	AndroidOpenURL       string
	AndroidExtParameters string
	AndroidMusic         string
	AndroidActivity      string

	// Message control
	PushTime     string
	StoreOffline bool
	ExpireTime   string
	BatchNumber  string
}

PushRequest struct represents a message to be pushed to mobile.

Jump to

Keyboard shortcuts

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