Documentation ¶
Index ¶
- type MockFirestoreServer
- func (m *MockFirestoreServer) BatchGetDocuments(req *pb.BatchGetDocumentsRequest, stream pb.Firestore_BatchGetDocumentsServer) error
- func (m *MockFirestoreServer) BatchWrite(context.Context, *pb.BatchWriteRequest) (*pb.BatchWriteResponse, error)
- func (m *MockFirestoreServer) BeginTransaction(context.Context, *pb.BeginTransactionRequest) (*pb.BeginTransactionResponse, error)
- func (m *MockFirestoreServer) ClearStore()
- func (m *MockFirestoreServer) Commit(ctx context.Context, req *pb.CommitRequest) (*pb.CommitResponse, error)
- func (m *MockFirestoreServer) CreateDocument(ctx context.Context, req *pb.CreateDocumentRequest) (*pb.Document, error)
- func (m *MockFirestoreServer) DeleteDocument(ctx context.Context, req *pb.DeleteDocumentRequest) (*emptypb.Empty, error)
- func (m *MockFirestoreServer) GetDocument(ctx context.Context, req *pb.GetDocumentRequest) (*pb.Document, error)
- func (m *MockFirestoreServer) ListCollectionIds(context.Context, *pb.ListCollectionIdsRequest) (*pb.ListCollectionIdsResponse, error)
- func (m *MockFirestoreServer) ListDocuments(context.Context, *pb.ListDocumentsRequest) (*pb.ListDocumentsResponse, error)
- func (m *MockFirestoreServer) Listen(pb.Firestore_ListenServer) error
- func (m *MockFirestoreServer) PartitionQuery(context.Context, *pb.PartitionQueryRequest) (*pb.PartitionQueryResponse, error)
- func (m *MockFirestoreServer) Rollback(context.Context, *pb.RollbackRequest) (*emptypb.Empty, error)
- func (m *MockFirestoreServer) RunQuery(*pb.RunQueryRequest, pb.Firestore_RunQueryServer) error
- func (m *MockFirestoreServer) UpdateDocument(context.Context, *pb.UpdateDocumentRequest) (*pb.Document, error)
- func (m *MockFirestoreServer) Write(pb.Firestore_WriteServer) error
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 (m *MockFirestoreServer) BatchGetDocuments(req *pb.BatchGetDocumentsRequest, stream pb.Firestore_BatchGetDocumentsServer) error
func (*MockFirestoreServer) BatchWrite ¶
func (m *MockFirestoreServer) BatchWrite(context.Context, *pb.BatchWriteRequest) (*pb.BatchWriteResponse, error)
func (*MockFirestoreServer) BeginTransaction ¶
func (m *MockFirestoreServer) BeginTransaction(context.Context, *pb.BeginTransactionRequest) (*pb.BeginTransactionResponse, error)
func (*MockFirestoreServer) ClearStore ¶
func (m *MockFirestoreServer) ClearStore()
func (*MockFirestoreServer) Commit ¶
func (m *MockFirestoreServer) Commit(ctx context.Context, req *pb.CommitRequest) (*pb.CommitResponse, error)
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 (m *MockFirestoreServer) ListCollectionIds(context.Context, *pb.ListCollectionIdsRequest) (*pb.ListCollectionIdsResponse, error)
func (*MockFirestoreServer) ListDocuments ¶
func (m *MockFirestoreServer) ListDocuments(context.Context, *pb.ListDocumentsRequest) (*pb.ListDocumentsResponse, error)
func (*MockFirestoreServer) Listen ¶
func (m *MockFirestoreServer) Listen(pb.Firestore_ListenServer) error
func (*MockFirestoreServer) PartitionQuery ¶
func (m *MockFirestoreServer) PartitionQuery(context.Context, *pb.PartitionQueryRequest) (*pb.PartitionQueryResponse, error)
func (*MockFirestoreServer) Rollback ¶
func (m *MockFirestoreServer) Rollback(context.Context, *pb.RollbackRequest) (*emptypb.Empty, error)
func (*MockFirestoreServer) RunQuery ¶
func (m *MockFirestoreServer) RunQuery(*pb.RunQueryRequest, pb.Firestore_RunQueryServer) error
func (*MockFirestoreServer) UpdateDocument ¶
func (m *MockFirestoreServer) UpdateDocument(context.Context, *pb.UpdateDocumentRequest) (*pb.Document, error)
func (*MockFirestoreServer) Write ¶
func (m *MockFirestoreServer) Write(pb.Firestore_WriteServer) error
Click to show internal directories.
Click to hide internal directories.