Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultFCMEndpoint = "https://fcm.googleapis.com/v1/projects" Scope = "https://www.googleapis.com/auth/firebase.messaging" ClientTimeout = time.Second * 10 )
fcm v1 Client const variables
View Source
const ( InvalidArgument = "INVALID_ARGUMENT" Unregistered = "UNREGISTERED" NotFound = "NOT_FOUND" Internal = "INTERNAL" QuotaExceeded = "QUOTA_EXCEEDED" )
Error const variables
View Source
const MaxBulkRequests = 500
MaxBulkRequests represens max count of request payloads in a request body.
View Source
const Provider = "fcmv1"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is FCM v1 client
func NewClient ¶
func NewClient(tokenSource oauth2.TokenSource, projectID string, endpoint string, timeout time.Duration) (*Client, error)
NewClient establishes a http connection with fcm v1
func (*Client) NewRequest ¶
NewRequest creates request for fcm
type FCMErrorResponseCode ¶
type FCMErrorResponseCode int
type ResponseBody ¶
type ResponseBody struct { Name string `json:"name,omitempty"` Error *FCMError `json:"error,omitempty"` }
ResponseBody fcm response body
type Result ¶
type Result struct { StatusCode int `json:"status,omitempty"` Token string `json:"token,omitempty"` Error *FCMError `json:"error,omitempty"` }
Result is the status of a processed FCMResponse
func (Result) ExtraValue ¶
func (Result) MarshalJSON ¶
func (Result) RecipientIdentifier ¶
Click to show internal directories.
Click to hide internal directories.