setting

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2021 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigHuawei added in v1.1.0

type ConfigHuawei struct {
	AppPkgName   string `json:"appPkgName"`   // 应用包名
	ClientId     string `json:"clientId"`     // 用户在联盟申请的APPID
	ClientSecret string `json:"clientSecret"` // 应用秘钥
}

type ConfigIosCert added in v1.1.0

type ConfigIosCert struct {
	IsSandBox bool   `json:"isSandBox"`
	CertPath  string `json:"certPath"`
	Password  string `json:"password"`
}

type ConfigIosToken added in v1.1.0

type ConfigIosToken struct {
	IsSandBox  bool   `json:"isSandBox"`
	TeamId     string `json:"teamId"`
	KeyId      string `json:"keyId"`
	SecretFile string `json:"secretFile"`
	BundleId   string `json:"bundleId"`
}

type ConfigMeizu added in v1.1.0

type ConfigMeizu struct {
	AppPkgName string `json:"appPkgName"`
	AppId      string `json:"appId"`
	AppSecret  string `json:"appSecret"`
}

type ConfigOppo added in v1.1.0

type ConfigOppo struct {
	AppPkgName   string `json:"appPkgName"`
	AppKey       string `json:"appKey"`
	MasterSecret string `json:"masterSecret"`
}

type ConfigVivo added in v1.1.0

type ConfigVivo struct {
	AppPkgName string `json:"appPkgName"`
	AppId      string `json:"appId"`
	AppKey     string `json:"appKey"`
	AppSecret  string `json:"appSecret"`
}

type ConfigXiaomi added in v1.1.0

type ConfigXiaomi struct {
	AppPkgName string `json:"appPkgName"`
	AppSecret  string `json:"appSecret"`
}

type Message

type Message struct {
	BusinessId    string            `json:"businessId"`    // 业务ID
	Title         string            `json:"title"`         // 标题,建议不超过10个汉字
	SubTitle      string            `json:"subTitle"`      // 副标题,建议不超过10个汉字
	Content       string            `json:"content"`       // 内容,建议不超过20个汉字
	Extra         map[string]string `json:"extra"`         // 自定义消息。只支持一维
	CallBack      string            `json:"callback"`      // 送达回执地址,供推送厂商调用,最大128字节
	CallbackParam string            `json:"callbackParam"` // 自定义回执参数
}

type PlatformType added in v1.0.1

type PlatformType string
const (
	HuaweiPlatform   PlatformType = "huawei"
	XiaomiPlatform   PlatformType = "xiaomi"
	MeizuPlatform    PlatformType = "meizu"
	VivoPlatform     PlatformType = "vivo"
	OppoPlatform     PlatformType = "oppo"
	IosCertPlatform  PlatformType = "ios"
	IosTokenPlatform PlatformType = "ios-token"
)

type PushClientInterface

type PushClientInterface interface {
	GetAccessToken(ctx context.Context) (interface{}, error)
	PushNotice(ctx context.Context, pushRequest *PushMessageRequest) (interface{}, error)
}

type PushConfig

type PushConfig struct {
	ConfigHuawei   `json:"huawei"`
	ConfigXiaomi   `json:"xiaomi"`
	ConfigMeizu    `json:"meizu"`
	ConfigOppo     `json:"oppo"`
	ConfigVivo     `json:"vivo"`
	ConfigIosCert  `json:"ios"`
	ConfigIosToken `json:"ios-token"`
}

type PushMessageRequest

type PushMessageRequest struct {
	DeviceTokens []string `json:"token"`                  // 设备列表
	AccessToken  string   `json:"access_token,omitempty"` // 认证token
	Message      *Message `json:"message"`                // 消息
	ExpireTime   string   `json:"expire_time,omitempty"`  // 消息超时时间,必填
}

type PushMessageResponse

type PushMessageResponse struct {
}

Jump to

Keyboard shortcuts

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