Documentation ¶
Index ¶
- func NewPushClient(conf setting.ConfigHuawei) (setting.PushClientInterface, error)
- type AccessToken
- type AccessTokenReq
- type AccessTokenResp
- type Action
- type Body
- type Customize
- type Ext
- type Hps
- type Msg
- type NspCtx
- type Param
- type PayLoad
- type PushClient
- type PushMessageRequest
- type PushMessageResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPushClient ¶
func NewPushClient(conf setting.ConfigHuawei) (setting.PushClientInterface, error)
Types ¶
type AccessToken ¶
type AccessToken struct {
// contains filtered or unexported fields
}
func NewAccessToken ¶
func NewAccessToken() *AccessToken
func (*AccessToken) Get ¶
func (a *AccessToken) Get(ctx context.Context, request *AccessTokenReq) (*AccessTokenResp, error)
type AccessTokenReq ¶
type AccessTokenResp ¶
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 { AccessToken string `json:"access_token"` // 认证token,必填 NspSvc string `json:"nsp_svc"` // 默认 nspSvcDefault,必填 NspTs string `json:"nsp_ts"` // 服务请求时间戳,必填 DeviceTokenList []string `json:"device_token_list"` // JSON数值字符串,单次最大100 ExpireTime string `json:"expire_time,omitempty"` // 消息超时时间,必填 PayLoad *PayLoad `json:"payload,omitempty"` // 描述投递消息JSON结构体,必填 }
type PushMessageResponse ¶
Click to show internal directories.
Click to hide internal directories.