controllers

package
v0.0.0-...-8269def Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MyWebSocketController

type MyWebSocketController struct {
	beego.Controller
}

func (*MyWebSocketController) Get

func (c *MyWebSocketController) Get()

type ObjectController

type ObjectController struct {
	beego.Controller
}

Operations about object

func (*ObjectController) Delete

func (o *ObjectController) Delete()

@Title Delete @Description delete the object @Param objectId path string true "The objectId you want to delete" @Success 200 {string} delete success! @Failure 403 objectId is empty @router /:objectId [delete]

func (*ObjectController) Get

func (o *ObjectController) Get()

@Title Get @Description find object by objectid @Param objectId path string true "the objectid you want to get" @Success 200 {object} models.Object @Failure 403 :objectId is empty @router /:objectId [get]

func (*ObjectController) GetAll

func (o *ObjectController) GetAll()

@Title GetAll @Description get all objects @Success 200 {object} models.Object @Failure 403 :objectId is empty @router / [get]

func (*ObjectController) Post

func (o *ObjectController) Post()

@Title Create @Description create object @Param body body models.Object true "The object content" @Success 200 {string} models.Object.Id @Failure 403 body is empty @router / [post]

func (*ObjectController) Put

func (o *ObjectController) Put()

@Title Update @Description update the object @Param objectId path string true "The objectid you want to update" @Param body body models.Object true "The body" @Success 200 {object} models.Object @Failure 403 :objectId is empty @router /:objectId [put]

type RoutesStruct

type RoutesStruct struct {
	RouteId      int     `orm:"column(route_id);null;pk"`
	RouteDesc    string  `orm:"column(route_desc);null"`
	RouteType    int     `orm:"column(route_type);null"`
	TripWallet   string  `orm:"column(trip_wallet);null"`
	Places       int     `orm:"column(places);null"`
	Schedule     string  `orm:"column(schedule);null"`
	CurrencyType string  `orm:"column(currency_type)"`
	Price        float64 `orm:"column(price)"`

	FromLabel string  `orm:"column(from_label);null"`
	ToLabel   string  `orm:"column(to_label);null"`
	FromLat   float32 `orm:"column(from_lat);null"`
	FromLng   float32 `orm:"column(from_lng);null"`
	ToLat     float32 `orm:"column(to_lat);null"`
	ToLng     float32 `orm:"column(to_lng);null"`

	WheelchairAccessible bool `orm:"column(wheelchair_accessible);null"`

	AgencyId   int    `orm:"column(agency_id);null;pk"`
	AgencyName string `orm:"column(agency_name)"`
	AgencyUrl  string `orm:"column(agency_url);null"`
}

type SearchController

type SearchController struct {
	beego.Controller
}

SearchController operations for Search

func (*SearchController) BuyedTickets

func (c *SearchController) BuyedTickets()

@Param route_id path int true "Route Id" @Param time path int true "Time" @router /buyed-tickets/:route_id/:time [get]

func (*SearchController) BuyedTicketsInTimes

func (c *SearchController) BuyedTicketsInTimes()

@Param route_id path int true "Route Id" @Param times query string true "Array of times" @router /buyed-tickets-in-times/:route_id [post]

func (*SearchController) CarrierRoutes

func (c *SearchController) CarrierRoutes()

@Param wallet query string true "Carrier wallet address" @router /carrier-routes [post]

func (*SearchController) Get

func (c *SearchController) Get()

GetOne ... @Title GetOne @Description get Search by id @Param id path string true "The key for staticblock" @Success 200 {object} models.Search @Failure 403 :id is empty @router /:id [get]

func (*SearchController) GetAll

func (c *SearchController) GetAll()

GetAll ... @Title GetAll @Description get Search @Param brand_id query string true "Latitude from" @Failure 403 @router /

func (*SearchController) PassagerTickets

func (c *SearchController) PassagerTickets()

@Param wallet query string true "Wallet address" @router /passager-tickets [post]

type SearchQuery

type SearchQuery struct {
	FromLat string
	FromLng string
	ToLat   string
	ToLng   string
	Radius  int // in meters
	Date    []int
	Limit   int
}

type TimesResult

type TimesResult struct {
	Time  int
	Count int
}

type UserController

type UserController struct {
	beego.Controller
}

Operations about Users

func (*UserController) Delete

func (u *UserController) Delete()

@Title Delete @Description delete the user @Param uid path string true "The uid you want to delete" @Success 200 {string} delete success! @Failure 403 uid is empty @router /:uid [delete]

func (*UserController) Get

func (u *UserController) Get()

@Title Get @Description get user by uid @Param uid path string true "The key for staticblock" @Success 200 {object} models.User @Failure 403 :uid is empty @router /:uid [get]

func (*UserController) GetAll

func (u *UserController) GetAll()

@Title GetAll @Description get all Users @Success 200 {object} models.User @router / [get]

func (*UserController) Login

func (u *UserController) Login()

@Title Login @Description Logs user into the system @Param username query string true "The username for login" @Param password query string true "The password for login" @Success 200 {string} login success @Failure 403 user not exist @router /login [get]

func (*UserController) Logout

func (u *UserController) Logout()

@Title logout @Description Logs out current logged in user session @Success 200 {string} logout success @router /logout [get]

func (*UserController) Post

func (u *UserController) Post()

@Title CreateUser @Description create users @Param body body models.User true "body for user content" @Success 200 {int} models.User.Id @Failure 403 body is empty @router / [post]

func (*UserController) Put

func (u *UserController) Put()

@Title Update @Description update the user @Param uid path string true "The uid you want to update" @Param body body models.User true "body for user content" @Success 200 {object} models.User @Failure 403 :uid is not int @router /:uid [put]

type UserTickets

type UserTickets struct {
	Count   int
	Time    int
	RouteId int
}

Jump to

Keyboard shortcuts

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