Documentation ¶
Index ¶
- func GetResultService(s *models.Spider, opts ...Option) (svc 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
- type ServiceRegistry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetResultService ¶
func GetResultService(s *models.Spider, opts ...Option) (svc 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) 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)
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.