Documentation ¶
Index ¶
- Variables
- type DB
- type Fetcher
- func (f Fetcher[Model]) Fetch(ctx context.Context, id string) (Model, error)
- func (f Fetcher[Model]) FetchFirst(ctx context.Context, queryFunc QueryFunc) (Model, error)
- func (f Fetcher[Model]) FetchMany(ctx context.Context, ids ...string) ([]Model, error)
- func (f Fetcher[Model]) Query(ctx context.Context, queryFunc QueryFunc) ([]Model, error)
- func (f Fetcher[Model]) Type() model.Type
- func (f Fetcher[Model]) Zero() Model
- type QueryFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var NotFound = errors.New("not found")
Functions ¶
This section is empty.
Types ¶
type DB ¶
func (*DB) CollectionFor ¶
func (db *DB) CollectionFor(model model.Type) *firestore.CollectionRef
Click to show internal directories.
Click to hide internal directories.