Documentation ¶
Index ¶
- Constants
- Variables
- func AddComma(s string) string
- func AddDateHyphen(d, whenEmpty string) string
- func AuthCronMiddleware(next echo.HandlerFunc) echo.HandlerFunc
- 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 CountryCodePrefix(countryCode int) string
- 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 EndPoint() string
- func GAEAppID() string
- func GAEServiceID() string
- func HMacSha1(key, message []byte) (string, error)
- func HyphenCorpNum(s string) string
- func HyphenPhoneNum(s string) string
- func HyphenWhenEmpty(s string) string
- func IdTokenAuth(key string, c echo.Context) (result bool, err error)
- func Init()
- func InitWith(keyFile string, envPairs ...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 KRTimezone() *time.Location
- func LocalizeAndFormatPhoneNumber(phoneNumber string, countryCode int) (localNumber string)
- func LocalizePhoneNumber(phoneNumber string, countryCode int) (localNumber string)
- func LogIfError(vs ...interface{}) bool
- func MD5Base64(message []byte) (string, error)
- func MapOf(pairs ...interface{}) map[string]interface{}
- func MessageToToken(token, title, body, priority string, ...) error
- func MessageToTokens(tokens []string, title, body, priority string, ...) map[string]error
- func MessageToTopic(topic, title, body, priority string, datas ...string) error
- func NewBatch() *firestore.WriteBatch
- func NewEcho() *echo.Echo
- func NormalizePhoneNumber(phoneNumber string, countryCode int) string
- func PanicIfError(vs ...interface{})
- func PathMerge(path string, pairs ...interface{}) error
- func PathTo(path string, to interface{}) error
- func QueryStringField(q firestore.Query, field string) (fieldValues map[string]string)
- func Random(min, max int64) int64
- func Round(x, unit float64) float64
- func ServiceEndPoint(serviceID string) string
- 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 StringMapValuesToSlice(m map[string]string) (s []string)
- func TimeNowRef() *time.Time
- func Timezone(hours, minutes int) *time.Location
- func ToJson(v interface{}, indent ...string) string
- func ToMap(v interface{}) (m map[string]interface{})
- func UID(c echo.Context) string
- func UpdateQueryResults(q firestore.Query, b *firestore.WriteBatch, updates ...interface{}) error
- func UpdatesOf(pairs ...interface{}) []firestore.Update
- func UrlValuesOf(args ...string) url.Values
- func UserToken(c echo.Context) *auth.Token
- func ValidateCorpNum(n string) bool
- func ValidateIdToken(next echo.HandlerFunc) echo.HandlerFunc
- func ValidateLocalCellPhoneNumber(phoneNumber string) bool
- func ValidateRRN(n string) bool
- type AEContext
- func (a *AEContext) Header(key string) string
- func (a *AEContext) JSONError(code int, msg string) error
- func (a *AEContext) JsonMap(pairs ...interface{}) error
- func (a *AEContext) JsonMsg(msg string) error
- func (a *AEContext) JsonOk() error
- func (a *AEContext) LastPathSegments() string
- func (a *AEContext) PathSegments() []string
- func (a *AEContext) ReqContext() context.Context
- func (a *AEContext) UID() string
- func (a *AEContext) UserRecord() *auth.UserRecord
- func (a *AEContext) UserToken() *auth.Token
- type AEError
- type Credential
- type Device
- type FcmToken
Constants ¶
View Source
const (
DocumentNotFound = AEError("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 AddDateHyphen ¶ added in v0.0.18
func AuthCronMiddleware ¶ added in v0.0.12
func AuthCronMiddleware(next echo.HandlerFunc) echo.HandlerFunc
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 CountryCodePrefix ¶ added in v0.0.14
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 GAEServiceID ¶ added in v0.0.18
func GAEServiceID() string
func HyphenCorpNum ¶ added in v0.0.18
func HyphenPhoneNum ¶ added in v0.0.18
func HyphenWhenEmpty ¶ added in v0.0.18
func IdTokenAuth ¶
func KRTimezone ¶ added in v0.0.12
func LocalizeAndFormatPhoneNumber ¶ added in v0.0.14
func LocalizePhoneNumber ¶ added in v0.0.14
func LogIfError ¶
func LogIfError(vs ...interface{}) bool
func MessageToToken ¶ added in v0.0.3
func MessageToTokens ¶ added in v0.0.3
func MessageToTopic ¶ added in v0.0.3
func NewBatch ¶
func NewBatch() *firestore.WriteBatch
func NormalizePhoneNumber ¶ added in v0.0.14
func PanicIfError ¶
func PanicIfError(vs ...interface{})
func QueryStringField ¶ added in v0.0.18
func ServiceEndPoint ¶ added in v0.0.18
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 StringMapValuesToSlice ¶ added in v0.0.18
func TimeNowRef ¶
func UpdateQueryResults ¶
func UpdateQueryResults(q firestore.Query, b *firestore.WriteBatch, updates ...interface{}) error
func UrlValuesOf ¶ added in v0.0.17
func ValidateCorpNum ¶ added in v0.0.13
func ValidateIdToken ¶
func ValidateIdToken(next echo.HandlerFunc) echo.HandlerFunc
func ValidateLocalCellPhoneNumber ¶ added in v0.0.13
func ValidateRRN ¶ added in v0.0.13
Types ¶
type AEContext ¶ added in v0.0.3
type AEContext struct {
echo.Context
}
func (*AEContext) LastPathSegments ¶ added in v0.0.3
func (*AEContext) PathSegments ¶ added in v0.0.3
func (*AEContext) ReqContext ¶ added in v0.0.3
func (*AEContext) UserRecord ¶ added in v0.0.3
func (a *AEContext) UserRecord() *auth.UserRecord
type Credential ¶ added in v0.0.3
type Credential struct { Type string `json:"type"` ProjectID string `json:"project_id"` PrivateKeyID string `json:"private_key_id"` PrivateKey string `json:"private_key"` ClientEmail string `json:"client_email"` ClientID string `json:"client_id"` AuthURI string `json:"auth_uri"` TokenURI string `json:"token_uri"` AuthProviderX509CertURL string `json:"auth_provider_x509_cert_url"` ClientX509CertURL string `json:"client_x509_cert_url"` }
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"` }
Click to show internal directories.
Click to hide internal directories.