Documentation ¶
Index ¶
- Constants
- func Name(name string) func(*App)
- type ActionCodeInfo
- type AdditionalUserInfo
- type App
- type ApplicationVerifier
- type Auth
- func (a *Auth) ApplyActionCode(code string) error
- func (a *Auth) CheckActionCode(code string) (*ActionCodeInfo, error)
- func (a *Auth) ConfirmPasswordReset(code string, newPassword string) error
- func (a *Auth) CreateUserAndRetrieveDataWithEmailAndPassword(email string, password string) (*UserCredential, error)
- func (a *Auth) CreateUserWithEmailAndPassword(email string, password string) (*User, error)
- func (a *Auth) FetchProvidersForEmail(email string) (*js.Object, error)
- func (a *Auth) OnAuthStateChanged(next func(*User), args ...interface{}) *js.Object
- func (a *Auth) OnIDTokenChanged(next func(*User), args ...interface{}) *js.Object
- func (a *Auth) SendPasswordResetEmail(email, actionCodeSettings string) error
- func (a *Auth) SetPersistence(persistence Persistence) error
- func (a *Auth) SignInAndRetrieveDataWithCredential(credential *AuthCredential) (*UserCredential, error)
- func (a *Auth) SignInAndRetrieveDataWithCustomToken(token string) (*UserCredential, error)
- func (a *Auth) SignInAndRetrieveDataWithEmailAndPassword(email, password string) (*UserCredential, error)
- func (a *Auth) SignInAnonymously() (*User, error)
- func (a *Auth) SignInAnonymouslyAndRetrieveData() (*UserCredential, error)
- func (a *Auth) SignInWithCustomToken(token string) (*User, error)
- func (a *Auth) SignInWithEmailAndPassword(email, password string) (*User, error)
- func (a *Auth) SignInWithPhoneNumber(phoneNumber string, applicationVerifier *ApplicationVerifier) (*ConfirmationResult, error)
- func (a *Auth) SignOut() error
- func (a *Auth) UseDeviceLanguage()
- func (a *Auth) VerifyPasswordResetCode(code string) (string, error)
- type AuthCredential
- type CollectionReference
- type ConfirmationResult
- type DocumentChange
- type DocumentReference
- func (d *DocumentReference) Collection(collectionPath string) *CollectionReference
- func (d *DocumentReference) Delete() *Promise
- func (d *DocumentReference) Get() *Promise
- func (d *DocumentReference) OnSnapshot(args ...interface{})
- func (d *DocumentReference) Set(data interface{}, options interface{}) *Promise
- func (d *DocumentReference) Update(args ...interface{}) *Promise
- type DocumentSnapshot
- type Error
- type Firestore
- func (f *Firestore) Batch() *WriteBatch
- func (f *Firestore) Collection(collectionPath string) *CollectionReference
- func (f *Firestore) Doc(documentPath string) *DocumentReference
- func (f *Firestore) EnablePersistence() error
- func (f *Firestore) RunTransaction(updateFunc func(*Transaction)) error
- func (f *Firestore) SetLogLevel(logLevel string)
- func (f *Firestore) Settings(settings map[string]string)
- type FirestoreQuery
- func (q *FirestoreQuery) EndAt(args ...interface{}) *FirestoreQuery
- func (q *FirestoreQuery) EndBefore(args ...interface{}) *FirestoreQuery
- func (q *FirestoreQuery) Get(args ...interface{}) *FirestoreQuerySnapshot
- func (q *FirestoreQuery) Limit(limit int) *FirestoreQuery
- func (q *FirestoreQuery) OrderBy(fieldPath string, directionStr *string) *FirestoreQuery
- func (q *FirestoreQuery) StartAfter(args ...interface{}) *FirestoreQuery
- func (q *FirestoreQuery) StartAt(args ...interface{}) *FirestoreQuery
- func (q *FirestoreQuery) Where(fieldPath string, opStr string, value interface{}) *FirestoreQuery
- type FirestoreQueryMetadata
- type FirestoreQuerySnapshot
- type FirestoreSnapshotMetadata
- type GeoPoint
- type OAuthCredential
- type Operation
- type Options
- type Persistence
- type Promise
- func (p *Promise) All(values ...interface{}) *Promise
- func (p *Promise) Catch(onReject ...interface{}) *Promise
- func (p *Promise) Convert() error
- func (p *Promise) ConvertWithResult() (*js.Object, error)
- func (p *Promise) Reject(err interface{}) *Promise
- func (p *Promise) Resolve(value interface{}) *Promise
- func (p *Promise) Then(args ...interface{}) *Promise
- type Transaction
- func (t *Transaction) Delete() *Transaction
- func (t *Transaction) Get(documentRef *DocumentReference) (*DocumentSnapshot, error)
- func (t *Transaction) Set(documentRef *DocumentReference, data interface{}, options interface{}) *Transaction
- func (t *Transaction) Update(documentRef *DocumentReference, args ...interface{}) *Transaction
- type User
- type UserCredential
- type UserInfo
- type UserMetadata
- type WriteBatch
Constants ¶
View Source
const ( Local Persistence = "LOCAL" None Persistence = "NONE" Session Persistence = "SESSION" PasswordReset Operation = "PASSWORD_RESET" VerifyEmail Operation = "VERIFY_EMAIL" RecoverEmail Operation = "RECOVERY_EMAIL" )
View Source
const SDKVersion = "4.8.1"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActionCodeInfo ¶
type AdditionalUserInfo ¶
type ApplicationVerifier ¶
func (*ApplicationVerifier) Verify ¶
func (a *ApplicationVerifier) Verify() (string, error)
type Auth ¶
type Auth struct { *js.Object Persistence Persistence `js:"Persistence"` App *App `js:"app"` CurrentUser *User `js:"currentUser"` LanguageCode string `js:"languageCode"` }
func (*Auth) ApplyActionCode ¶
func (*Auth) CheckActionCode ¶
func (a *Auth) CheckActionCode(code string) (*ActionCodeInfo, error)
func (*Auth) ConfirmPasswordReset ¶
func (*Auth) CreateUserAndRetrieveDataWithEmailAndPassword ¶
func (a *Auth) CreateUserAndRetrieveDataWithEmailAndPassword(email string, password string) (*UserCredential, error)
func (*Auth) CreateUserWithEmailAndPassword ¶
func (*Auth) FetchProvidersForEmail ¶
func (*Auth) OnAuthStateChanged ¶
func (*Auth) OnIDTokenChanged ¶
func (*Auth) SendPasswordResetEmail ¶
func (*Auth) SetPersistence ¶
func (a *Auth) SetPersistence(persistence Persistence) error
func (*Auth) SignInAndRetrieveDataWithCredential ¶
func (a *Auth) SignInAndRetrieveDataWithCredential(credential *AuthCredential) (*UserCredential, error)
func (*Auth) SignInAndRetrieveDataWithCustomToken ¶
func (a *Auth) SignInAndRetrieveDataWithCustomToken(token string) (*UserCredential, error)
func (*Auth) SignInAndRetrieveDataWithEmailAndPassword ¶
func (a *Auth) SignInAndRetrieveDataWithEmailAndPassword(email, password string) (*UserCredential, error)
func (*Auth) SignInAnonymously ¶
func (*Auth) SignInAnonymouslyAndRetrieveData ¶
func (a *Auth) SignInAnonymouslyAndRetrieveData() (*UserCredential, error)
func (*Auth) SignInWithCustomToken ¶
func (*Auth) SignInWithEmailAndPassword ¶
func (*Auth) SignInWithPhoneNumber ¶
func (a *Auth) SignInWithPhoneNumber(phoneNumber string, applicationVerifier *ApplicationVerifier) (*ConfirmationResult, error)
func (*Auth) UseDeviceLanguage ¶
func (a *Auth) UseDeviceLanguage()
type AuthCredential ¶
type CollectionReference ¶
type CollectionReference struct { *FirestoreQuery ID string `js:"id"` Parent *DocumentReference `js:"parent"` }
func (*CollectionReference) Add ¶
func (c *CollectionReference) Add(data interface{}) (*DocumentReference, error)
type ConfirmationResult ¶
func (*ConfirmationResult) Confirm ¶
func (c *ConfirmationResult) Confirm(verificationCode string) (*UserCredential, error)
type DocumentChange ¶
type DocumentReference ¶
type DocumentReference struct { *js.Object Firestore *Firestore `js:"firestore"` ID string `js:"id"` Parent *CollectionReference `js:"parent"` }
func (*DocumentReference) Collection ¶
func (d *DocumentReference) Collection(collectionPath string) *CollectionReference
func (*DocumentReference) Delete ¶
func (d *DocumentReference) Delete() *Promise
func (*DocumentReference) Get ¶
func (d *DocumentReference) Get() *Promise
func (*DocumentReference) OnSnapshot ¶
func (d *DocumentReference) OnSnapshot(args ...interface{})
func (*DocumentReference) Set ¶
func (d *DocumentReference) Set(data interface{}, options interface{}) *Promise
func (*DocumentReference) Update ¶
func (d *DocumentReference) Update(args ...interface{}) *Promise
type DocumentSnapshot ¶
type DocumentSnapshot struct { *js.Object Exists string `js:"exists"` ID string `js:"id"` Metadata FirestoreSnapshotMetadata `js:"metadata"` Ref *DocumentReference `js:"ref"` }
func (*DocumentSnapshot) Data ¶
func (d *DocumentSnapshot) Data() *js.Object
type Error ¶
type Firestore ¶
func (*Firestore) Batch ¶
func (f *Firestore) Batch() *WriteBatch
func (*Firestore) Collection ¶
func (f *Firestore) Collection(collectionPath string) *CollectionReference
func (*Firestore) Doc ¶
func (f *Firestore) Doc(documentPath string) *DocumentReference
func (*Firestore) EnablePersistence ¶
func (*Firestore) RunTransaction ¶
func (f *Firestore) RunTransaction(updateFunc func(*Transaction)) error
func (*Firestore) SetLogLevel ¶
type FirestoreQuery ¶
func (*FirestoreQuery) EndAt ¶
func (q *FirestoreQuery) EndAt(args ...interface{}) *FirestoreQuery
func (*FirestoreQuery) EndBefore ¶
func (q *FirestoreQuery) EndBefore(args ...interface{}) *FirestoreQuery
func (*FirestoreQuery) Get ¶
func (q *FirestoreQuery) Get(args ...interface{}) *FirestoreQuerySnapshot
func (*FirestoreQuery) Limit ¶
func (q *FirestoreQuery) Limit(limit int) *FirestoreQuery
func (*FirestoreQuery) OrderBy ¶
func (q *FirestoreQuery) OrderBy(fieldPath string, directionStr *string) *FirestoreQuery
func (*FirestoreQuery) StartAfter ¶
func (q *FirestoreQuery) StartAfter(args ...interface{}) *FirestoreQuery
func (*FirestoreQuery) StartAt ¶
func (q *FirestoreQuery) StartAt(args ...interface{}) *FirestoreQuery
func (*FirestoreQuery) Where ¶
func (q *FirestoreQuery) Where(fieldPath string, opStr string, value interface{}) *FirestoreQuery
type FirestoreQueryMetadata ¶
type FirestoreQuerySnapshot ¶
type FirestoreQuerySnapshot struct { *js.Object DocChanges []*DocumentChange `js:"docChanges"` Docs []*DocumentSnapshot `js:"docs"` Empty bool `js:"empty"` Metadata *FirestoreQueryMetadata `js:"metadata"` Query *FirestoreQuery `js:"query"` Size int `js:"size"` }
func (*FirestoreQuerySnapshot) ForEach ¶
func (q *FirestoreQuerySnapshot) ForEach(callback func(*DocumentSnapshot), thisArg *js.Object)
type GeoPoint ¶
type GeoPoint struct { *js.Object Latitude string `js:"latitude"` Longitude string `js:"longitude"` }
func NewGeoPoint ¶
type OAuthCredential ¶
type OAuthCredential struct { *AuthCredential AccessToken string `js:"accessToken"` IDToken string `js:"idToken"` Secret string `js:"secret"` }
type Persistence ¶
type Persistence string
type Transaction ¶
func (*Transaction) Delete ¶
func (t *Transaction) Delete() *Transaction
func (*Transaction) Get ¶
func (t *Transaction) Get(documentRef *DocumentReference) (*DocumentSnapshot, error)
func (*Transaction) Set ¶
func (t *Transaction) Set(documentRef *DocumentReference, data interface{}, options interface{}) *Transaction
func (*Transaction) Update ¶
func (t *Transaction) Update(documentRef *DocumentReference, args ...interface{}) *Transaction
type UserCredential ¶
type UserCredential struct { *js.Object User *User `js:"user"` Credential *AuthCredential `js:"credential"` OperationType string `js:"operationType"` AdditionalUserInfo *AdditionalUserInfo `js:"additionalUserInfo"` }
type UserMetadata ¶
type WriteBatch ¶
func (*WriteBatch) Commit ¶
func (w *WriteBatch) Commit() error
func (*WriteBatch) Delete ¶
func (w *WriteBatch) Delete() *WriteBatch
func (*WriteBatch) Set ¶
func (w *WriteBatch) Set(documentRef *DocumentReference) *WriteBatch
func (*WriteBatch) Update ¶
func (w *WriteBatch) Update(documentRef *DocumentReference, args ...interface{}) *WriteBatch
Click to show internal directories.
Click to hide internal directories.