Documentation ¶
Index ¶
- type MetadataMongoDBRepository
- func (mmr *MetadataMongoDBRepository) Create(ctx context.Context, collection string, metadata *m.Metadata) error
- func (mmr *MetadataMongoDBRepository) Delete(ctx context.Context, collection, id string) error
- func (mmr *MetadataMongoDBRepository) FindByEntity(ctx context.Context, collection, id string) (*m.Metadata, error)
- func (mmr *MetadataMongoDBRepository) FindList(ctx context.Context, collection string, filter commonHTTP.QueryHeader) ([]*m.Metadata, error)
- func (mmr *MetadataMongoDBRepository) Update(ctx context.Context, collection, id string, metadata map[string]any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MetadataMongoDBRepository ¶
type MetadataMongoDBRepository struct { Database string // contains filtered or unexported fields }
MetadataMongoDBRepository is a MongoDD-specific implementation of the MetadataRepository.
func NewMetadataMongoDBRepository ¶
func NewMetadataMongoDBRepository(mc *mmongo.MongoConnection) *MetadataMongoDBRepository
NewMetadataMongoDBRepository returns a new instance of MetadataMongoDBLRepository using the given MongoDB connection.
func (*MetadataMongoDBRepository) Create ¶
func (mmr *MetadataMongoDBRepository) Create(ctx context.Context, collection string, metadata *m.Metadata) error
Create inserts a new metadata entity into mongodb.
func (*MetadataMongoDBRepository) Delete ¶
func (mmr *MetadataMongoDBRepository) Delete(ctx context.Context, collection, id string) error
Delete an metadata entity into mongodb.
func (*MetadataMongoDBRepository) FindByEntity ¶
func (mmr *MetadataMongoDBRepository) FindByEntity(ctx context.Context, collection, id string) (*m.Metadata, error)
FindByEntity retrieves a metadata from the mongodb using the provided entity_id.
func (*MetadataMongoDBRepository) FindList ¶
func (mmr *MetadataMongoDBRepository) FindList(ctx context.Context, collection string, filter commonHTTP.QueryHeader) ([]*m.Metadata, error)
FindList retrieves metadata from the mongodb all metadata or a list by specify metadata.
Click to show internal directories.
Click to hide internal directories.