Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChartDoc ¶
type ChartDoc struct { ID string `bson:"_id"` TrainSchemaID string `bson:"trainschema_id"` Date string `bson:"Date"` Availability []string `bson:"Availability"` TicketIDs []string `bson:"traintickets_id"` ExpireAt time.Time `bson:"expireAt"` TrainNumber int `bson:"TrainNumber"` }
ChartDoc ChartDoc
func GetAllCharts ¶
GetAllCharts fetches trainSchema from db
type SchemaDoc ¶
type SchemaDoc struct { ID string `bson:"_id"` TrainName string `bson:"TrainName"` TrainNumber int `bson:"TrainNumber"` Frequency []string `bson:"Frequency"` Availability []TicketSchema `bson:"Availability"` Stops []StationSchema `bson:"Stops"` }
SchemaDoc SchemaDoc
func FindMatchSchema ¶
FindMatchSchema FindMatchSchema
func FindSchema ¶
FindSchema fetches trainSchema from db
func GetAllSchema ¶
GetAllSchema fetches trainSchema from db
type StationSchema ¶
type StationSchema struct { Position int `bson:"Position"` Name string `bson:"Name"` Arrive string `bson:"Arive"` ArriveOffset int `bson:"ArriveOffset"` Depart string `bson:"Depart"` DepartOffset int `bson:"DepartOffset"` }
StationSchema StationSchema
func (*StationSchema) GetArriveTime ¶
func (ss *StationSchema) GetArriveTime(date string) time.Time
GetArriveTime GetArriveTime
func (*StationSchema) GetDepartTime ¶
func (ss *StationSchema) GetDepartTime(date string) time.Time
GetDepartTime GetArriGetDepartTimeveTime
type TicketSchema ¶
type TicketSchema struct { Class string `bson:"Class"` SeatsTotal int `bson:"Seatstotal"` Fare int `bson:"Fare"` }
TicketSchema TicketSchema
type UserDoc ¶
UserDoc placeholder for User credentials.
func (*UserDoc) Authenticate ¶
Authenticate authenticates user against input password
func (*UserDoc) RegisterUser ¶
RegisterUser adds doc to users collection
func (*UserDoc) UpdateUserPassword ¶
UpdateUserPassword updates password for existing user
func (*UserDoc) UpdateUserStatus ¶
UpdateUserStatus updates password for existing user
Click to show internal directories.
Click to hide internal directories.