Documentation ¶
Index ¶
- func NewPushClient(conf setting.ConfigOppo) (setting.PushClientInterface, error)
- type AuthToken
- type AuthTokenData
- type AuthTokenReq
- type AuthTokenResp
- type BroadcastPush
- type PushClient
- type PushMessageData
- type PushMessageRequest
- type PushMessageResponse
- type SaveMessageToCloudResponse
- type SaveMessageToCloudResult
- type SingleMessage
- type SinglePush
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPushClient ¶
func NewPushClient(conf setting.ConfigOppo) (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 AuthTokenData ¶
type AuthTokenReq ¶
type AuthTokenResp ¶
type AuthTokenResp struct { Code int `json:"code"` Message string `json:"message"` Data *AuthTokenData `json:"data"` }
type BroadcastPush ¶
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 PushMessageData ¶
type PushMessageRequest ¶
type PushMessageRequest struct { Title string `json:"title"` SubTitle string `json:"sub_title"` Content string `json:"content"` ClickActionType int `json:"click_action_type"` ClickActionUrl string `json:"click_action_url"` CallBackUrl string `json:"call_back_url"` CallBackParameter string `json:"call_back_parameter"` }
type PushMessageResponse ¶
type PushMessageResponse struct { Code int `json:"code"` Message string `json:"message"` Data *PushMessageData `json:"data"` }
type SaveMessageToCloudResponse ¶
type SaveMessageToCloudResponse struct { Code int `json:"code"` Message string `json:"message"` Data *SaveMessageToCloudResult `json:"data"` }
type SaveMessageToCloudResult ¶
type SaveMessageToCloudResult struct {
MessageId string `json:"message_id"`
}
type SingleMessage ¶
type SinglePush ¶
type SinglePush struct { Message *SingleMessage `json:"message"` AuthToken string `json:"auth_token"` }
Click to show internal directories.
Click to hide internal directories.