Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IMongoRepository ¶
type IMongoRepository[I any, O any] interface { InsertOne(schema *I, ctx context.Context) (*O, error) FindAll(schema *[]I, ctx context.Context) (*[]O, error) UpdateOne(schema *I, filter interface{}, ctx context.Context) (*O, error) }
func NewMongoRepository ¶
type MongoDBConfig ¶
type MongoDBConfig struct { URI string Logger interface{} }
func NewMongoConnection ¶
func NewMongoConnection(cfg *MongoDBConfig) *MongoDBConfig
func (*MongoDBConfig) GetMongoClient ¶
func (m *MongoDBConfig) GetMongoClient() *mongo.Client
type MongoRepository ¶
func (*MongoRepository[I, O]) FindAll ¶
func (r *MongoRepository[I, O]) FindAll(schema *[]I, ctx context.Context) (*[]O, error)
Click to show internal directories.
Click to hide internal directories.