campus

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Overview

package campus provides methods for working with the SFO airport campus.

Index

Constants

View Source
const FIRST_SFO_COMPLEX int64 = 1159396329

SFO Terminal Complex (1954~ to 1963~) https://millsfield.sfomuseum.org/buildings/1159396329/

Variables

View Source
var WARN_IS_CURRENT = true

Functions

func NewDatabaseWithIterator added in v0.7.0

func NewDatabaseWithIterator(ctx context.Context, dsn string, iterator_uri string, paths ...string) (*sql.DB, error)

Types

type BoardingArea

type BoardingArea struct {
	Element          `json:",omitempty"`
	WhosOnFirstId    int64              `json:"id"`
	SFOId            string             `json:"sfo:id"`
	Gates            []*Gate            `json:"gates,omitempty"`
	Checkpoints      []*Checkpoint      `json:"checkpoints,omitempty"`
	Galleries        []*Gallery         `json:"galleries,omitempty"`
	PublicArt        []*PublicArt       `json:"publicart,omitempty"`
	ObservationDecks []*ObservationDeck `json:"observationdecks,omitempty"`
	Museums          []*Museum          `json:"museums,omitempty"` // for example AML
}

type BoardingArea is a lightweight data structure to represent boarding areas at SFO with pointers its descendants.

func DeriveBoardingAreas added in v0.7.0

func DeriveBoardingAreas(ctx context.Context, db *sql.DB, id int64) ([]*BoardingArea, error)

func (*BoardingArea) AltId added in v0.7.0

func (b *BoardingArea) AltId() string

func (*BoardingArea) AsTree added in v0.7.0

func (b *BoardingArea) AsTree(ctx context.Context, r reader.Reader, wr io.Writer, indent int) error

func (*BoardingArea) Id added in v0.7.0

func (b *BoardingArea) Id() int64

func (*BoardingArea) Placetype added in v0.7.0

func (b *BoardingArea) Placetype() string

func (*BoardingArea) Walk added in v0.7.0

type Campus

type Campus struct {
	Element       `json:",omitempty"`
	WhosOnFirstId int64        `json:"id"`
	SFOId         string       `json:"sfo:id"`
	Complex       *Complex     `json:"complex"`
	Garages       []*Garage    `json:"garages"`
	Hotels        []*Hotel     `json:"hotels"`
	PublicArt     []*PublicArt `json:"buildings,omitempty"`
}

type Campus is a lightweight data structure to represent the SFO campus with pointers its descendants.

func (*Campus) AltId added in v0.7.0

func (c *Campus) AltId() string

func (*Campus) Id added in v0.7.0

func (c *Campus) Id() int64

func (*Campus) Placetype added in v0.7.0

func (c *Campus) Placetype() string

func (*Campus) Walk added in v0.7.0

func (c *Campus) Walk(ctx context.Context, cb ElementCallbackFunc) error

type Checkpoint

type Checkpoint struct {
	Element       `json:",omitempty"`
	WhosOnFirstId int64  `json:"id"`
	SFOId         string `json:"sfo:id"`
}

type Checkpoint is a lightweight data structure to represent security checkpoints at SFO.

func DeriveCheckpoints added in v0.7.0

func DeriveCheckpoints(ctx context.Context, db *sql.DB, parent_id int64) ([]*Checkpoint, error)

func (*Checkpoint) AltId added in v0.7.0

func (c *Checkpoint) AltId() string

func (*Checkpoint) AsTree added in v0.7.0

func (cp *Checkpoint) AsTree(ctx context.Context, r reader.Reader, wr io.Writer, indent int) error

func (*Checkpoint) Id added in v0.7.0

func (c *Checkpoint) Id() int64

func (*Checkpoint) Placetype added in v0.7.0

func (c *Checkpoint) Placetype() string

func (*Checkpoint) Walk added in v0.7.0

type CommonArea

type CommonArea struct {
	Element          `json:",omitempty"`
	WhosOnFirstId    int64              `json:"id"`
	SFOId            string             `json:"sfo:id"`
	Gates            []*Gate            `json:"gates,omitempty"`
	Checkpoints      []*Checkpoint      `json:"checkpoints,omitempty"`
	Galleries        []*Gallery         `json:"galleries,omitempty"`
	PublicArt        []*PublicArt       `json:"publicart,omitempty"`
	ObservationDecks []*ObservationDeck `json:"observationdecks,omitempty"` // for example T2
	Museums          []*Museum          `json:"museums,omitempty"`          // for example AML
}

type CommonArea is a lightweight data structure to represent common areas at SFO with pointers its descendants.

func DeriveCommonAreas added in v0.7.0

func DeriveCommonAreas(ctx context.Context, db *sql.DB, parent_id int64) ([]*CommonArea, error)

func (*CommonArea) AltId added in v0.7.0

func (c *CommonArea) AltId() string

func (*CommonArea) AsTree added in v0.7.0

func (ca *CommonArea) AsTree(ctx context.Context, r reader.Reader, wr io.Writer, indent int) error

func (*CommonArea) Id added in v0.7.0

