controllers

package
v0.0.0-...-1843f7d Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2014 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClientIP

func GetClientIP(input *context.BeegoInput) string

Types

type MdRequestController

type MdRequestController struct {
	beego.Controller
}

Operations about object

func (*MdRequestController) Get

func (this *MdRequestController) Get()

type ObjectController

type ObjectController struct {
	beego.Controller
}

Operations about object

func (*ObjectController) Delete

func (this *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 (this *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 (this *ObjectController) GetAll()

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

func (*ObjectController) Post

func (this *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 (this *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 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 Get @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} lonin 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]

Jump to

Keyboard shortcuts

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