azdrivers

package module
v0.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2021 License: MIT Imports: 11 Imported by: 2

README

azdrivers

devlopment golang driver helpers

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AZMongoErrUnInitialized = errors.New("mongo driver - not initialized")
)

Functions

func InitGenericMongoDoc

func InitGenericMongoDoc(m map[string]interface{}) bson.M

func InitGenericSetMongoDoc

func InitGenericSetMongoDoc(key string, m map[string]interface{}) bson.M

Types

type AZFirebaseApp

type AZFirebaseApp struct {
	// contains filtered or unexported fields
}

func NewFirebaseApp

func NewFirebaseApp(credentailsPath string) (*AZFirebaseApp, error)

func (*AZFirebaseApp) DeleteUser

func (azfb *AZFirebaseApp) DeleteUser(uid string) error

func (*AZFirebaseApp) GetUser

func (azfb *AZFirebaseApp) GetUser(email string) (*auth.UserRecord, error)

func (*AZFirebaseApp) InitCustomToken

func (azfb *AZFirebaseApp) InitCustomToken(uid string, customData map[string]interface{}) (string, error)

func (*AZFirebaseApp) InitNewUser

func (azfb *AZFirebaseApp) InitNewUser(email, pwd, displayName string) (*auth.UserRecord, error)

func (*AZFirebaseApp) RevokeRefreshTokens

func (azfb *AZFirebaseApp) RevokeRefreshTokens(uid string) error

func (*AZFirebaseApp) UpdateUser

func (azfb *AZFirebaseApp) UpdateUser(uid string, updateData FirebaseUpdateOpts) (*auth.UserRecord, error)

func (*AZFirebaseApp) VerifyClientToken

func (azfb *AZFirebaseApp) VerifyClientToken(tokenString string, checkRevocation bool) (*auth.Token, error)

type AZMongoApp

type AZMongoApp struct {
	// contains filtered or unexported fields
}

func NewMongoApp

func NewMongoApp(uri string) (*AZMongoApp, error)

func (*AZMongoApp) ConcurrentMongoStreamParse

func (app *AZMongoApp) ConcurrentMongoStreamParse(dbName, collectionName string, closeOnFinish bool, streamCallback func(data bson.M))

func (*AZMongoApp) GetAllDatabases

func (app *AZMongoApp) GetAllDatabases() ([]string, error)

func (*AZMongoApp) GetCollection

func (app *AZMongoApp) GetCollection(dbName, collectionName string) (*mongo.Collection, error)

func (*AZMongoApp) InsertIntoCollection

func (app *AZMongoApp) InsertIntoCollection(dbName, collectionName string, data map[string]interface{}, postOpDisconnect bool, opts *options.InsertOneOptions) (*mongo.InsertOneResult, error)

func (*AZMongoApp) IsInit

func (app *AZMongoApp) IsInit() bool

func (*AZMongoApp) UpdateCollection

func (app *AZMongoApp) UpdateCollection(opKey, dbName, collectionName string, filter interface{}, data map[string]interface{}, postOpDisconnect bool, opts *options.UpdateOptions) (*mongo.UpdateResult, error)

type DriverKeyType added in v0.0.11

type DriverKeyType string
const (
	MongoKeyType    DriverKeyType = "mongo"
	FirebaseKeyType DriverKeyType = "firebase"
)

type FirebaseUpdateOpts

type FirebaseUpdateOpts struct {
	Email         string `json:"email"`
	EmailVerified bool   `json:"email_verified"`
	PhoneNumber   string `json:"phone_number"`
	Password      string `json:"password"`
	DisplayName   string `json:"display_name"`
	PhotoURL      string `json:"photo_url"`
	Disabled      bool   `json:"disabled"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL