Documentation ¶
Index ¶
- Constants
- Variables
- type Job
- type JobData
- type JobRepository
- type SelectParams
- type Server
- type Service
- func (s *Service) All(ctx context.Context) ([]Job, error)
- func (s *Service) Create(ctx context.Context, job *Job) error
- func (s *Service) Delete(ctx context.Context, id string) error
- func (s *Service) GetCSV(_ context.Context, id string) (string, error)
- func (s *Service) SelectPending(ctx context.Context) ([]Job, error)
- func (s *Service) Update(ctx context.Context, job *Job) error
Constants ¶
View Source
const ( StatusPending = "pending" StatusWorking = "working" StatusOK = "ok" StatusFailed = "failed" )
Variables ¶
View Source
var ( ErrNotFound = errors.New("not found") ErrAlreadyExists = errors.New("already exists") )
Functions ¶
This section is empty.
Types ¶
type JobData ¶
type JobData struct { Keywords []string `json:"keywords"` Lang string `json:"lang"` Zoom int `json:"zoom"` Lat string `json:"lat"` Lon string `json:"lon"` FastMode bool `json:"fast_mode"` Radius int `json:"radius"` Depth int `json:"depth"` Email bool `json:"email"` MaxTime time.Duration `json:"max_time"` Proxies []string `json:"proxies"` }
type JobRepository ¶
type SelectParams ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(repo JobRepository, dataFolder string) *Service
Click to show internal directories.
Click to hide internal directories.