campwiz

package
v0.0.0-...-9ed1330 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RV                 SiteKind = "🚚"
	AccessibleRV       SiteKind = "♿🚚"
	Standard           SiteKind = "🚗"
	AccessibleStandard SiteKind = "♿🚗"
	Lodging            SiteKind = "🛏️"
	Tent               SiteKind = "⛺"

	Group      SiteKind = "🧑‍🤝‍🧑"
	Day        SiteKind = "🥪"
	Equestrian SiteKind = "🏇"
	Boat       SiteKind = "⛵"
	Walk       SiteKind = "🥾" // May be a tiny walk

	// Features
	Biking                 = 4001
	Boating                = 4002
	EquipmentRental        = 4003
	Fishing                = 4004
	Golf                   = 4005
	Hiking                 = 4006
	HorsebackRiding        = 4007
	Hunting                = 4008
	RecreationalActivities = 4009
	ScenicTrails           = 4010
	Sports                 = 4011
	Beach                  = 4012
	Winter                 = 4013
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Availability

type Availability struct {
	Kind SiteKind

	Name string
	Desc string

	SpotCount int

	Date time.Time
	URL  string
}

Availability represents what's actually available at the site

type Campground

type Campground struct {
	ID   string `yaml:"id"`
	Name string `yaml:"name"`
	URL  string `yaml:"url,omitempty"`

	ResURL string `yaml:"res_url,omitempty"`
	ResID  string `yaml:"res_id,omitempty"`

	Refs map[string]*Ref

	PropertyID string `yaml:"__property_id__,omitempty"` // internal reference back
}

type Property

type Property struct {
	ID          string        `yaml:"id"` // Must be unique, suggested form: /<state>/<area>/<name>
	URL         string        `yaml:"url,omitempty"`
	Name        string        `yaml:"name"`
	ManagedBy   string        `yaml:"managed_by,omitempty"`
	Campgrounds []*Campground `yaml:"campgrounds"`
}

type Query

type Query struct {
	Lat         float64
	Lon         float64
	Dates       []time.Time
	StayLength  int
	MaxDistance int
	MinRating   float64
	Keywords    []string

	SiteKinds []int
	Features  []int
}

Query defines a list of attributes that can be sent to the camp engines

type Ref

type Ref struct {
	URL      string `yaml:"url,omitempty"`
	ImageURL string `yaml:"image_url,omitempty"`

	Name    string `yaml:"name,omitempty"`
	Desc    string `yaml:"desc,omitempty"`
	Contact string `yaml:"contact,omitempty"`

	Lat      float64  `yaml:"lat,omitempty"`
	Lon      float64  `yaml:"lon,omitempty"`
	Rating   float64  `yaml:"rating,omitempty"`
	Features []string `yaml:"features,omitempty"`
	Locale   string   `yaml:"locale,omitempty"`

	Lists []RefList `yaml:"lists,omitempty"`
}

Ref is a cross-reference entry

type RefFile

type RefFile struct {
	Sources    map[string]Source `yaml:"sources,omitempty"`
	Properties []*Property
}

type RefList

type RefList struct {
	URL   string `yaml:"url,omitempty"`
	Title string `yaml:"title,omitempty"`
	Place int    `yaml:"place,omitempty"`
}

RefList is basically an award referenced by this site

type Result

type Result struct {
	ResURL string
	ResID  string

	Name     string
	Distance float64

	Rating float64

	Desc string
	URL  string

	ImageURL string

	Availability []Availability
	Features     []string
	Locale       string

	KnownCampground *Campground
}

Result is supposed to be a vendor neutral result of results

type SiteKind

type SiteKind string

type Source

type Source struct {
	Name       string  `yaml:"name"`
	URL        string  `yaml:"url,omitempty"`
	RatingMax  float64 `yaml:"rating_max,omitempty"`
	RatingDesc string  `yaml:"rating_desc,omitempty"`
}

Jump to

Keyboard shortcuts

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