func (c *CommonArea) Id() int64

func (*CommonArea) Placetype added in v0.7.0

func (c *CommonArea) Placetype() string

func (*CommonArea) Walk added in v0.7.0

type Complex

type Complex struct {
	Element       `json:",omitempty"`
	WhosOnFirstId int64       `json:"id"`
	SFOId         string      `json:"sfo:id"`
	Terminals     []*Terminal `json:"terminals"`
}

type Complex is a lightweight data structure to represent the terminal complex at SFO with pointers its descendants.

func DeriveComplex added in v0.7.0

func DeriveComplex(ctx context.Context, db *sql.DB, complex_id int64) (*Complex, error)

func (*Complex) AltId added in v0.7.0

func (c *Complex) AltId() string

func (*Complex) AsGeoJSONLayers added in v0.7.0

func (c *Complex) AsGeoJSONLayers(ctx context.Context, r reader.Reader) (map[string]*geojson.FeatureCollection, error)

func (*Complex) AsJSON added in v0.7.0

func (c *Complex) AsJSON(ctx context.Context, wr io.Writer) error

func (*Complex) AsTree added in v0.7.0

func (c *Complex) AsTree(ctx context.Context, r reader.Reader, wr io.Writer, indent int) error

func (*Complex) DeriveAltLookup added in v0.7.0

func (c *Complex) DeriveAltLookup(ctx context.Context) (map[string]int64, error)

func (*Complex) Id added in v0.7.0

func (c *Complex) Id() int64

func (*Complex) Placetype added in v0.7.0

func (c *Complex) Placetype() string

func (*Complex) Walk added in v0.7.0

func (c *Complex) Walk(ctx context.Context, cb ElementCallbackFunc) error

type Element added in v0.7.0

type Element interface {
	Id() int64
	AltId() string
	Placetype() string
	Walk(context.Context, ElementCallbackFunc) error
	AsTree(context.Context, reader.Reader, io.Writer, int) error
}

type ElementCallbackFunc added in v0.7.0

type ElementCallbackFunc func(context.Context, Element) error
type Gallery struct {
	Element       `json:",omitempty"`
	WhosOnFirstId int64  `json:"id"`
	SFOId         string `json:"sfomuseum:id"`
}

type Gallery is a lightweight data structure to represent SFO Museum galleries at SFO.

func DeriveGalleries added in v0.7.0

func DeriveGalleries(ctx context.Context, db *sql.DB, parent_id int64) ([]*Gallery, error)

func (*Gallery) AltId added in v0.7.0

func (g *Gallery) AltId() string

func (*Gallery) AsTree added in v0.7.0

func (g *Gallery) AsTree(ctx context.Context, r reader.Reader, wr io.Writer, indent int) error

func (*Gallery) Id added in v0.7.0

func (g *Gallery) Id() int64

func (*Gallery) Placetype added in v0.7.0

func (g *Gallery) Placetype() string

func (*Gallery) Walk added in v0.7.0

func (g *Gallery) Walk(ctx context.Context, cb ElementCallbackFunc) error

type Garage

type Garage struct {
	Element       `json:",omitempty"`
	WhosOnFirstId int64        `json:"id"`
	SFOId         string       `json:"sfo:id"`
	PublicArt     []*PublicArt `json:"publicart,omitempty"`
}

type Garage is a lightweight data structure to represent garages at SFO with pointers its descendants.

func (*Garage) AltId added in v0.7.0

func (g *Garage) AltId() string

func (*Garage) AsTree added in v0.7.0

func (g *Garage) AsTree(ctx context.Context, r reader.Reader, wr io.Writer, indent int) error

func (*Garage) Id added in v0.7.0

func (g *Garage) Id() int64

func (*Garage) Placetype added in v0.7.0

func (g *Garage) Placetype() string

func (*Garage) Walk added in v0.7.0

func (g *Garage) Walk(ctx context.Context, cb ElementCallbackFunc) error

type Gate

type Gate struct {
	Element       `json:",omitempty"`
	WhosOnFirstId int64  `json:"id"`
	SFOId         string `json:"sfo:id"`
}

type Gate is a lightweight data structure to represent passenger gates at SFO.

func DeriveGates added in v0.7.0

func DeriveGates(ctx context.Context, db *sql.DB, parent_id int64) ([]*Gate, error)

func (*Gate) AltId added in v0.7.0

func (g *Gate) AltId() string

func (*Gate) AsTree added in v0.7.0

func (g *Gate) AsTree(ctx context.Context, r reader.Reader, wr io.Writer, indent int) error

func (*Gate) Id added in v0.7.0

func (g *Gate) Id() int64

func (*Gate) Placetype added in v0.7.0

func (g *Gate) Placetype() string

func (*Gate) Walk added in v0.7.0

func (g *Gate) Walk(ctx context.Context, cb ElementCallbackFunc) error

type Hotel added in v0.7.0

type Hotel struct {
	Element       `json:",omitempty"`
	WhosOnFirstId int64        `json:"id"`
	SFOId         string       `json:"sfo:id"`
	PublicArt     []*PublicArt `json:"publicart,omitempty"`
}

