Documentation ¶
Index ¶
- Constants
- 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 CountryCodePrefix(countryCode int) string
- func EndPoint() string
- func GAEAppID() string
- func GAEServiceID() string
- func GetEnv(key string, defaultValue string) string
- func GetEnvInt(key string, defaultValue int) int
- func HMacSha1(key, message []byte) (string, error)
- func HyphenCorpNum(s string) string
- func HyphenPhoneNum(s string) string
- func HyphenWhenEmpty(s string) string
- 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 LastPathSegments(r *http.Request) 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 NewEcho() *echo.Echo
- func NormalizePhoneNumber(phoneNumber string, countryCode int) string
- func PanicIfError(vs ...interface{})
- func PathSegments(r *http.Request) []string
- func Random(min, max int64) int64
- func Round(x, unit float64) float64
- func ServiceEndPoint(serviceID string) string
- func SnapTo(snap *firestore.DocumentSnapshot, to interface{}) error
- func StorageObjectUrl(obj *storage.ObjectHandle) string
- 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 TokenIID(token string) string
- func UID(c context.Context) string
- func UrlValuesOf(args ...string) url.Values
- func UserToken(c context.Context) *auth.Token
- func ValidateCorpNum(n string) bool
- func ValidateLocalCellPhoneNumber(phoneNumber string) bool
- func ValidateRRN(n string) bool
- type AEError
- type AEFire
- func (a *AEFire) BatchMerge(b *firestore.WriteBatch, doc *firestore.DocumentRef, pairs ...interface{}) *firestore.WriteBatch
- func (a *AEFire) BatchMergeObj(b *firestore.WriteBatch, path string, o interface{}) *firestore.WriteBatch
- func (a *AEFire) BatchMergePath(b *firestore.WriteBatch, path string, pairs ...interface{}) *firestore.WriteBatch
- func (a *AEFire) Col(path ...string) *firestore.CollectionRef
- func (aef *AEFire) ConnectDB(param DatabaseParam) *AEFire
- func (a *AEFire) DeleteQueryResults(q firestore.Query, b *firestore.WriteBatch) error
- func (a *AEFire) Doc(path ...string) *firestore.DocumentRef
- func (a *AEFire) DocMerge(doc *firestore.DocumentRef, pairs ...interface{}) error
- func (a *AEFire) DocMergeObj(doc *firestore.DocumentRef, o interface{}) error
- func (aef *AEFire) IdTokenAuth(key string, c echo.Context) (result bool, err error)
- func (a *AEFire) MessageToTokens(tokens []string, msg *messaging.Message) map[string]error
- func (a *AEFire) PathMerge(path string, pairs ...interface{}) error
- func (a *AEFire) PathTo(to interface{}, path ...string) error
- func (a *AEFire) QueryStringField(q firestore.Query, field string) (fieldValues map[string]string)
- func (a *AEFire) Snap(path ...string) (*firestore.DocumentSnapshot, error)
- func (a *AEFire) SnapTo(snap *firestore.DocumentSnapshot, to interface{}) error
- func (a *AEFire) StorageBucket() *storage.BucketHandle
- func (a *AEFire) StorageObject(storageUrl string) *storage.ObjectHandle
- func (a *AEFire) StoreBytes(c context.Context, b []byte, filePath string) error
- func (a *AEFire) StoreReader(c context.Context, reader io.ReadCloser, filePath string) error
- func (a *AEFire) UID() string
- func (a *AEFire) UpdateQueryResults(q firestore.Query, b *firestore.WriteBatch, updates ...interface{}) error
- func (a *AEFire) UserRecord() *auth.UserRecord
- func (a *AEFire) UserToken() *auth.Token
- func (aef *AEFire) ValidateIdToken(next echo.HandlerFunc) echo.HandlerFunc
- func (aef *AEFire) WithContext(c context.Context) *AEFire
- type Credential
- type DatabaseParam
- type Device
- type FcmToken
- type MessageBuilder
- func (m *MessageBuilder) Body(body string) *MessageBuilder
- func (m *MessageBuilder) Channel(channel 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")
)
View Source
const (
UserTokenKey = "UserToken"
)
Variables ¶
This section is empty.
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 CountryCodePrefix ¶ added in v0.0.14
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 KRTimezone ¶ added in v0.0.12
func LastPathSegments ¶ added in v0.1.8
func LocalizeAndFormatPhoneNumber ¶ added in v0.0.14
func LocalizePhoneNumber ¶ added in v0.0.14
func LogIfError ¶
func LogIfError(vs ...interface{}) bool
func NormalizePhoneNumber ¶ added in v0.0.14
func PanicIfError ¶
func PanicIfError(vs ...interface{})
func PathSegments ¶ added in v0.1.8
func ServiceEndPoint ¶ added in v0.0.18
func SnapTo ¶
func SnapTo(snap *firestore.DocumentSnapshot, to interface{}) error
func StorageObjectUrl ¶ added in v0.2.2
func StorageObjectUrl(obj *storage.ObjectHandle) string
func StringMapOf ¶
func StringMapValuesToSlice ¶ added in v0.0.18
func TimeNowRef ¶
func UrlValuesOf ¶ added in v0.0.17
func ValidateCorpNum ¶ added in v0.0.13
func ValidateLocalCellPhoneNumber ¶ added in v0.0.13
func ValidateRRN ¶ added in v0.0.13
Types ¶
type AEFire ¶ added in v0.1.0
type AEFire struct { context.Context App *firebase.App FStore *firestore.Client Storage *storage.Client FCM *messaging.Client Auth *auth.Client IID *iid.Client DB *sqlx.DB // contains filtered or unexported fields }
func WithContext ¶ added in v0.2.0
func (*AEFire) BatchMerge ¶ added in v0.2.0
func (a *AEFire) BatchMerge(b *firestore.WriteBatch, doc *firestore.DocumentRef, pairs ...interface{}) *firestore.WriteBatch
func (*AEFire) BatchMergeObj ¶ added in v0.2.0
func (a *AEFire) BatchMergeObj(b *firestore.WriteBatch, path string, o interface{}) *firestore.WriteBatch
func (*AEFire) BatchMergePath ¶ added in v0.2.0
func (a *AEFire) BatchMergePath(b *firestore.WriteBatch, path string, pairs ...interface{}) *firestore.WriteBatch
func (*AEFire) ConnectDB ¶ added in v0.2.13
func (aef *AEFire) ConnectDB(param DatabaseParam) *AEFire
func (*AEFire) DeleteQueryResults ¶ added in v0.2.0
func (*AEFire) DocMerge ¶ added in v0.2.0
func (a *AEFire) DocMerge(doc *firestore.DocumentRef, pairs ...interface{}) error
func (*AEFire) DocMergeObj ¶ added in v0.2.0
func (a *AEFire) DocMergeObj(doc *firestore.DocumentRef, o interface{}) error
func (*AEFire) IdTokenAuth ¶ added in v0.1.5
func (*AEFire) MessageToTokens ¶ added in v0.2.0
func (*AEFire) QueryStringField ¶ added in v0.2.0
func (*AEFire) Snap ¶ added in v0.2.0
func (a *AEFire) Snap(path ...string) (*firestore.DocumentSnapshot, error)
func (*AEFire) SnapTo ¶ added in v0.2.0
func (a *AEFire) SnapTo(snap *firestore.DocumentSnapshot, to interface{}) error
func (*AEFire) StorageBucket ¶ added in v0.2.1
func (a *AEFire) StorageBucket() *storage.BucketHandle
func (*AEFire) StorageObject ¶ added in v0.2.1
func (a *AEFire) StorageObject(storageUrl string) *storage.ObjectHandle
func (*AEFire) StoreBytes ¶ added in v0.2.1
func (*AEFire) StoreReader ¶ added in v0.2.1
func (*AEFire) UpdateQueryResults ¶ added in v0.2.0
func (*AEFire) UserRecord ¶ added in v0.2.1
func (a *AEFire) UserRecord() *auth.UserRecord
func (*AEFire) ValidateIdToken ¶ added in v0.1.5
func (aef *AEFire) ValidateIdToken(next echo.HandlerFunc) echo.HandlerFunc
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 DatabaseParam ¶ added in v0.2.13
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) Channel ¶ added in v0.2.9
func (m *MessageBuilder) Channel(channel 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.