mock_firestore

package
v0.14.2-rc.8 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockFirestoreServer

type MockFirestoreServer struct {
	pb.UnimplementedFirestoreServer
	Store map[string]map[string]map[string]*pb.Value
}

Mock Firestore implementation for plugin testing

func (*MockFirestoreServer) BatchGetDocuments

func (*MockFirestoreServer) BatchWrite

func (*MockFirestoreServer) BeginTransaction

func (*MockFirestoreServer) ClearStore

func (m *MockFirestoreServer) ClearStore()

func (*MockFirestoreServer) Commit

func (*MockFirestoreServer) CreateDocument

func (m *MockFirestoreServer) CreateDocument(ctx context.Context, req *pb.CreateDocumentRequest) (*pb.Document, error)

func (*MockFirestoreServer) DeleteDocument

func (m *MockFirestoreServer) DeleteDocument(ctx context.Context, req *pb.DeleteDocumentRequest) (*emptypb.Empty, error)

func (*MockFirestoreServer) GetDocument

func (m *MockFirestoreServer) GetDocument(ctx context.Context, req *pb.GetDocumentRequest) (*pb.Document, error)

NOTE: On handling paths..., the collection and resourceId are the last two components The full resource path of the document. A document "doc-1" in collection "coll-1" would be: "projects/P/databases/D/documents/coll-1/doc-1".

func (*MockFirestoreServer) ListCollectionIds

func (*MockFirestoreServer) ListDocuments

func (*MockFirestoreServer) Listen

func (*MockFirestoreServer) PartitionQuery

func (*MockFirestoreServer) Rollback

func (*MockFirestoreServer) RunQuery

func (*MockFirestoreServer) UpdateDocument

func (*MockFirestoreServer) Write

Jump to

Keyboard shortcuts

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