controllers

package
v2.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2017 License: GPL-3.0 Imports: 15 Imported by: 0

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 Controller

type Controller struct {
	*aah.Context
}

Controller extend aah.Context

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

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

func (*TripController) Get

func (c *TripController) Get(tripID int)

Get return one trip

func (*TripController) GetTerminus

func (c *TripController) GetTerminus(tripID uint)

GetTerminus return terminus of the trip

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

Jump to

Keyboard shortcuts

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