Documentation ¶
Index ¶
Constants ¶
View Source
const (
// DefaultEndpoint contains endpoint URL of firebase short link service.
DefaultEndpoint = "https://firebasedynamiclinks.googleapis.com/v1/shortLinks"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AndroidInfo ¶
type AndroidInfo struct {
AndroidPackageName string `json:"androidPackageName"`
}
AndroidInfo sets the android package name on the payload.
type DynamicLinkInfo ¶
type DynamicLinkInfo struct { DomainURIPrefix string `json:"domainUriPrefix"` Link *string `json:"link"` AndroidInfo *AndroidInfo `json:"androidInfo"` }
DynamicLinkInfo sets the domain uri prefix, the link and the android info on the payload.
type ErrorResponse ¶
ErrorResponse is the shape of a response in case of a code 400
type FireBaseClient ¶
type FireBaseClient struct { Endpoint string APIKey string AndroidPackageName string DomainURIPrefix string ConfirmationEndpoint string ResetPasswordEndpoint string }
FireBaseClient is interface structure
func NewFireBaseClient ¶
func NewFireBaseClient(config *context.Config) *FireBaseClient
NewFireBaseClient instantiate a new Firebase Client
func (*FireBaseClient) GetDynamicLink ¶
func (c *FireBaseClient) GetDynamicLink(token string, confirm bool) (string, error)
GetDynamicLink creates a new firebase link
type Payload ¶
type Payload struct {
DynamicLinkInfo *DynamicLinkInfo `json:"dynamicLinkInfo"`
}
Payload sets the payload.
type Response ¶
type Response struct { SuccessResponse *SuccessResponse ErrorResponse *ErrorResponse }
Response holds the different response types
type SuccessResponse ¶
SuccessResponse is the shape of a response in case of a code 200
Click to show internal directories.
Click to hide internal directories.