oppo_channel

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: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 AuthTokenData struct {
	AuthToken  string `json:"auth_token"`
	CreateTime int64  `json:"create_time"`
}

type AuthTokenReq

type AuthTokenReq struct {
	AppKey       string `json:"app_key"`
	Timestamp    string `json:"timestamp"`
	MasterSecret string `json:"master_secret"`
}

type AuthTokenResp

type AuthTokenResp struct {
	Code    int            `json:"code"`
	Message string         `json:"message"`
	Data    *AuthTokenData `json:"data"`
}

type BroadcastPush

type BroadcastPush struct {
	MessageId   string `json:"message_id"`
	TargetType  int    `json:"target_type"`
	TargetValue string `json:"target_value"`
	AuthToken   string `json:"auth_token"`
}

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 PushMessageData struct {
	BroadcastMessageId string `json:"message_id"`
	SingleMessageId    string `json:"messageId"`
	Status             string `json:"status"`
	TaskId             string `json:"task_id"`
}

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 SingleMessage struct {
	TargetType   int               `json:"target_type"`
	TargetValue  string            `json:"target_value"`
	Notification map[string]string `json:"notification"`
}

type SinglePush

type SinglePush struct {
	Message   *SingleMessage `json:"message"`
	AuthToken string         `json:"auth_token"`
}

Jump to

Keyboard shortcuts

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