Documentation
¶
Index ¶
- type Connection
- type MongoConnection
- func (c MongoConnection) Close() error
- func (c MongoConnection) DeleteOne(id primitive.ObjectID) error
- func (c MongoConnection) GetAll() (any, error)
- func (c MongoConnection) GetOne(id ObjectID) any
- func (c MongoConnection) InsertOne(entity any) error
- func (c MongoConnection) UpdateOne(entity any) error
- type ObjectID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection interface { Close() error InsertOne(entity any) error UpdateOne(entity any) error GetAll() (any, error) GetOne(id ObjectID) any }
func NewConnection ¶
type MongoConnection ¶
type MongoConnection struct {
// contains filtered or unexported fields
}
func (MongoConnection) Close ¶
func (c MongoConnection) Close() error
func (MongoConnection) GetAll ¶
func (c MongoConnection) GetAll() (any, error)
func (MongoConnection) GetOne ¶
func (c MongoConnection) GetOne(id ObjectID) any
func (MongoConnection) InsertOne ¶
func (c MongoConnection) InsertOne(entity any) error
func (MongoConnection) UpdateOne ¶
func (c MongoConnection) UpdateOne(entity any) error
Click to show internal directories.
Click to hide internal directories.