Documentation ¶
Index ¶
- type DBOption
- type DBOptions
- type MgoDB
- func (m *MgoDB) ConnectDB(opt ...*options.ClientOptions) error
- func (m *MgoDB) DB() *mongo.Database
- func (m *MgoDB) Error() error
- func (m *MgoDB) Find(ctx context.Context, filter interface{}, result interface{}) *MgoDB
- func (m *MgoDB) First(ctx context.Context, filter interface{}, result interface{}) *MgoDB
- func (m *MgoDB) GetClient() *mongo.Client
- func (m *MgoDB) Insert(ctx context.Context, result interface{}, opts ...*options.InsertOneOptions) *MgoDB
- func (m *MgoDB) Inserts(ctx context.Context, result []interface{}, opts ...*options.InsertManyOptions) *MgoDB
- func (m *MgoDB) SetCollection(collection string) *MgoDB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBOption ¶
type DBOption func(*DBOptions)
func SetCollection ¶
func SetContext ¶
func SetDatabase ¶
Click to show internal directories.
Click to hide internal directories.