type Hotel is a lightweight data structure to represent garages at SFO with pointers its descendants.

func (*Hotel) AltId added in v0.7.0

func (h *Hotel) AltId() string

func (*Hotel) AsTree added in v0.7.0

func (h *Hotel) AsTree(ctx context.Context, r reader.Reader, wr io.Writer, indent int) error

func (*Hotel) Id added in v0.7.0

func (h *Hotel) Id() int64

func (*Hotel) Placetype added in v0.7.0

func (h *Hotel) Placetype() string

func (*Hotel) Walk added in v0.7.0

func (h *Hotel) Walk(ctx context.Context, cb ElementCallbackFunc) error

type Museum added in v0.7.0

type Museum struct {
	Element       `json:",omitempty"`
	WhosOnFirstId int64        `json:"id"`
	SFOId         string       `json:"sfo:id"`
	Galleries     []*Gallery   `json:"galleries,omitempty"`
	PublicArt     []*PublicArt `json:"publicart,omitempty"`
}

type Museum is a lightweight data structure to represent dedicated Museum-related areas, distinct from galleries, at SFO with pointers to its descendants.

func DeriveMuseums added in v0.7.0

func DeriveMuseums(ctx context.Context, db *sql.DB, parent_id int64) ([]*Museum, error)

func (*Museum) AltId added in v0.7.0

func (m *Museum) AltId() string

func (*Museum) AsTree added in v0.7.0

func (m *Museum) AsTree(ctx context.Context, r reader.Reader, wr io.Writer, indent int) error

func (*Museum) Id added in v0.7.0

func (m *Museum) Id() int64

func (*Museum) Placetype added in v0.7.0

func (m *Museum) Placetype() string

func (*Museum) Walk added in v0.7.0

func (m *Museum) Walk(ctx context.Context, cb ElementCallbackFunc) error

type ObservationDeck

type ObservationDeck struct {
	Element       `json:",omitempty"`
	WhosOnFirstId int64        `json:"id"`
	SFOId         string       `json:"sfo:id"`
	PublicArt     []*PublicArt `json:"publicart,omitempty"`
	Galleries     []*Gallery   `json:"galleries,omitempty"`
}

type ObservationDeck is a lightweight data structure to represent observation decks at SFO with pointers its descendants.

func DeriveObservationDecks added in v0.7.0

func DeriveObservationDecks(ctx context.Context, db *sql.DB, t_id int64) ([]*ObservationDeck, error)

func (*ObservationDeck) AltId added in v0.7.0

func (od *ObservationDeck) AltId() string

func (*ObservationDeck) AsTree added in v0.7.0

func (od *ObservationDeck) AsTree(ctx context.Context, r reader.Reader, wr io.Writer, indent int) error

func (*ObservationDeck) Id added in v0.7.0

func (od *ObservationDeck) Id() int64

func (*ObservationDeck) Placetype added in v0.7.0

func (od *ObservationDeck) Placetype() string

func (*ObservationDeck) Walk added in v0.7.0

type PublicArt

type PublicArt struct {
	Element       `json:",omitempty"`
	WhosOnFirstId int64  `json:"id"`
	SFOId         string `json:"sfomuseum:id"`
}

type PublicArt is a lightweight data structure to represent public art works at SFO.

func DerivePublicArt added in v0.7.0

func DerivePublicArt(ctx context.Context, db *sql.DB, parent_id int64) ([]*PublicArt, error)

func (*PublicArt) AltId added in v0.7.0

func (pa *PublicArt) AltId() string

func (*PublicArt) AsTree added in v0.7.0

func (pa *PublicArt) AsTree(ctx context.Context, r reader.Reader, wr io.Writer, indent int) error

func (*PublicArt) Id added in v0.7.0

func (pa *PublicArt) Id() int64

func (*PublicArt) Placetype added in v0.7.0

func (pa *PublicArt) Placetype() string

func (*PublicArt) Walk added in v0.7.0

type Terminal

type Terminal struct {
	Element       `json:",omitempty"`
	WhosOnFirstId int64           `json:"id"`
	SFOId         string          `json:"sfo:id"`
	CommonAreas   []*CommonArea   `json:"commonareas,omitempty"`
	BoardingAreas []*BoardingArea `json:"boardingareas,omitempty"`
}

type Terminal is a lightweight data structure to represent terminals at SFO with pointers its descendants.

func DeriveTerminals added in v0.7.0

func DeriveTerminals(ctx context.Context, db *sql.DB, sfo_id int64) ([]*Terminal, error)

func (*Terminal) AltId added in v0.7.0

func (t *Terminal) AltId() string

func (*Terminal) AsTree added in v0.7.0

func (t *Terminal) AsTree(ctx context.Context, r reader.Reader, wr io.Writer, indent int) error

func (*Terminal) Id added in v0.7.0

func (t *Terminal) Id() int64

func (*Terminal) Placetype added in v0.7.0

func (t *Terminal) Placetype() string

func (*Terminal) Walk added in v0.7.0

Jump to

Keyboard shortcuts

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