Documentation
¶
Index ¶
- Constants
- Variables
- type Client
- func (c *Client) AppendRegistrationIds(ids []string)
- func (c *Client) CleanRegistrationIds() []string
- func (c *Client) GetTokenDetails(t string) (*tokenDetails, error)
- func (c *Client) PushMultiple(ids []string, d interface{})
- func (c *Client) PushSingle(to string, d interface{})
- func (c *Client) Send() (*response, error)
- func (c *Client) SetData(d interface{})
- func (c *Client) SetHTTPClient(client *http.Client)
- type NotificationPayload
Constants ¶
View Source
const ( // Methods GET = "GET" POST = "POST" // Priorities HighPriority = "high" NormalPriority = "normal" )
Variables ¶
View Source
var ( // Errors ErrDataIsEmpty = errors.New("data is empty") ErrToManyRegIDs = errors.New("too many registrations ids") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Message *message
ApiFCM string
ApiIID string
// contains filtered or unexported fields
}
func (*Client) AppendRegistrationIds ¶
AppendRegistrationIds Append your list of RegistrationIds
func (*Client) CleanRegistrationIds ¶
CleanRegistrationIds remove invalid token of RegistrationIds and return map of BadTokens
func (*Client) GetTokenDetails ¶
GetTokenDetails get info about the token
func (*Client) PushMultiple ¶
SetMsgAndIds Set Message and ids for send
func (*Client) PushSingle ¶
SetMsgAndTo 'To' this parameter specifies the recipient of a message.
func (*Client) SetHTTPClient ¶
SetHTTPClient set specific HTTPClient
type NotificationPayload ¶
type NotificationPayload struct {
Title string `json:"title,omitempty"`
Body string `json:"body,omitempty"`
BodyLocKey string `json:"body_loc_key,omitempty"`
BodyLocArgs string `json:"body_loc_args,omitempty"`
Icon string `json:"icon,omitempty"`
Tag string `json:"tag,omitempty"`
Sound string `json:"sound,omitempty"`
Badge string `json:"badge,omitempty"`
Color string `json:"color,omitempty"`
ClickAction string `json:"click_action,omitempty"`
TitleLocKey string `json:"title_loc_key,omitempty"`
TitleLocArgs string `json:"title_loc_args,omitempty"`
AndroidChannelID string `json:"android_channel_id,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.