Documentation
¶
Index ¶
- type AuthConfig
- type BatchResult
- type Client
- func (c *Client) CheckDevice(deviceKey string) error
- func (c *Client) Info() (*ServerInfo, error)
- func (c *Client) Ping() error
- func (c *Client) Push(req *PushRequest) (*CommonResp, error)
- func (c *Client) PushBatch(req *PushRequest) (*CommonResp, error)
- func (c *Client) Register(deviceKey, deviceToken string) (*RegisterResp, error)
- type CommonResp
- type PushRequest
- type RegisterResp
- type ServerInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthConfig ¶
type BatchResult ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CheckDevice ¶
CheckDevice checks if a device is registered.
func (*Client) Info ¶
func (c *Client) Info() (*ServerInfo, error)
Info retrieves server information.
func (*Client) Push ¶
func (c *Client) Push(req *PushRequest) (*CommonResp, error)
Push sends a notification to a single device.
func (*Client) PushBatch ¶
func (c *Client) PushBatch(req *PushRequest) (*CommonResp, error)
PushBatch sends notifications to multiple devices.
type CommonResp ¶
type PushRequest ¶
type PushRequest struct {
DeviceKey string `json:"device_key,omitempty"`
DeviceKeys []string `json:"device_keys,omitempty"`
Title string `json:"title,omitempty"`
Subtitle string `json:"subtitle,omitempty"`
Body string `json:"body,omitempty"`
Sound string `json:"sound,omitempty"`
Level string `json:"level,omitempty"`
Volume int `json:"volume,omitempty"`
Badge int `json:"badge,omitempty"`
Icon string `json:"icon,omitempty"`
Group string `json:"group,omitempty"`
URL string `json:"url,omitempty"`
Copy string `json:"copy,omitempty"`
IsArchive string `json:"isArchive,omitempty"`
Call string `json:"call,omitempty"`
ID string `json:"id,omitempty"`
Image string `json:"image,omitempty"`
Ciphertext string `json:"ciphertext,omitempty"`
Action string `json:"action,omitempty"`
}
type RegisterResp ¶
Click to show internal directories.
Click to hide internal directories.