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.
27 lines
421 B
27 lines
421 B
package mongox
|
|
|
|
import (
|
|
"github.com/mongodb/mongo-go-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)
|
|
}
|
|
|