dou

package
Version: v0.0.0-...-f1559b4 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddressesByCompanies

func AddressesByCompanies(companies map[string]dou.Company, skipAddressMap map[string]bool) []string

map[string]dou.Company only as source, to skip convert to slice

func Combine

func Combine(
	companies map[string]dou.Company,
	vacancies []dou.PaginationVacancy,
	companyReviewCountMap map[string]int,
	companyAliasTypeMap map[string]string,
	addressLocationMap map[string]gmap.Location,
	verifyCompanyMap map[string]bool,
) ([]dou.FullCompany, []dou.SkipCompany)

func ExtractCompanyAliasesByVacancies

func ExtractCompanyAliasesByVacancies(vacancies []dou.PaginationVacancy) []string

func Top50LargestCompanyAliasMap

func Top50LargestCompanyAliasMap() map[string]bool

Types

type Client

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

func NewClient

func NewClient(httpClient *fasthttp.Client, credentials dou.Credentials) *Client

func (*Client) CompanyOfficesByAlias

func (c *Client) CompanyOfficesByAlias(alias string) ([]byte, error)

func (*Client) ReviewsByPage

func (c *Client) ReviewsByPage(page int) ([]byte, error)

func (*Client) ReviewsMainPage

func (c *Client) ReviewsMainPage() ([]byte, error)

func (*Client) VacanciesMainPage

func (c *Client) VacanciesMainPage() ([]byte, error)

func (*Client) VacancyPagination

func (c *Client) VacancyPagination(count int) ([]byte, error)

type CompanyScrapper

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

func NewCompanyScrapper

func NewCompanyScrapper(storage *CompanyStorage, client *Client) *CompanyScrapper

func (*CompanyScrapper) ScrapByAliases

func (s *CompanyScrapper) ScrapByAliases(aliases []string, softRequestLimit int) (map[string]dou.Company, dou.ScrapStats, error)

type CompanyStorage

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

func NewCompanyStorage

func NewCompanyStorage(path string, lifetime uint32) *CompanyStorage

func (*CompanyStorage) Fetch

func (s *CompanyStorage) Fetch() ([]dou.Company, error)

func (*CompanyStorage) Store

func (s *CompanyStorage) Store(source []dou.Company) error

type DailyVacancyScrapper

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

func NewDailyVacancyScrapper

func NewDailyVacancyScrapper(main *VacancyScrapper) *DailyVacancyScrapper

func (*DailyVacancyScrapper) Scrap

type ReviewScrapper

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

func NewReviewScrapper

func NewReviewScrapper(storage *ReviewStorage, client *Client) *ReviewScrapper

func (*ReviewScrapper) DiffScrap

func (s *ReviewScrapper) DiffScrap() (map[string]int, dou.ScrapStats, error)

func (*ReviewScrapper) FullScrap

func (s *ReviewScrapper) FullScrap() (map[string]int, dou.ScrapStats, error)

type ReviewStorage

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

func NewReviewStorage

func NewReviewStorage(path string, lifetime uint32) *ReviewStorage

func (*ReviewStorage) Fetch

func (s *ReviewStorage) Fetch() ([]dou.PaginationReview, bool, error)

func (*ReviewStorage) Store

func (s *ReviewStorage) Store(source []dou.PaginationReview) error

type VacancyScrapper

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

func NewVacancyScrapper

func NewVacancyScrapper(storage *VacancyStorage, client *Client) *VacancyScrapper

func (*VacancyScrapper) DiffScrap

scrap only top, hot in top -> skip hots, than running when exists newest

func (*VacancyScrapper) FullScrap

type VacancyStorage

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

func NewVacancyStorage

func NewVacancyStorage(path string, lifetime uint32) *VacancyStorage

func (*VacancyStorage) Fetch

func (s *VacancyStorage) Fetch() ([]dou.PaginationVacancy, bool, error)

func (*VacancyStorage) Store

func (s *VacancyStorage) Store(source []dou.PaginationVacancy) error

type Wrapper

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

func (*Wrapper) Wrap

func (w *Wrapper) Wrap(s []byte) []byte

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL