Versions in this module Expand all Collapse all v0 v0.1.0 Jul 19, 2026 Changes in this version + var ErrAlreadyExists = errors.New("document already exists") + var ErrEmptyID = errors.New("document id is empty") + var ErrNotFound = errors.New("document not found") + type Document struct + ID string + Model T + type Repository struct + func NewRepository[T any](client *firestore.Client, collectionPath string) (Repository[T], error) + func (r Repository[T]) Collection() *firestore.CollectionRef + func (r Repository[T]) Create(ctx context.Context, model T) (Document[T], error) + func (r Repository[T]) CreateWithID(ctx context.Context, id string, model T) (Document[T], error) + func (r Repository[T]) Delete(ctx context.Context, id string) error + func (r Repository[T]) Documents(ctx context.Context, query firestore.Query) ([]Document[T], error) + func (r Repository[T]) Get(ctx context.Context, id string) (Document[T], error) + func (r Repository[T]) GetAll(ctx context.Context) ([]Document[T], error) + func (r Repository[T]) Query() firestore.Query + func (r Repository[T]) RunTransaction(ctx context.Context, ...) error + func (r Repository[T]) Set(ctx context.Context, doc Document[T]) (Document[T], error) + func (r Repository[T]) Tx(tx *firestore.Transaction) TxRepository[T] + func (r Repository[T]) Update(ctx context.Context, id string, updates []firestore.Update) error + type TxRepository struct + func (t TxRepository[T]) Create(model T) (Document[T], error) + func (t TxRepository[T]) CreateWithID(id string, model T) (Document[T], error) + func (t TxRepository[T]) Delete(id string) error + func (t TxRepository[T]) Get(id string) (Document[T], error) + func (t TxRepository[T]) Set(doc Document[T]) (Document[T], error) + func (t TxRepository[T]) Update(id string, updates []firestore.Update) error