site

package
v0.0.0-...-289dbc7 Latest Latest
Warning

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

Go to latest
Published: May 1, 2014 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SiteAvailable   SiteAvailabilityCode = "A"
	SiteUnavailable                      = "W"
	SiteWalkUp                           = "X"
	SiteReserved                         = "R"
)

Variables

This section is empty.

Functions

func HandleTaskForHtmlRetrieval

func HandleTaskForHtmlRetrieval(incomingURLs <-chan string, outputHTML chan<- string, outputError chan<- error)

func IsValidSiteAvailabilityCode

func IsValidSiteAvailabilityCode(letterAnyCase string) bool

func RetrieveHtmlFromURL

func RetrieveHtmlFromURL(url string) (string, error)

Types

type Site

type Site struct {
	SiteNumber int
	SiteDays   []SiteDay
}

type SiteAvailabilityCode

type SiteAvailabilityCode string

func GetSiteAvailabilityCodeForLetter

func GetSiteAvailabilityCodeForLetter(letterAnyCase string) SiteAvailabilityCode

type SiteDay

type SiteDay struct {
	SiteAvailability SiteAvailabilityCode
	Day              time.Time
}

type SiteParser

type SiteParser struct {
	ExpectedStartDay time.Time
}

func NewSiteParser

func NewSiteParser(expectedStartDay time.Time) *SiteParser

func (*SiteParser) ParseHtmlFromUrl

func (parser *SiteParser) ParseHtmlFromUrl(url string) ([]Site, error)

func (*SiteParser) ParseHtmlString

func (parser *SiteParser) ParseHtmlString(html string) ([]Site, error)

type UrlGenerator

type UrlGenerator interface {
	GenerateUrl() string
}

Jump to

Keyboard shortcuts

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