Documentation ¶
Index ¶
- Constants
- Variables
- func BatchMerge(b *firestore.WriteBatch, doc *firestore.DocumentRef, pairs ...interface{}) *firestore.WriteBatch
- func BatchMergeObj(b *firestore.WriteBatch, path string, o interface{}) *firestore.WriteBatch
- func BatchMergePath(b *firestore.WriteBatch, path string, pairs ...interface{}) *firestore.WriteBatch
- func Col(path string) *firestore.CollectionRef
- func DeleteQueryResults(q firestore.Query, b *firestore.WriteBatch) error
- func Doc(path string) *firestore.DocumentRef
- func DocMerge(doc *firestore.DocumentRef, pairs ...interface{}) error
- func DocMergeObj(doc *firestore.DocumentRef, o interface{}) error
- func FcmToDevices(tokens []string, title, body, link, priority string, datas ...string) map[string]error
- func FcmToToken(token, title, body, link, priority string, datas ...string) error
- func FcmToTopic(topic, title, body, link, priority string, datas ...string) error
- func IdTokenAuth(key string, c echo.Context) (result bool, err error)
- func Init(projectID, credentailFilePath, port string)
- func JSONError(c echo.Context, code int, msg string) error
- func JsonMap(c echo.Context, pairs ...interface{}) error
- func JsonMsg(c echo.Context, msg string) error
- func JsonOk(c echo.Context) error
- func LogIfError(vs ...interface{}) bool
- func MapOf(pairs ...interface{}) map[string]interface{}
- func NewBatch() *firestore.WriteBatch
- func NewEcho() *echo.Echo
- func PanicIfError(vs ...interface{})
- func PathTo(path string, to interface{}) error
- func Snap(path string) *firestore.DocumentSnapshot
- func SnapExists(snap *firestore.DocumentSnapshot) bool
- func SnapTo(snap *firestore.DocumentSnapshot, to interface{}) error
- func StringMapOf(pairs ...string) map[string]string
- func TimeNowRef() *time.Time
- func ToJson(v interface{}) string
- func ToMap(v interface{}) (m map[string]interface{})
- func UpdateQueryResults(q firestore.Query, b *firestore.WriteBatch, updates ...interface{}) error
- func UpdatesOf(pairs ...interface{}) []firestore.Update
- func UserToken(c echo.Context) *auth.Token
- func ValidateIdToken(next echo.HandlerFunc) echo.HandlerFunc
- type Device
- type GWError
Constants ¶
View Source
const (
DocumentNotFound = GWError("DocumentNotFound")
)
Variables ¶
View Source
var FApp *firebase.App
View Source
var FAuth *auth.Client
View Source
var FCM *messaging.Client
View Source
var FIID *iid.Client
View Source
var FStore *firestore.Client
Functions ¶
func BatchMerge ¶
func BatchMerge(b *firestore.WriteBatch, doc *firestore.DocumentRef, pairs ...interface{}) *firestore.WriteBatch
func BatchMergeObj ¶
func BatchMergeObj(b *firestore.WriteBatch, path string, o interface{}) *firestore.WriteBatch
func BatchMergePath ¶
func BatchMergePath(b *firestore.WriteBatch, path string, pairs ...interface{}) *firestore.WriteBatch
func Col ¶
func Col(path string) *firestore.CollectionRef
func DeleteQueryResults ¶
func DeleteQueryResults(q firestore.Query, b *firestore.WriteBatch) error
func Doc ¶
func Doc(path string) *firestore.DocumentRef
func DocMerge ¶
func DocMerge(doc *firestore.DocumentRef, pairs ...interface{}) error
func DocMergeObj ¶
func DocMergeObj(doc *firestore.DocumentRef, o interface{}) error
func FcmToDevices ¶
func FcmToToken ¶
func FcmToTopic ¶
func LogIfError ¶
func LogIfError(vs ...interface{}) bool
func NewBatch ¶
func NewBatch() *firestore.WriteBatch
func PanicIfError ¶
func PanicIfError(vs ...interface{})
func Snap ¶
func Snap(path string) *firestore.DocumentSnapshot
func SnapExists ¶
func SnapExists(snap *firestore.DocumentSnapshot) bool
func SnapTo ¶
func SnapTo(snap *firestore.DocumentSnapshot, to interface{}) error
func StringMapOf ¶
func TimeNowRef ¶
func UpdateQueryResults ¶
func UpdateQueryResults(q firestore.Query, b *firestore.WriteBatch, updates ...interface{}) error
func ValidateIdToken ¶
func ValidateIdToken(next echo.HandlerFunc) echo.HandlerFunc
Types ¶
type Device ¶
type Device struct { UID *string `json:"uid,omitempty" firestore:"uid,omitempty"` IID string `json:"iid" firestore:"iid"` Token *string `json:"token,omitempty" firestore:"token,omitempty"` PhoneNumber *string `json:"phoneNumber,omitempty" firestore:"phoneNumber,omitempty"` CreatedAt *time.Time `json:"createdAt" firestore:"createdAt"` UserAgent string `json:"userAgent" firestore:"userAgent"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.