Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollectionRef ¶
type CollectionRef struct {
// contains filtered or unexported fields
}
CollectionRef is a wrapper around firestore's CollectionRef
func (CollectionRef) Documents ¶
func (cr CollectionRef) Documents(ctx context.Context) DocumentInteratorInterface
Documents will return an iterator for fetching all of the documents
func (CollectionRef) NewDoc ¶
func (cr CollectionRef) NewDoc() DocRefInterface
NewDoc will generate and return a new document
type CollectionRefInterface ¶
type CollectionRefInterface interface { NewDoc() DocRefInterface Documents(ctx context.Context) DocumentInteratorInterface }
CollectionRefInterface for firestore
type DBClient ¶
type DBClient struct {
// contains filtered or unexported fields
}
DBClient is a wrapper around the firestore client
func (DBClient) Collection ¶
func (dbc DBClient) Collection(path string) CollectionRefInterface
Collection will return a collection reference
type DBClientInterface ¶
type DBClientInterface interface {
Collection(path string) CollectionRefInterface
}
DBClientInterface is an interface that mimics the firestore client
type DocRefInterface ¶
type DocRefInterface interface {
Set(ctx context.Context, data interface{}, opts ...firestore.SetOption) (*firestore.WriteResult, error)
}
DocRefInterface is a wrapper around DocRef
type DocumentInteratorInterface ¶
type DocumentInteratorInterface interface {
Next() (*firestore.DocumentSnapshot, error)
}
DocumentInteratorInterface is a wrapper around firestore's document iterator
Click to show internal directories.
Click to hide internal directories.