Documentation ¶
Index ¶
- type ObjectMongoRepository
- func (store *ObjectMongoRepository) Create(ctx context.Context, obj data.Object) error
- func (store *ObjectMongoRepository) Delete(ctx context.Context, ns data.Namespace, id data.ObjectID) error
- func (store *ObjectMongoRepository) Exists(ctx context.Context, ns data.Namespace, id data.ObjectID) (bool, error)
- func (store *ObjectMongoRepository) Find(ctx context.Context, ns data.Namespace, id data.ObjectID) (*data.Object, error)
- func (store *ObjectMongoRepository) FindAllByStatus(ctx context.Context, status data.ObjectStatus) ([]data.Object, error)
- func (store *ObjectMongoRepository) IsUploaded(ctx context.Context, ns data.Namespace, id data.ObjectID) (bool, error)
- func (store *ObjectMongoRepository) SetCompleted(ctx context.Context, ns data.Namespace, id data.ObjectID) error
- func (store *ObjectMongoRepository) Update(ctx context.Context, ns data.Namespace, id data.ObjectID, size int64, ...) error
- func (store *ObjectMongoRepository) Usage(ctx context.Context, ns data.Namespace) (int64, error)
- type RefMongoRepository
- func (store *RefMongoRepository) Create(ctx context.Context, ref data.Ref) error
- func (store *RefMongoRepository) Delete(ctx context.Context, ns data.Namespace, name data.RefName) error
- func (store *RefMongoRepository) Exists(ctx context.Context, ns data.Namespace, name data.RefName) (bool, error)
- func (store *RefMongoRepository) Find(ctx context.Context, ns data.Namespace, name data.RefName) (*data.Ref, error)
- func (store *RefMongoRepository) Update(ctx context.Context, ref data.Ref) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ObjectMongoRepository ¶
type ObjectMongoRepository struct { db.ObjectRepository // contains filtered or unexported fields }
ObjectMongoRepository implementations of db.ObjectRepository for MongoDb repo
func NewObjectMongoRepository ¶
func NewObjectMongoRepository(logger logger.Logger, db *intMongo.Db) *ObjectMongoRepository
NewObjectMongoRepository creates new instance of ObjectMongoRepository
func (*ObjectMongoRepository) Delete ¶
func (store *ObjectMongoRepository) Delete(ctx context.Context, ns data.Namespace, id data.ObjectID) error
Delete removes object in mongo database
func (*ObjectMongoRepository) Exists ¶
func (store *ObjectMongoRepository) Exists(ctx context.Context, ns data.Namespace, id data.ObjectID) (bool, error)
Exists checks if data.Object exists in mongo database
func (*ObjectMongoRepository) Find ¶
func (store *ObjectMongoRepository) Find(ctx context.Context, ns data.Namespace, id data.ObjectID) (*data.Object, error)
Find looking up data.Object in database
func (*ObjectMongoRepository) FindAllByStatus ¶
func (store *ObjectMongoRepository) FindAllByStatus(ctx context.Context, status data.ObjectStatus) ([]data.Object, error)
FindAllByStatus returns all object with specific status
func (*ObjectMongoRepository) IsUploaded ¶
func (store *ObjectMongoRepository) IsUploaded(ctx context.Context, ns data.Namespace, id data.ObjectID) (bool, error)
IsUploaded checks if data.Object was data.Uploaded
func (*ObjectMongoRepository) SetCompleted ¶
func (store *ObjectMongoRepository) SetCompleted(ctx context.Context, ns data.Namespace, id data.ObjectID) error
SetCompleted change data.Object status to data.Uploaded
type RefMongoRepository ¶
type RefMongoRepository struct { db.RefRepository // contains filtered or unexported fields }
RefMongoRepository implementations of db.RefRepository for MongoDb repo
func NewRefMongoRepository ¶
func NewRefMongoRepository(logger logger.Logger, db *intMongo.Db) *RefMongoRepository
NewRefMongoRepository creates new instance of RefMongoRepository
func (*RefMongoRepository) Delete ¶
func (store *RefMongoRepository) Delete(ctx context.Context, ns data.Namespace, name data.RefName) error
Delete removes data.Ref from mongo database
func (*RefMongoRepository) Exists ¶
func (store *RefMongoRepository) Exists(ctx context.Context, ns data.Namespace, name data.RefName) (bool, error)
Exists checks if data.Object exists in mongo database