Documentation ¶
Overview ¶
Package closures retrieves beach and road closures related to SpaceX Starship testing in Boca Chica, TX.
Index ¶
Constants ¶
const ( // SiteURL is the website publishing the Boca Chica Beach and Road closures. SiteURL = "https://www.cameroncounty.us/spacex/" // ClosureTypePrimary represents a primary closure. ClosureTypePrimary ClosureType = "Primary Date" // ClosureTypeSecondary represents a secondary (backup) closure. ClosureTypeSecondary ClosureType = "Secondary Date" // ClosureStatusCanceled represents the canceled Boca Chica Beach status display text. ClosureStatusCanceled ClosureStatus = "Closure Canceled" // ClosureStatusScheduled represents the scheduled Boca Chica Beach status display text. ClosureStatusScheduled ClosureStatus = "Closure Scheduled" // TimeRangeStatusActive notates when the current time is within a closure time range. TimeRangeStatusActive TimeRangeStatus = "active" // TimeRangeStatusPending notates when the current time is before a closure time range. TimeRangeStatusPending TimeRangeStatus = "pending" // TimeRangeStatusExpired notates when the current time is after a closure time range. TimeRangeStatusExpired TimeRangeStatus = "expired" // DateLayout represents the current date layout posted for each Closure. DateLayout = "Monday, Jan 2, 2006" // DateLayoutAlt represents an alternative date layout sometimes used on the site. DateLayoutAlt = "Monday, January 2, 2006" // DateLayoutAlt2 represents an alternative date layout sometimes used on the site. DateLayoutAlt2 = "January 2, 2006" // DateLayoutSimple is a date layout without the weekday. DateLayoutSimple = "Jan 2, 2006" )
Variables ¶
This section is empty.
Functions ¶
func IsCanceled ¶ added in v1.2.10
func IsCanceled(status ClosureStatus) bool
IsCanceled checks if a closure status is 'Status Canceled' or 'Testing concluded' or 'Testing ended', forgiving for alternate spellings and capitilization differences.
Types ¶
type Closure ¶
type Closure struct { ClosureType ClosureType Date string RawTimeRange string TimeRangeStatus TimeRangeStatus ClosureStatus ClosureStatus Expires int64 }
Closure represents a beach and/or road closure notice from the Cameron County SpaceX site.
func Get ¶
Get pulls the current beach/road closures from https://www.cameroncounty.us/spacex/.
type ClosureStatus ¶ added in v1.2.5
type ClosureStatus string
ClosureStatus represents the official status of the closure as reported on https://www.cameroncounty.us/spacex/.
type ClosureType ¶ added in v1.2.5
type ClosureType string
ClosureType represents the type of Closure reported.
type TimeRangeStatus ¶ added in v1.2.5
type TimeRangeStatus string
TimeRangeStatus notates the status of a closure time range relative to current time: pending, active, or expired.