umeng

package
v0.0.0-...-cb57d17 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendAndroidGroupcast

func SendAndroidGroupcast(appKey, appMasterSecret, ticker, title, text, tag string) error

Android广播函数

func SendIOSGroupcast

func SendIOSGroupcast(appKey, appMasterSecret, title, subtitle, body, tag string) error

iOS广播函数

Types

type AndroidBody

type AndroidBody struct {
	Ticker    string `json:"ticker"`
	Title     string `json:"title"`
	Text      string `json:"text"`
	AfterOpen string `json:"after_open"`
}

type AndroidGroupcastMessage

type AndroidGroupcastMessage struct {
	AppKey            string            `json:"appkey"`
	Timestamp         string            `json:"timestamp"`
	Type              string            `json:"type"`
	Filter            Filter            `json:"filter"`
	Payload           AndroidPayload    `json:"payload"`
	Policy            Policy            `json:"policy"`
	ChannelProperties map[string]string `json:"channel_properties"`
	Description       string            `json:"description"`
}

AndroidGroupcastMessage Android广播消息结构

type AndroidPayload

type AndroidPayload struct {
	DisplayType string      `json:"display_type"`
	Body        AndroidBody `json:"body"`
}

type Filter

type Filter struct {
	Where Where `json:"where"`
}

Filter 过滤条件结构

type IOSAlert

type IOSAlert struct {
	Title    string `json:"title"`
	Subtitle string `json:"subtitle"`
	Body     string `json:"body"`
}

type IOSAps

type IOSAps struct {
	Alert IOSAlert `json:"alert"`
}

type IOSGroupcastMessage

type IOSGroupcastMessage struct {
	AppKey      string     `json:"appkey"`
	Timestamp   string     `json:"timestamp"`
	Type        string     `json:"type"`
	Filter      Filter     `json:"filter"`
	Payload     IOSPayload `json:"payload"`
	Policy      Policy     `json:"policy"`
	Description string     `json:"description"`
}

IOSGroupcastMessage iOS广播消息结构

type IOSPayload

type IOSPayload struct {
	Aps IOSAps `json:"aps"`
}

type Policy

type Policy struct {
	ExpireTime string `json:"expire_time"`
}

Policy 公共策略结构

type UmengResponse

type UmengResponse struct {
	Ret  string `json:"ret"`
	Data struct {
		MsgID     string `json:"msg_id,omitempty"`
		ErrorCode string `json:"error_code,omitempty"`
		ErrorMsg  string `json:"error_msg,omitempty"`
	} `json:"data"`
}

UmengResponse 公共返回结构

type Where

type Where struct {
	And []map[string]string `json:"and"` // 多个条件
}

Where 结构体,表示 where 条件

Jump to

Keyboard shortcuts

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