Documentation
¶
Index ¶
- func NewPushClient(conf *setting.ConfigVivo) (setting.PushClientInterface, error)
- type AuthToken
- type AuthTokenReq
- type AuthTokenResp
- type PushClient
- type PushMessageRequest
- type PushMessageResponse
- type PushMultiNotify
- type PushSingleNotify
- type SaveMessageToCloud
- type SaveMessageToCloudExtra
- type SaveMessageToCloudResponse
- type SingleNotifyExtra
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 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 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 SaveMessageToCloudExtra ¶
type SingleNotifyExtra ¶
Click to show internal directories.
Click to hide internal directories.