Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionController ¶
type ActionController struct {
Controller
}
ActionController regroup all endpoints concern action
func (*ActionController) BeforePost ¶
func (c *ActionController) BeforePost()
BeforePost verify if the user is allowed to create an action
func (*ActionController) Post ¶
func (c *ActionController) Post(i *models.ActionInput)
Post create a new action
type AlertController ¶
type AlertController struct {
Controller
}
AlertController regroup all endpoints concern alert
func (*AlertController) BeforeCGet ¶
func (c *AlertController) BeforeCGet()
BeforeCGet verify user is allowed to get all alerts
func (*AlertController) BeforePost ¶
func (c *AlertController) BeforePost()
BeforePost verify if user is allowed to create an alert
func (*AlertController) CGet ¶
func (c *AlertController) CGet(f *filters.Alert)
CGet returns alerts filtered
func (*AlertController) Post ¶
func (c *AlertController) Post(stationID int, stopTimeID int, i *models.AlertInput)
Post create a new alert
type HealthController ¶ added in v1.1.1
type HealthController struct {
Controller
}
HealthController regroup all endpoints for health check
func (*HealthController) Get ¶ added in v1.1.1
func (c *HealthController) Get(code string)
Get return status of the API
type StationController ¶
type StationController struct {
Controller
}
StationController regroup all endpoints concern station
func (*StationController) BeforePost ¶
func (c *StationController) BeforePost()
BeforePost verify if user is allowed to create a train
func (*StationController) CGet ¶
func (c *StationController) CGet(f *filters.Station)
CGet regroup list of stations
func (*StationController) Get ¶
func (c *StationController) Get(stationID uint)
Get return one station
func (*StationController) Post ¶
func (c *StationController) Post(i *models.StationInput)
Post create a new train
type StopTimeController ¶
type StopTimeController struct {
Controller
}
StopTimeController regroup all endpoints concern stop
func (*StopTimeController) CGetByStation ¶
func (c *StopTimeController) CGetByStation(stationID int, f *filters.StopTime)
CGetByStation return all stops for one given station
type TripController ¶
type TripController struct {
Controller
}
TripController regroup all endpoints for train
type UserController ¶
type UserController struct {
Controller
}
UserController regroup all endpoints concern the user
func (*UserController) Post ¶
func (c *UserController) Post(i *models.UserInput)
Post create new user
func (*UserController) Token ¶
func (c *UserController) Token(t *models.UserToken)
Token authenticate one user