You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
mongox-go-driver/mongox/common.go

32 lines
489 B

package mongox
import (
"go.mongodb.org/mongo-driver/bson/primitive"
)
type Saver interface {
Save(db *Database) error
}
type Deleter interface {
Delete(db *Database) error
}
type Loader interface {
Load(db *Database, filters ...interface{}) error
}
type BaseObjectID interface {
GetID() primitive.ObjectID
SetID(id primitive.ObjectID)
}
type BaseString interface {
GetID() string
SetID(id string)
}
type BaseObject interface {
GetID() primitive.D
SetID(id primitive.D)
}