Documentation ¶
Index ¶
- type DatabaseDriver
- func (dd *DatabaseDriver) Delete(key key.Key) error
- func (dd *DatabaseDriver) Get(key key.Key, opts ...noptions.Option) (noptions.Version, error)
- func (dd *DatabaseDriver) GetName() string
- func (dd *DatabaseDriver) Incr(key key.Key, field string, amount int32) (int64, error)
- func (dd *DatabaseDriver) Set(key key.Key, opts ...noptions.Option) (noptions.Version, error)
- type DriverProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatabaseDriver ¶
type DatabaseDriver struct {
// contains filtered or unexported fields
}
func NewCollectionDriver ¶
func NewCollectionDriver(database *mongo.Database) (*DatabaseDriver, error)
func (*DatabaseDriver) Delete ¶ added in v0.0.2
func (dd *DatabaseDriver) Delete(key key.Key) error
Delete delete a document by a key
func (*DatabaseDriver) GetName ¶
func (dd *DatabaseDriver) GetName() string
type DriverProvider ¶
type DriverProvider struct {
// contains filtered or unexported fields
}
func NewDriverProvider ¶
func NewDriverProvider( mClient *mongo.Client, logger *zap.Logger, ) *DriverProvider
func (*DriverProvider) OpenDbDriver ¶
func (dp *DriverProvider) OpenDbDriver(name string) (diface.ICollection, error)
func (*DriverProvider) Shutdown ¶
func (dp *DriverProvider) Shutdown() error
Click to show internal directories.
Click to hide internal directories.