mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
16 lines
419 B
Go
16 lines
419 B
Go
package interfaces
|
|
|
|
import (
|
|
"github.com/crawlab-team/crawlab/db/mongo"
|
|
"go.mongodb.org/mongo-driver/bson"
|
|
"go.mongodb.org/mongo-driver/bson/primitive"
|
|
)
|
|
|
|
type ResultServiceMongo interface {
|
|
GetId() (id primitive.ObjectID)
|
|
SetId(id primitive.ObjectID)
|
|
List(query bson.M, opts *mongo.FindOptions) (results []Result, err error)
|
|
Count(query bson.M) (total int, err error)
|
|
Insert(docs ...interface{}) (err error)
|
|
}
|