Documentation ¶
Index ¶
- type Config
- type Connection
- func (c *Connection) Aggregate(pipeline aggregation.Stages, value interface{}, opts ...*options.Aggregate) error
- func (c *Connection) Collection(i interface{}) *Connection
- func (c *Connection) Context(ctx context.Context) *Connection
- func (c *Connection) DeleteMany(filter interface{}, opts ...*options.Delete) error
- func (c *Connection) DeleteOne(filter interface{}, opts ...*options.Delete) error
- func (c *Connection) Disconnect() error
- func (c *Connection) Find(filter interface{}, value interface{}, opts ...*options.Find) error
- func (c *Connection) FindOne(filter interface{}, value interface{}, opts ...*options.Find) error
- func (c *Connection) FindWithCursor(filter interface{}, value interface{}, opts ...*options.Find) (*mongo.Cursor, error)
- func (c *Connection) GetClient() *mongo.Client
- func (c *Connection) InsertMany(values interface{}, opts ...*options.Insert) error
- func (c *Connection) InsertOne(value interface{}, opts ...*options.Insert) error
- func (c *Connection) Model(value interface{}) *Connection
- func (c *Connection) UpdateOne(filter interface{}, update interface{}, opts ...*options.Update) error
- type Document
- type Operator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { mongooptions.ClientOptions Database string Context context.Context }
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func Connect ¶
func Connect(config *Config) (*Connection, error)
func (*Connection) Aggregate ¶
func (c *Connection) Aggregate(pipeline aggregation.Stages, value interface{}, opts ...*options.Aggregate) error
func (*Connection) Collection ¶
func (c *Connection) Collection(i interface{}) *Connection
func (*Connection) Context ¶
func (c *Connection) Context(ctx context.Context) *Connection
func (*Connection) DeleteMany ¶
func (c *Connection) DeleteMany(filter interface{}, opts ...*options.Delete) error
func (*Connection) DeleteOne ¶
func (c *Connection) DeleteOne(filter interface{}, opts ...*options.Delete) error
func (*Connection) Disconnect ¶
func (c *Connection) Disconnect() error
func (*Connection) Find ¶
func (c *Connection) Find(filter interface{}, value interface{}, opts ...*options.Find) error
func (*Connection) FindOne ¶
func (c *Connection) FindOne(filter interface{}, value interface{}, opts ...*options.Find) error
func (*Connection) FindWithCursor ¶
func (*Connection) GetClient ¶
func (c *Connection) GetClient() *mongo.Client
func (*Connection) InsertMany ¶
func (c *Connection) InsertMany(values interface{}, opts ...*options.Insert) error
func (*Connection) InsertOne ¶
func (c *Connection) InsertOne(value interface{}, opts ...*options.Insert) error
func (*Connection) Model ¶
func (c *Connection) Model(value interface{}) *Connection
Click to show internal directories.
Click to hide internal directories.