mongodb

package
v1.19.0-beta.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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 any) ([]*m.Metadata, error)

FindList retrieves metadata from the mongodb all metadata or a list by specify metadata.

func (*MetadataMongoDBRepository) Update

func (mmr *MetadataMongoDBRepository) Update(ctx context.Context, collection, id string, metadata map[string]any) error

Update an metadata entity into mongodb.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL