vivo_channel

package
v1.2.11 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPushClient

func NewPushClient(conf *setting.ConfigVivo) (setting.PushClientInterface, error)

Types

type AuthToken

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

func NewAuthToken

func NewAuthToken() *AuthToken

func (*AuthToken) Get

func (a *AuthToken) Get(ctx context.Context, request *AuthTokenReq) (*AuthTokenResp, error)

type AuthTokenReq

type AuthTokenReq struct {
	AppId     string `json:"appId"`
	AppKey    string `json:"appKey"`
	AppSecret string `json:"appSecret"`
	Timestamp string `json:"timestamp"`
}

type AuthTokenResp

type AuthTokenResp struct {
	Result    int    `json:"result"`    // 0 成功,非0失败
	Desc      string `json:"desc"`      // 文字描述接口调用情况
	AuthToken string `json:"authToken"` // 默认有效一天
}

AuthTokenResp vivo

{
 "auth_token": "aa05871a-dd0b-4ab1-a303-b4e8177fb2e1",
 "desc": "请求成功",
 "result": 0,
 "success": true
}

type PushClient

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

func (*PushClient) GetAccessToken

func (p *PushClient) GetAccessToken(ctx context.Context) (interface{}, error)

func (*PushClient) PushNotice

func (p *PushClient) PushNotice(ctx context.Context, pushRequest *setting.PushMessageRequest) (interface{}, error)

type PushMessageRequest

type PushMessageRequest struct {
}

type PushMessageResponse

type PushMessageResponse struct {
	Result       int         `json:"result"`    // 0 表示成功,非0失败
	Desc         string      `json:"desc"`      // 文字描述接口调用情况
	RequestId    string      `json:"requestId"` // 请求ID
	InvalidUsers interface{} `json:"invalidUsers"`
	TaskId       string      `json:"taskId"` // 任务ID
}

PushMessageResponse vivo手机

{
 "desc": "请求成功",
 "invalid_users": null,
 "request_id": "ab-7h-98-io8",
 "result": 0,
 "success": true,
 "task_id": ""
}

type PushMultiNotify

type PushMultiNotify struct {
	RegIds    []string `json:"regIds"`
	TaskId    string   `json:"taskId"`
	RequestId string   `json:"requestId"`
}

type PushSingleNotify

type PushSingleNotify struct {
	RegId       string             `json:"regId"`
	Title       string             `json:"title"`
	Content     string             `json:"content"`
	SkipType    int                `json:"skipType"`
	SkipContent string             `json:"skipContent"`
	RequestId   string             `json:"requestId"`
	NotifyType  int                `json:"notifyType"`
	Extra       *SingleNotifyExtra `json:"extra,omitempty"`
}

type SaveMessageToCloud

type SaveMessageToCloud struct {
	Title       string                   `json:"title"`
	Content     string                   `json:"content"`
	SkipType    int                      `json:"skipType"`
	SkipContent string                   `json:"skipContent"`
	RequestId   string                   `json:"requestId"`
	NotifyType  int                      `json:"notifyType"`
	Extra       *SaveMessageToCloudExtra `json:"extra,omitempty"`
}

type SaveMessageToCloudExtra

type SaveMessageToCloudExtra struct {
	CallBack      string `json:"callback,omitempty"`
	CallBackParam string `json:"callback.param,omitempty"`
}

type SaveMessageToCloudResponse

type SaveMessageToCloudResponse struct {
	Result int    `json:"result"`
	Desc   string `json:"desc"`
	TaskId string `json:"taskId"`
}

type SingleNotifyExtra

type SingleNotifyExtra struct {
	CallBack      string `json:"callback,omitempty"`
	CallBackParam string `json:"callback.param,omitempty"`
}

Jump to

Keyboard shortcuts

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