Documentation
¶
Index ¶
- func GetValidate() *validator.Validate
- func VerifyCertificateFormat(password validator.FieldLevel) bool
- func VerifyDateFormat(date validator.FieldLevel) bool
- func VerifyInitialNameFormat(initialName validator.FieldLevel) bool
- func VerifyMobilePhoneFormat(mobilePhone validator.FieldLevel) bool
- func VerifyNameFormat(password validator.FieldLevel) bool
- func VerifyPasswordFormat(password validator.FieldLevel) bool
- func VerifyStationNameFormat(stationName validator.FieldLevel) bool
- func VerifyTimeFormat(date validator.FieldLevel) bool
- func VerifyTrainNoFormat(trainNo validator.FieldLevel) bool
- func VerifyUsernameFormat(username validator.FieldLevel) bool
- type AddRegularPassenger
- type CancelOrder
- type CreateOrder
- type DeleteRegularPassenger
- type GetScheduleDetail
- type GetScheduleList
- type GetStation
- type GetStop
- type Login
- type PayMoney
- type QueryRegularPassenger
- type QueryUserInformation
- type RefundMoney
- type Register
- type ScheduleList
- type SearchStation
- type StationList
- type StopList
- type UpdatePassword
- type UpdateRegularPassenger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetValidate ¶
func GetValidate() *validator.Validate
func VerifyCertificateFormat ¶
func VerifyCertificateFormat(password validator.FieldLevel) bool
func VerifyDateFormat ¶
func VerifyDateFormat(date validator.FieldLevel) bool
func VerifyInitialNameFormat ¶
func VerifyInitialNameFormat(initialName validator.FieldLevel) bool
func VerifyMobilePhoneFormat ¶
func VerifyMobilePhoneFormat(mobilePhone validator.FieldLevel) bool
func VerifyNameFormat ¶
func VerifyNameFormat(password validator.FieldLevel) bool
func VerifyPasswordFormat ¶
func VerifyPasswordFormat(password validator.FieldLevel) bool
func VerifyStationNameFormat ¶
func VerifyStationNameFormat(stationName validator.FieldLevel) bool
func VerifyTimeFormat ¶
func VerifyTimeFormat(date validator.FieldLevel) bool
func VerifyTrainNoFormat ¶
func VerifyTrainNoFormat(trainNo validator.FieldLevel) bool
func VerifyUsernameFormat ¶
func VerifyUsernameFormat(username validator.FieldLevel) bool
Types ¶
type AddRegularPassenger ¶
type CancelOrder ¶
type CancelOrder struct {
OrderID uint64 `json:"order_id"`
}
type CreateOrder ¶
type DeleteRegularPassenger ¶
type DeleteRegularPassenger struct {
PassengerID uint `validate:"required" json:"passenger_id"`
}
type GetScheduleDetail ¶
type GetScheduleList ¶
type GetStation ¶
type GetStation struct {
InitialName string `json:"initial_name" validate:"required,len=1,VerifyInitialNameFormat"`
}
type QueryRegularPassenger ¶
type QueryRegularPassenger struct { CertificateType string `json:"certificate_type"` Name string `json:"name"` Certificate string `json:"certificate"` PassengerType string `json:"passenger_type"` CheckStatus string `json:"check_status"` CreateDate string `json:"create_date"` MobilePhone string `json:"mobile_phone"` }
type QueryUserInformation ¶
type QueryUserInformation struct { Username string `json:"username"` Name string `json:"name"` Country string `json:"country"` CertificateType string `json:"certificate_type"` Certificate string `json:"certificate"` CheckStatus string `json:"check_status"` MobilePhone string `json:"mobile_phone"` Email string `json:"email"` PassengerType string `json:"passenger_type"` }
type RefundMoney ¶
type RefundMoney struct {
OrderID uint64 `json:"order_id"`
}
type Register ¶
type Register struct { Username string `validate:"required,VerifyUsernameFormat" json:"username"` Password string `validate:"required,VerifyPasswordFormat" json:"password"` Email string `validate:"required,email" json:"email"` MobilePhone string `validate:"required,numeric,len=11,VerifyMobilePhoneFormat" json:"mobile_phone"` Name string `validate:"required" json:"name"` Certificate string `validate:"required" json:"certificate"` }
type ScheduleList ¶
type ScheduleList struct { TrainNo string `json:"train_no"` TrainType string `json:"train_type"` TicketStatus string `json:"ticket_status"` StartTime time.Time `json:"start_time"` EndTime time.Time `json:"end_time"` Duration uint `json:"duration"` StartStation StationList `json:"start_station"` EndStation StationList `json:"end_station"` }
type SearchStation ¶
type SearchStation struct {
Key string `json:"key" validate:"required"`
}
type StationList ¶
type StationList struct { StationID uint `json:"station_id"` StationName string `json:"station_name"` InitialName string `json:"initial_name"` Pinyin string `json:"pinyin"` CityNo string `json:"city_no"` CityName string `json:"city_name"` ShowName string `json:"show_name"` NameType string `json:"name_type"` }
type UpdatePassword ¶
type UpdatePassword struct {
Password string `validate:"required,VerifyPasswordFormat" json:"password""`
}
type UpdateRegularPassenger ¶
Click to show internal directories.
Click to hide internal directories.