Documentation ¶
Index ¶
- func GetResultService(spiderId primitive.ObjectID) (svc2 interfaces.ResultService, err error)
- func GetResultServiceRegistry() (r interfaces.ResultServiceRegistry)
- func NewResultService(registryKey string, s *models.Spider) (svc2 interfaces.ResultService, err error)
- func NewResultServiceMongo(colId primitive.ObjectID, _ primitive.ObjectID) (svc2 interfaces.ResultService, err error)
- func NewResultServiceRegistry() (r interfaces.ResultServiceRegistry)
- type Option
- type Options
- type ServiceMongo
- func (svc *ServiceMongo) Count(query generic.ListQuery) (n int, err error)
- func (svc *ServiceMongo) GetTime() (t time.Time)
- func (svc *ServiceMongo) Index(fields []string)
- func (svc *ServiceMongo) Insert(docs ...interface{}) (err error)
- func (svc *ServiceMongo) List(query generic.ListQuery, opts *generic.ListOptions) (results []interface{}, err error)
- func (svc *ServiceMongo) SetTime(t time.Time)
- type ServiceRegistry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetResultService ¶
func GetResultService(spiderId primitive.ObjectID) (svc2 interfaces.ResultService, err error)
func GetResultServiceRegistry ¶
func GetResultServiceRegistry() (r interfaces.ResultServiceRegistry)
func NewResultService ¶
func NewResultService(registryKey string, s *models.Spider) (svc2 interfaces.ResultService, err error)
func NewResultServiceMongo ¶
func NewResultServiceMongo(colId primitive.ObjectID, _ primitive.ObjectID) (svc2 interfaces.ResultService, err error)
func NewResultServiceRegistry ¶
func NewResultServiceRegistry() (r interfaces.ResultServiceRegistry)
Types ¶
type ServiceMongo ¶
type ServiceMongo struct {
// contains filtered or unexported fields
}
func (*ServiceMongo) Count ¶
func (svc *ServiceMongo) Count(query generic.ListQuery) (n int, err error)
func (*ServiceMongo) GetTime ¶
func (svc *ServiceMongo) GetTime() (t time.Time)
func (*ServiceMongo) Index ¶
func (svc *ServiceMongo) Index(fields []string)
func (*ServiceMongo) Insert ¶
func (svc *ServiceMongo) Insert(docs ...interface{}) (err error)
func (*ServiceMongo) List ¶
func (svc *ServiceMongo) List(query generic.ListQuery, opts *generic.ListOptions) (results []interface{}, err error)
func (*ServiceMongo) SetTime ¶
func (svc *ServiceMongo) SetTime(t time.Time)
type ServiceRegistry ¶
type ServiceRegistry struct {
// contains filtered or unexported fields
}
func (*ServiceRegistry) Get ¶
func (r *ServiceRegistry) Get(key string) (fn interfaces.ResultServiceRegistryFn)
func (*ServiceRegistry) Register ¶
func (r *ServiceRegistry) Register(key string, fn interfaces.ResultServiceRegistryFn)
func (*ServiceRegistry) Unregister ¶
func (r *ServiceRegistry) Unregister(key string)
Click to show internal directories.
Click to hide internal directories.