internal

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(args []string)

func CheckStatus

func CheckStatus()

func Initialize

func Initialize()

Types

type Crawler

type Crawler struct {
	Url string

	JobLinks []string
	// contains filtered or unexported fields
}

func NewCrawler

func NewCrawler(url string) Crawler

func (*Crawler) Crawl

func (c *Crawler) Crawl() (io.Reader, error)

func (*Crawler) GetBoardName

func (c *Crawler) GetBoardName() string

extract the main name of the board from the url

func (*Crawler) GetHash

func (c *Crawler) GetHash() string

should be called after Crawl() and Parse()

func (c *Crawler) GetJobLinks() ([]string, error)

func (*Crawler) Parse

func (c *Crawler) Parse() error

Parse the given html page and extract the relevant jobs links. It calls Crawl if it hasn't been called yet.

type JobBoard

type JobBoard struct {
	Name      string    `json:"name"`
	Url       string    `json:"url"`
	JobsCount int       `json:"jobsCount"`
	Hash      string    `json:"hash"`
	JobLinks  []string  `json:"jobPosts"`
	LastFetch time.Time `json:"lastFetched"`
}

func ReadConfigFile

func ReadConfigFile() ([]JobBoard, error)

type Spinner

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

func NewSpinner

func NewSpinner() *Spinner

func (*Spinner) Failure

func (s *Spinner) Failure()

func (*Spinner) Start

func (s *Spinner) Start(msg string)

func (*Spinner) Stop

func (s *Spinner) Stop()

func (*Spinner) Success

func (s *Spinner) Success()

Jump to

Keyboard shortcuts

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