supercharger

package
v0.0.0-...-01a1068 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoSuperchargersFound = errors.New("No superchargers found")

Functions

This section is empty.

Types

type Email

type Email struct {
	Label string `json:"label"`
	Email string `json:"email"`
}

func (Email) Value

func (e Email) Value() (driver.Value, error)

type EmailList

type EmailList []Email

func (*EmailList) Scan

func (el *EmailList) Scan(src interface{}) error

func (EmailList) Value

func (el EmailList) Value() (driver.Value, error)

type JSONBool

type JSONBool bool

JSONBool converts many raw type of boolean representations into their primitive equivilant.

func (*JSONBool) UnmarshalJSON

func (b *JSONBool) UnmarshalJSON(data []byte) error

type LocationList

type LocationList []string

func (*LocationList) Scan

func (ll *LocationList) Scan(src interface{}) error

func (LocationList) Value

func (ll LocationList) Value() (driver.Value, error)

type Phone

type Phone struct {
	Label  string `json:"label"`
	Number string `json:"number"`
}

func (Phone) Value

func (p Phone) Value() (driver.Value, error)

type PhoneList

type PhoneList []Phone

func (*PhoneList) Scan

func (pl *PhoneList) Scan(src interface{}) error

func (PhoneList) Value

func (pl PhoneList) Value() (driver.Value, error)

type Supercharger

type Supercharger struct {
	Address                string        `db:"address" json:"address"` // not null
	AddressLine1           *string       `db:"address_line_1" json:"address_line_1"`
	AddressLine2           *string       `db:"address_line_2" json:"address_line_2"`
	AddressNotes           *string       `db:"address_notes" json:"address_notes,omitempty"`
	Amenities              *string       `db:"amentities" json:"amentities,omitempty"`
	BaiduLat               *float64      `db:"-" json:"baidu_lat,string"`
	BaiduLng               *float64      `db:"-" json:"baidu_lng,string"`
	Chargers               *string       `db:"chargers" json:"chargers,omitempty"`
	City                   string        `db:"city" json:"city"` // not null
	CommonName             string        `db:"common_name" json:"common_name"`
	Country                string        `db:"country" json:"country"` // not null
	DestinationWebsite     *string       `db:"destination_website" json:"destination_website,omitempty"`
	DirectionsLink         *string       `db:"directions_link" json:"directions_link,omitempty"`
	Emails                 EmailList     `db:"emails" json:"emails,omitempty"`
	Geocode                string        `db:"geocode" json:"geocode"` // not null
	Hours                  *string       `db:"hours" json:"hours,omitempty"`
	IsGallery              JSONBool      `db:"is_gallery" json:"is_gallery"` // not null
	KioskPinX              *int64        `db:"kiosk_pin_x" json:"kiosk_pin_x,string,omitempty"`
	KioskPinY              *int64        `db:"kiosk_pin_y" json:"kiosk_pin_y,string,omitempty"`
	KioskZoomPinX          *int64        `db:"kiosk_zoom_pin_x" json:"kiosk_zoom_pin_x,string,omitempty"`
	KioskZoomPinY          *int64        `db:"kiosk_zoom_pin_y" json:"kiosk_zoom_pin_y,string,omitempty"`
	Geo                    spatial.Point `db:"geo" json:"geo"`
	Latitude               float64       `db:"-" json:"latitude,string"`
	Longitude              float64       `db:"-" json:"longitude,string"`
	LocationID             string        `db:"location_id" json:"location_id"`     // not null
	LocationType           LocationList  `db:"location_type" json:"location_type"` // not null
	Nid                    int64         `db:"nid" json:"nid,string"`              // not null
	OpenSoon               JSONBool      `db:"open_soon" json:"open_soon"`         // not null
	Path                   string        `db:"path" json:"path"`                   // not null
	PostalCode             *string       `db:"postal_code" json:"postal_code,omitempty"`
	ProvinceState          *string       `db:"province_state" json:"province_state,omitempty"`
	Region                 string        `db:"region" json:"region,omitempty"` // not null
	SalesPhone             PhoneList     `db:"sales_phone" json:"sales_phone,omitempty"`
	SalesRepresentative    JSONBool      `db:"sales_representative" json:"sales_representative,omitempty"`
	SubRegion              *string       `db:"sub_region" json:"sub_region,omitempty"`
	Title                  string        `db:"title" json:"title"` // not null
}

func Superchargers

func Superchargers() ([]Supercharger, error)

func (Supercharger) Equal

func (s Supercharger) Equal(b Supercharger) bool

func (*Supercharger) UnmarshalJSON

func (sc *Supercharger) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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