Versions in this module Expand all Collapse all v0 v0.1.1 Oct 1, 2022 v0.1.0 Feb 11, 2022 Changes in this version + var ErrNotFound = errors.New("snapshot not found") + type Option func(*Store) + func Collection(name string) Option + func Database(name string) Option + func URL(url string) Option + type Store struct + func New(opts ...Option) *Store + func (s *Store) Connect(ctx context.Context) (*mongo.Client, error) + func (s *Store) Delete(ctx context.Context, snap snapshot.Snapshot) error + func (s *Store) Latest(ctx context.Context, name string, id uuid.UUID) (snapshot.Snapshot, error) + func (s *Store) Limit(ctx context.Context, name string, id uuid.UUID, v int) (snapshot.Snapshot, error) + func (s *Store) Query(ctx context.Context, q snapshot.Query) (<-chan snapshot.Snapshot, <-chan error, error) + func (s *Store) Save(ctx context.Context, snap snapshot.Snapshot) error + func (s *Store) Version(ctx context.Context, name string, id uuid.UUID, version int) (snapshot.Snapshot, error)