pathways

package
v0.0.0-...-651d898 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BidirectionalType

type BidirectionalType string
const (
	BidirectionalTypeUnidirectional BidirectionalType = "Unidirectional"
	BidirectionalTypeBidirectional  BidirectionalType = "Bidirectional"
)

func (*BidirectionalType) Scan

func (e *BidirectionalType) Scan(src interface{}) error

type CreatePathwayParams

type CreatePathwayParams struct {
	PathwayID            string                `db:"pathway_id"`
	FromStopID           string                `db:"from_stop_id"`
	ToStopID             string                `db:"to_stop_id"`
	PathwayMode          NullPathwayMode       `db:"pathway_mode"`
	IsBidirectional      NullBidirectionalType `db:"is_bidirectional"`
	Length               sql.NullString        `db:"length"`
	TraversalTime        sql.NullInt32         `db:"traversal_time"`
	StairCount           sql.NullInt32         `db:"stair_count"`
	MaxSlope             sql.NullString        `db:"max_slope"`
	MinWidth             sql.NullString        `db:"min_width"`
	SignpostedAs         sql.NullString        `db:"signposted_as"`
	ReversedSignpostedAs sql.NullString        `db:"reversed_signposted_as"`
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type NullBidirectionalType

type NullBidirectionalType struct {
	BidirectionalType BidirectionalType
	Valid             bool // Valid is true if BidirectionalType is not NULL
}

func (*NullBidirectionalType) Scan

func (ns *NullBidirectionalType) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullBidirectionalType) Value

func (ns NullBidirectionalType) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullPathwayMode

type NullPathwayMode struct {
	PathwayMode PathwayMode
	Valid       bool // Valid is true if PathwayMode is not NULL
}

func (*NullPathwayMode) Scan

func (ns *NullPathwayMode) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullPathwayMode) Value

func (ns NullPathwayMode) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Pathway

type Pathway struct {
	PathwayID            string                `csv:"pathway_id"`
	FromStopID           string                `csv:"from_stop_id"`
	ToStopID             string                `csv:"to_stop_id"`
	PathwayMode          NullPathwayMode       `csv:"pathway_mode,omitempty"`
	IsBidirectional      NullBidirectionalType `csv:"is_bidirectional,omitempty"`
	Length               sql.NullString        `csv:"length,omitempty"`
	TraversalTime        sql.NullInt32         `csv:"traversal_time,omitempty"`
	StairCount           sql.NullInt32         `csv:"stair_count,omitempty"`
	MaxSlope             sql.NullString        `csv:"max_slope,omitempty"`
	MinWidth             sql.NullString        `csv:"min_width,omitempty"`
	SignpostedAs         sql.NullString        `csv:"signposted_as,omitempty"`
	ReversedSignpostedAs sql.NullString        `csv:"reversed_signposted_as,omitempty"`
}

type PathwayMode

type PathwayMode string
const (
	PathwayModeWalkway        PathwayMode = "Walkway"
	PathwayModeStairs         PathwayMode = "Stairs"
	PathwayModeMovingSidewalk PathwayMode = "MovingSidewalk"
	PathwayModeEscalator      PathwayMode = "Escalator"
	PathwayModeElevator       PathwayMode = "Elevator"
	PathwayModeFareGate       PathwayMode = "FareGate"
	PathwayModeExitGate       PathwayMode = "ExitGate"
)

func (*PathwayMode) Scan

func (e *PathwayMode) Scan(src interface{}) error

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func Prepare

func Prepare(ctx context.Context, db DBTX) (*Queries, error)

func (*Queries) Close

func (q *Queries) Close() error

func (*Queries) CreatePathway

func (q *Queries) CreatePathway(ctx context.Context, arg CreatePathwayParams) error

func (*Queries) GetPathwayByID

func (q *Queries) GetPathwayByID(ctx context.Context, pathwayID string) (Pathway, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

Jump to

Keyboard shortcuts

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