stops

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 AccessType

type AccessType string
const (
	AccessTypeInheritOrNoInfo AccessType = "InheritOrNoInfo"
	AccessTypeAccessPossible  AccessType = "AccessPossible"
	AccessTypeNoAccess        AccessType = "NoAccess"
)

func (*AccessType) Scan

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

type CreateStopParams

type CreateStopParams struct {
	StopID             string           `db:"stop_id"`
	StopCode           sql.NullString   `db:"stop_code"`
	StopName           string           `db:"stop_name"`
	TtsStopName        sql.NullString   `db:"tts_stop_name"`
	StopDesc           sql.NullString   `db:"stop_desc"`
	StopLat            float64          `db:"stop_lat"`
	StopLon            float64          `db:"stop_lon"`
	ZoneID             sql.NullString   `db:"zone_id"`
	StopUrl            sql.NullString   `db:"stop_url"`
	LocationType       NullLocationType `db:"location_type"`
	ParentStation      sql.NullString   `db:"parent_station"`
	StopTimezone       sql.NullString   `db:"stop_timezone"`
	WheelchairBoarding NullAccessType   `db:"wheelchair_boarding"`
	LevelID            sql.NullString   `db:"level_id"`
	PlatformCode       sql.NullString   `db:"platform_code"`
}

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 LocationType

type LocationType string
const (
	LocationTypePlatform     LocationType = "Platform"
	LocationTypeStation      LocationType = "Station"
	LocationTypeExit         LocationType = "Exit"
	LocationTypeNode         LocationType = "Node"
	LocationTypeBoardingArea LocationType = "BoardingArea"
)

func (*LocationType) Scan

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

type NullAccessType

type NullAccessType struct {
	AccessType AccessType
	Valid      bool // Valid is true if AccessType is not NULL
}

func (*NullAccessType) Scan

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

Scan implements the Scanner interface.

func (NullAccessType) Value

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

Value implements the driver Valuer interface.

type NullLocationType

type NullLocationType struct {
	LocationType LocationType
	Valid        bool // Valid is true if LocationType is not NULL
}

func (*NullLocationType) Scan

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

Scan implements the Scanner interface.

func (NullLocationType) Value

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

Value implements the driver Valuer interface.

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) CreateStop

func (q *Queries) CreateStop(ctx context.Context, arg CreateStopParams) error

func (*Queries) GetStopByID

func (q *Queries) GetStopByID(ctx context.Context, stopID string) (Stop, error)

func (*Queries) WithTx

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

type Stop

type Stop struct {
	StopID             string           `csv:"stop_id"`
	StopCode           sql.NullString   `csv:"stop_code,omitempty"`
	StopName           string           `csv:"stop_name"`
	TtsStopName        sql.NullString   `csv:"tts_stop_name,omitempty"`
	StopDesc           sql.NullString   `csv:"stop_desc,omitempty"`
	StopLat            float64          `csv:"stop_lat"`
	StopLon            float64          `csv:"stop_lon"`
	ZoneID             sql.NullString   `csv:"zone_id,omitempty"`
	StopUrl            sql.NullString   `csv:"stop_url,omitempty"`
	LocationType       NullLocationType `csv:"location_type"`
	ParentStation      sql.NullString   `csv:"parent_station,omitempty"`
	StopTimezone       sql.NullString   `csv:"stop_timezone,omitempty"`
	WheelchairBoarding NullAccessType   `csv:"wheelchair_boarding"`
	LevelID            sql.NullString   `csv:"level_id,omitempty"`
	PlatformCode       sql.NullString   `csv:"platform_code,omitempty"`
}

Jump to

Keyboard shortcuts

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