Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alert ¶
type Alert struct { Pagination Code string `bind:"code_train"` StationID int `bind:"station_id"` }
Alert filter
type Filter ¶
type Filter interface { ApplyFilter(db *gorm.DB) *gorm.DB ApplyPagination(db *gorm.DB) *gorm.DB GetPage() int GetLimit() int }
Filter interface
type Pagination ¶
Pagination query param
func (*Pagination) ApplyFilter ¶
func (p *Pagination) ApplyFilter(db *gorm.DB) *gorm.DB
ApplyFilter on query
func (*Pagination) ApplyPagination ¶
func (p *Pagination) ApplyPagination(db *gorm.DB) *gorm.DB
ApplyPagination on query
func (*Pagination) GetLimit ¶
func (p *Pagination) GetLimit() int
GetLimit return safe limit_per_page (no negative or too large)
func (*Pagination) GetPage ¶
func (p *Pagination) GetPage() int
GetPage return safe page (no negative)
type Stop ¶
type Stop struct { Pagination TerminusID uint `bind:"terminus_id"` TerminusName string `bind:"terminus_name"` TrainThroughStationID uint `bind:"train_through_station_id"` Mission string `bind:"mission"` ScheduledBefore string `bind:"scheduled_before"` ScheduledAfter string `bind:"scheduled_after"` ScheduledAt string `bind:"scheduled_at"` }
Stop filters
Click to show internal directories.
Click to hide internal directories.