mock

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FirebaseClientExtension

type FirebaseClientExtension struct {
	GetUserByPhoneNumberFn func(ctx context.Context, phone string) (*auth.UserRecord, error)
	CreateUserFn           func(ctx context.Context, user *auth.UserToCreate) (*auth.UserRecord, error)
	DeleteUserFn           func(ctx context.Context, uid string) error
	GetUserProfileByIDFn   func(ctx context.Context, id string, suspended bool) (*profileutils.UserProfile, error)
}

FirebaseClientExtension represents `auth.Client` fake

func (*FirebaseClientExtension) CreateUser

CreateUser ...

func (*FirebaseClientExtension) DeleteUser

func (f *FirebaseClientExtension) DeleteUser(ctx context.Context, uid string) error

DeleteUser ...

func (*FirebaseClientExtension) GetUserByPhoneNumber

func (f *FirebaseClientExtension) GetUserByPhoneNumber(ctx context.Context, phone string) (*auth.UserRecord, error)

GetUserByPhoneNumber ...

func (*FirebaseClientExtension) GetUserProfileByID

func (f *FirebaseClientExtension) GetUserProfileByID(ctx context.Context, id string, suspended bool) (*profileutils.UserProfile, error)

GetUserProfileByID ...

type FirestoreClientExtension

type FirestoreClientExtension struct {
	CollectionFn func(path string) *firestore.CollectionRef
	GetAllFn     func(ctx context.Context, query *fb.GetAllQuery) ([]*firestore.DocumentSnapshot, error)
	CreateFn     func(ctx context.Context, command *fb.CreateCommand) (*firestore.DocumentRef, error)
	UpdateFn     func(ctx context.Context, command *fb.UpdateCommand) error
	DeleteFn     func(ctx context.Context, command *fb.DeleteCommand) error
	GetFn        func(ctx context.Context, query *fb.GetSingleQuery) (*firestore.DocumentSnapshot, error)
}

FirestoreClientExtension represents a `firestore.Client` fake

func (*FirestoreClientExtension) Collection

Collection ...

func (*FirestoreClientExtension) Create

Create persists data to a firestore collection

func (*FirestoreClientExtension) Delete

func (f *FirestoreClientExtension) Delete(ctx context.Context, command *fb.DeleteCommand) error

Delete deletes data to a firestore collection

func (*FirestoreClientExtension) Get

Get retrieves data to a firestore collection

func (*FirestoreClientExtension) GetAll

GetAll retrieve a value from the store

func (*FirestoreClientExtension) Update

func (f *FirestoreClientExtension) Update(ctx context.Context, command *fb.UpdateCommand) error

Update updates data to a firestore collection

Jump to

Keyboard shortcuts

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