Documentation ¶
Index ¶
- type MongoEntity
- type MongoEntityId
- type MongoRepository
- type MongoRepositoryImpl
- func (m *MongoRepositoryImpl[E, ID]) Delete(e E) (err error)
- func (m *MongoRepositoryImpl[E, ID]) DeleteAll(e ...E) (count int64, err error)
- func (m *MongoRepositoryImpl[E, ID]) DeleteAllById(id ...ID) (count int64, err error)
- func (m *MongoRepositoryImpl[E, ID]) DeleteById(id ID) (err error)
- func (m *MongoRepositoryImpl[E, ID]) FindAllById(id ...ID) (e []E, err error)
- func (m *MongoRepositoryImpl[E, ID]) FindById(id ID) (e E, err error)
- func (m *MongoRepositoryImpl[E, ID]) Save(e E) (err error)
- func (m *MongoRepositoryImpl[E, ID]) SaveAll(e ...E) (count int64, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoEntity ¶
type MongoEntity[ID MongoEntityId] interface { gpa.Entity[ID] Collection() string }
type MongoEntityId ¶
type MongoRepository ¶
type MongoRepository[E MongoEntity[ID], ID MongoEntityId] interface { gpa.CrudRepository[E, ID] }
func NewMongoRepository ¶
func NewMongoRepository[E MongoEntity[ID], ID MongoEntityId](collection *mongo.Collection, ctx context.Context) MongoRepository[E, ID]
type MongoRepositoryImpl ¶
type MongoRepositoryImpl[E MongoEntity[ID], ID MongoEntityId] struct { // contains filtered or unexported fields }
func NewMongoRepositoryImpl ¶
func NewMongoRepositoryImpl[E MongoEntity[ID], ID MongoEntityId](collection *mongo.Collection, ctx context.Context) *MongoRepositoryImpl[E, ID]
func (*MongoRepositoryImpl[E, ID]) Delete ¶
func (m *MongoRepositoryImpl[E, ID]) Delete(e E) (err error)
func (*MongoRepositoryImpl[E, ID]) DeleteAll ¶
func (m *MongoRepositoryImpl[E, ID]) DeleteAll(e ...E) (count int64, err error)
func (*MongoRepositoryImpl[E, ID]) DeleteAllById ¶
func (m *MongoRepositoryImpl[E, ID]) DeleteAllById(id ...ID) (count int64, err error)
func (*MongoRepositoryImpl[E, ID]) DeleteById ¶
func (m *MongoRepositoryImpl[E, ID]) DeleteById(id ID) (err error)
func (*MongoRepositoryImpl[E, ID]) FindAllById ¶
func (m *MongoRepositoryImpl[E, ID]) FindAllById(id ...ID) (e []E, err error)
func (*MongoRepositoryImpl[E, ID]) FindById ¶
func (m *MongoRepositoryImpl[E, ID]) FindById(id ID) (e E, err error)
func (*MongoRepositoryImpl[E, ID]) Save ¶
func (m *MongoRepositoryImpl[E, ID]) Save(e E) (err error)
func (*MongoRepositoryImpl[E, ID]) SaveAll ¶
func (m *MongoRepositoryImpl[E, ID]) SaveAll(e ...E) (count int64, err error)
Click to show internal directories.
Click to hide internal directories.