isutraindb

package
v0.0.0-...-f1a69a6 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDistanceFare

func GetDistanceFare(from, to string) (int, error)

GetDistanceFare は距離運賃を取得します

func GetFare

func GetFare(reservationID int, t time.Time, departure, arrival string, trainClass, seatClass string) (int, error)

func GetFareMultiplier

func GetFareMultiplier(trainClass, seatClass string, useAt time.Time) float64

GetFareMultiplier は列車や座席種別、期間倍率を元に、運賃倍率を返します

func GetSeatClass

func GetSeatClass(trainClass string, carNum int) string

GetSeatClass は、列車クラスと車両番号から座席クラスを解決します

func GetStopInfo

func GetStopInfo(station string) (isStopExpress, isStopSemiExpress, isStopLocal bool, err error)

GetStopInfo は、駅に停車するフラグ情報を返します

Types

type FareMultiplierQuery

type FareMultiplierQuery struct {
	TrainClass string
	SeatClass  string
}

type StopInfo

type StopInfo struct {
	IsStopExpress     bool
	IsStopSemiExpress bool
	IsStopLocal       bool
}

StopInfo は駅に停車するフラグ情報です

Jump to

Keyboard shortcuts

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