Documentation ¶
Index ¶
- Variables
- type Alert
- type Android
- type Audience
- type AuthReq
- type AuthResp
- type Client
- func (g *Client) Auth(ctx context.Context, timeStamp int64) (token string, expireTime int64, err error)
- func (g *Client) GetTaskID(ctx context.Context, token string, pushReq PushReq) (string, error)
- func (g *Client) GetTaskIDAndSave2Redis(ctx context.Context, token string, pushReq PushReq) (taskID string, err error)
- func (g *Client) Push(ctx context.Context, userIDs []string, title, content string, ...) error
- type Ios
- type Notification
- type Options
- type Payload
- type PushChannel
- type PushMessage
- type PushReq
- type Resp
- type RespI
- type Settings
- type TaskResp
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTokenExpire = errors.New("token expire") ErrUserIDEmpty = errors.New("userIDs is empty") )
Functions ¶
This section is empty.
Types ¶
type Android ¶
type Android struct { Ups struct { Notification Notification `json:"notification"` Options Options `json:"options"` } `json:"ups"` }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetTaskIDAndSave2Redis ¶
type Notification ¶
type Options ¶
type Options struct { HW struct { DefaultSound bool `json:"/message/android/notification/default_sound"` ChannelID string `json:"/message/android/notification/channel_id"` Sound string `json:"/message/android/notification/sound"` Importance string `json:"/message/android/notification/importance"` } `json:"HW"` XM struct { ChannelID string `json:"/extra.channel_id"` } `json:"XM"` VV struct { Classification int `json:"/classification"` } `json:"VV"` }
type PushChannel ¶
type PushMessage ¶
type PushMessage struct { Notification *Notification `json:"notification,omitempty"` Transmission *string `json:"transmission,omitempty"` }
type PushReq ¶
type PushReq struct { RequestID *string `json:"request_id"` Settings *Settings `json:"settings"` Audience *Audience `json:"audience"` PushMessage *PushMessage `json:"push_message"` PushChannel *PushChannel `json:"push_channel"` IsAsync *bool `json:"is_async"` TaskID *string `json:"taskid"` }
Click to show internal directories.
Click to hide internal directories.