Documentation
¶
Index ¶
- func DeleteMany(filter interface{}, value interface{}) error
- func DeleteOne(filter interface{}, value interface{}) error
- func FindOne(filter interface{}, value interface{}, ops ...*options.FindOne) error
- func InsertOne(value interface{}, ops ...*options.InsertOne) error
- func SetContext(c context.Context, model interface{}) error
- func UpdateOne(filter interface{}, operator *Operator, ops ...*options.Update) error
- type Config
- type Connection
- type D
- type Document
- type M
- type Operator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteMany ¶
func DeleteMany(filter interface{}, value interface{}) error
func SetContext ¶
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func Connect ¶
func Connect(config *Config) (*Connection, error)
func (*Connection) GetClient ¶
func (c *Connection) GetClient() *mongo.Client
func (*Connection) Register ¶
func (c *Connection) Register(ctx context.Context, models ...interface{})
type Document ¶
type Document struct { ID primitive.ObjectID `bson:"_id"` CreatedAt *time.Time UpdatedAt *time.Time Context context.Context }
func (*Document) Connection ¶
func (d *Document) Connection() *Connection
func (*Document) GetContext ¶
func (*Document) SetContext ¶
Click to show internal directories.
Click to hide internal directories.