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 LastOf(arr []string) string
- 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 StorageBucket() *storage.BucketHandle
- func StorageObject(storageUrl string) *storage.ObjectHandle
- func StoreBytes(c context.Context, b []byte, filePath string) error
- func StoreReader(c context.Context, reader io.ReadCloser, filePath string) 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 AEError
- type AEFContext
- func (a *AEFContext) BatchMerge(b *firestore.WriteBatch, doc *firestore.DocumentRef, pairs ...interface{}) *firestore.WriteBatch
- func (a *AEFContext) BatchMergeObj(b *firestore.WriteBatch, path string, o interface{}) *firestore.WriteBatch
- func (a *AEFContext) BatchMergePath(b *firestore.WriteBatch, path string, pairs ...interface{}) *firestore.WriteBatch
- func (a *AEFContext) Col(path ...string) *firestore.CollectionRef
- func (a *AEFContext) DeleteQueryResults(q firestore.Query, b *firestore.WriteBatch) error
- func (a *AEFContext) Doc(path ...string) *firestore.DocumentRef
- func (a *AEFContext) DocMerge(doc *firestore.DocumentRef, pairs ...interface{}) error
- func (a *AEFContext) DocMergeObj(doc *firestore.DocumentRef, o interface{}) error
- func (a *AEFContext) MessageToTokens(tokens []string, msg *messaging.Message) map[string]error
- func (a *AEFContext) PathMerge(path string, pairs ...interface{}) error
- func (a *AEFContext) PathTo(to interface{}, path ...string) error
- func (a *AEFContext) QueryStringField(q firestore.Query, field string) (fieldValues map[string]string)
- func (a *AEFContext) Snap(path ...string) (*firestore.DocumentSnapshot, error)
- func (a *AEFContext) SnapTo(snap *firestore.DocumentSnapshot, to interface{}) error
- func (a *AEFContext) UpdateQueryResults(q firestore.Query, b *firestore.WriteBatch, updates ...interface{}) error
- type AEFire
- type Credential
- type Device
- type FcmToken
- type MessageBuilder
- func (m *MessageBuilder) Body(body string) *MessageBuilder
- func (m *MessageBuilder) Data(key, value string) *MessageBuilder
- func (m *MessageBuilder) Priority(p string) *MessageBuilder
- func (m *MessageBuilder) SetToken(t string) *MessageBuilder
- func (m *MessageBuilder) Title(title string) *MessageBuilder
- func (m *MessageBuilder) Topic(topic string) *MessageBuilder
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
View Source
var Storage *storage.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 StorageBucket ¶ added in v0.0.27
func StorageBucket() *storage.BucketHandle
func StorageObject ¶ added in v0.0.27
func StorageObject(storageUrl string) *storage.ObjectHandle
func StoreBytes ¶ added in v0.0.28
func StoreReader ¶ added in v0.0.28
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 AEFContext ¶ added in v0.1.0
func (*AEFContext) BatchMerge ¶ added in v0.1.0
func (a *AEFContext) BatchMerge(b *firestore.WriteBatch, doc *firestore.DocumentRef, pairs ...interface{}) *firestore.WriteBatch
func (*AEFContext) BatchMergeObj ¶ added in v0.1.0
func (a *AEFContext) BatchMergeObj(b *firestore.WriteBatch, path string, o interface{}) *firestore.WriteBatch
func (*AEFContext) BatchMergePath ¶ added in v0.1.0
func (a *AEFContext) BatchMergePath(b *firestore.WriteBatch, path string, pairs ...interface{}) *firestore.WriteBatch
func (*AEFContext) Col ¶ added in v0.1.0
func (a *AEFContext) Col(path ...string) *firestore.CollectionRef
func (*AEFContext) DeleteQueryResults ¶ added in v0.1.0
func (a *AEFContext) DeleteQueryResults(q firestore.Query, b *firestore.WriteBatch) error
func (*AEFContext) Doc ¶ added in v0.1.0
func (a *AEFContext) Doc(path ...string) *firestore.DocumentRef
func (*AEFContext) DocMerge ¶ added in v0.1.0
func (a *AEFContext) DocMerge(doc *firestore.DocumentRef, pairs ...interface{}) error
func (*AEFContext) DocMergeObj ¶ added in v0.1.0
func (a *AEFContext) DocMergeObj(doc *firestore.DocumentRef, o interface{}) error
func (*AEFContext) MessageToTokens ¶ added in v0.1.0
func (*AEFContext) PathMerge ¶ added in v0.1.0
func (a *AEFContext) PathMerge(path string, pairs ...interface{}) error
func (*AEFContext) PathTo ¶ added in v0.1.0
func (a *AEFContext) PathTo(to interface{}, path ...string) error
func (*AEFContext) QueryStringField ¶ added in v0.1.0
func (*AEFContext) Snap ¶ added in v0.1.0
func (a *AEFContext) Snap(path ...string) (*firestore.DocumentSnapshot, error)
func (*AEFContext) SnapTo ¶ added in v0.1.0
func (a *AEFContext) SnapTo(snap *firestore.DocumentSnapshot, to interface{}) error
func (*AEFContext) UpdateQueryResults ¶ added in v0.1.0
func (a *AEFContext) UpdateQueryResults(q firestore.Query, b *firestore.WriteBatch, updates ...interface{}) error
type AEFire ¶ added in v0.1.0
type AEFire struct { App *firebase.App Store *firestore.Client Storage *storage.Client FCM *messaging.Client Auth *auth.Client IID *iid.Client }
func (*AEFire) NewContext ¶ added in v0.1.0
func (a *AEFire) NewContext(c context.Context) *AEFContext
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"` }
type MessageBuilder ¶ added in v0.1.0
func NewMessageBuilder ¶ added in v0.1.0
func NewMessageBuilder() *MessageBuilder
func (*MessageBuilder) Body ¶ added in v0.1.0
func (m *MessageBuilder) Body(body string) *MessageBuilder
func (*MessageBuilder) Data ¶ added in v0.1.0
func (m *MessageBuilder) Data(key, value string) *MessageBuilder
func (*MessageBuilder) Priority ¶ added in v0.1.0
func (m *MessageBuilder) Priority(p string) *MessageBuilder
func (*MessageBuilder) SetToken ¶ added in v0.1.0
func (m *MessageBuilder) SetToken(t string) *MessageBuilder
func (*MessageBuilder) Title ¶ added in v0.1.0
func (m *MessageBuilder) Title(title string) *MessageBuilder
func (*MessageBuilder) Topic ¶ added in v0.1.0
func (m *MessageBuilder) Topic(topic string) *MessageBuilder
Click to show internal directories.
Click to hide internal directories.