Documentation
¶
Index ¶
- type GormRepo
- type MongoCollectionRepodeprecated
- func (m *MongoCollectionRepo[T]) Collection() *mongo.Collection
- func (m *MongoCollectionRepo[T]) Database() *mongo.Database
- func (m *MongoCollectionRepo[T]) Dispose() error
- func (m *MongoCollectionRepo[T]) FindOne(filter interface{}) (T, error)
- func (m *MongoCollectionRepo[T]) FindPagination(filter interface{}, sort interface{}, offset int64, limit int64) (result []T, total int, err error)
- func (m *MongoCollectionRepo[T]) Status() error
- type MongoDatasourceCollection
- func (m *MongoDatasourceCollection[T]) Collection() *mongo.Collection
- func (m *MongoDatasourceCollection[T]) FindOne(filter interface{}) (T, error)
- func (m *MongoDatasourceCollection[T]) FindPagination(filter interface{}, sort interface{}, offset int64, limit int64) (result model.PaginationResult[T], err error)
- func (m *MongoDatasourceCollection[T]) Status() error
- type MongoRepodeprecated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GormRepo ¶
func UseGormMysql ¶
func UseGormMysql[T any](ds datasource.MysqlDataSource) (*GormRepo[T], error)
type MongoCollectionRepo
deprecated
type MongoCollectionRepo[T any] struct { Cfg model.DatabaseConfig // contains filtered or unexported fields }
Deprecated: use MongoDatasourceCollection instead
func NewMongoCollectionRepo ¶
func NewMongoCollectionRepo[T any](cfg model.DatabaseConfig, collection string) *MongoCollectionRepo[T]
func (*MongoCollectionRepo[T]) Collection ¶
func (m *MongoCollectionRepo[T]) Collection() *mongo.Collection
func (*MongoCollectionRepo[T]) Database ¶
func (m *MongoCollectionRepo[T]) Database() *mongo.Database
func (*MongoCollectionRepo[T]) Dispose ¶
func (m *MongoCollectionRepo[T]) Dispose() error
func (*MongoCollectionRepo[T]) FindOne ¶
func (m *MongoCollectionRepo[T]) FindOne(filter interface{}) (T, error)
func (*MongoCollectionRepo[T]) FindPagination ¶
func (m *MongoCollectionRepo[T]) FindPagination(filter interface{}, sort interface{}, offset int64, limit int64) (result []T, total int, err error)
func (*MongoCollectionRepo[T]) Status ¶
func (m *MongoCollectionRepo[T]) Status() error
type MongoDatasourceCollection ¶
type MongoDatasourceCollection[T any] struct { CollectionName string // contains filtered or unexported fields }
func UseMongoDatasourceCollection ¶
func UseMongoDatasourceCollection[T any](datasource datasource.MongoDataSource, coll string) *MongoDatasourceCollection[T]
func (*MongoDatasourceCollection[T]) Collection ¶
func (m *MongoDatasourceCollection[T]) Collection() *mongo.Collection
func (*MongoDatasourceCollection[T]) FindOne ¶
func (m *MongoDatasourceCollection[T]) FindOne(filter interface{}) (T, error)
func (*MongoDatasourceCollection[T]) FindPagination ¶
func (m *MongoDatasourceCollection[T]) FindPagination(filter interface{}, sort interface{}, offset int64, limit int64) (result model.PaginationResult[T], err error)
func (*MongoDatasourceCollection[T]) Status ¶
func (m *MongoDatasourceCollection[T]) Status() error
type MongoRepo
deprecated
type MongoRepo struct {
Cfg model.DatabaseConfig
// contains filtered or unexported fields
}
Deprecated: use MongoDatasourceCollection instead
func NewMongoRepo ¶
func NewMongoRepo(cfg model.DatabaseConfig) *MongoRepo
Click to show internal directories.
Click to hide internal directories.