Documentation ¶
Index ¶
- func EnsureIndexes(ctx context.Context, c *mongo.Collection) error
- type Bootstraper
- type Collection
- type Query
- type Storage
- func (s *Storage) Delete(ctx context.Context, trackerID types.ID) error
- func (s *Storage) Find(ctx context.Context, trackerID types.ID) (*generator.Tracker, error)
- func (s *Storage) Insert(ctx context.Context, t *generator.Tracker) error
- func (s *Storage) Update(ctx context.Context, t *generator.Tracker) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureIndexes ¶
func EnsureIndexes(ctx context.Context, c *mongo.Collection) error
Types ¶
type Bootstraper ¶
type Bootstraper struct {
// contains filtered or unexported fields
}
func NewBootstraper ¶
func NewBootstraper(c Collection) *Bootstraper
func (*Bootstraper) LoadTrackers ¶
func (*Bootstraper) UnloadTrackers ¶
type Collection ¶
type Collection interface { Find(ctx context.Context, filter interface{}, opts ...*options.FindOptions) (cur *mongo.Cursor, err error) FindOne(ctx context.Context, filter interface{}, opts ...*options.FindOneOptions) *mongo.SingleResult InsertOne(ctx context.Context, document interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error) DeleteOne(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error) UpdateOne(ctx context.Context, filter interface{}, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error) BulkWrite(ctx context.Context, models []mongo.WriteModel, opts ...*options.BulkWriteOptions) (*mongo.BulkWriteResult, error) Aggregate(ctx context.Context, pipeline interface{}, opts ...*options.AggregateOptions) (*mongo.Cursor, error) }
type Query ¶
type Query struct {
// contains filtered or unexported fields
}
func NewQuery ¶
func NewQuery(c Collection) *Query
func (*Query) SearchTrackers ¶
Click to show internal directories.
Click to hide internal directories.