result

package
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetResultService

func GetResultService(spiderId primitive.ObjectID, opts ...Option) (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 Option

type Option func(opts *Options)

func WithRegistryKey

func WithRegistryKey(key string) Option

type Options

type Options struct {
	SpiderId primitive.ObjectID // data source id
	// contains filtered or unexported fields
}

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 added in v0.6.2

func (svc *ServiceMongo) GetTime() (t time.Time)

func (*ServiceMongo) Index added in v0.6.1

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 added in v0.6.2

func (svc *ServiceMongo) SetTime(t time.Time)

type ServiceRegistry

type ServiceRegistry struct {
	// contains filtered or unexported fields
}

func (*ServiceRegistry) Get

func (*ServiceRegistry) Register

func (*ServiceRegistry) Unregister

func (r *ServiceRegistry) Unregister(key string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL