controllers

package
v0.0.0-...-663ef3c Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2017 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	*revel.Controller
}

func (App) Index

func (c App) Index() revel.Result

type CourseController

type CourseController struct {
	*revel.Controller
}

func (CourseController) Add

func (c CourseController) Add() revel.Result

Add 添加一个课程

func (CourseController) List

func (c CourseController) List() revel.Result

List 获取学科列表

type Demo

type Demo struct {
	*revel.Controller
}

Demo just a test

func (Demo) Test

func (d Demo) Test() revel.Result

type NewsController

type NewsController struct {
	*revel.Controller
}

NewsController is news controller 😂

func (NewsController) GetAll

func (n NewsController) GetAll() revel.Result

GetAll from models.News

func (NewsController) GetOne

func (n NewsController) GetOne(nid int) revel.Result

GetOne from models.News

func (NewsController) GetTrendings

func (n NewsController) GetTrendings() revel.Result

GetTrendings 获取趋势较好的文章

func (*NewsController) Save

func (n *NewsController) Save() revel.Result

Save a news from user request

type PaperController

type PaperController struct {
	*revel.Controller
}

PaperController paper that has many questions

func (*PaperController) Add

func (p *PaperController) Add() revel.Result

Add 添加考卷

func (PaperController) Avg

func (p PaperController) Avg(cid int) revel.Result

Avg is get a paper avg score

func (PaperController) Fetch

func (p PaperController) Fetch(pid int) revel.Result

Fetch a paper by paper id

func (PaperController) List

func (p PaperController) List() revel.Result

List 列出所有考卷

func (PaperController) Random

func (p PaperController) Random(cid int) revel.Result

Random just for test. it get random question form database

type QuestionController

type QuestionController struct {
	*revel.Controller
}

QuestionController is question controller

func (*QuestionController) Add

func (q *QuestionController) Add(cid int) revel.Result

Add 添加题库,cid是课程ID

func (QuestionController) AddFromExcel

func (q QuestionController) AddFromExcel() revel.Result

AddFromExcel 将文件传入服务中,解析并返回数据

func (QuestionController) Fetch

func (q QuestionController) Fetch(qid int) revel.Result

Fetch find a question by questionID

func (QuestionController) FetchAll

func (q QuestionController) FetchAll() revel.Result

type UserController

type UserController struct {
	*revel.Controller
}

UserControl 用户管理

func (UserController) Add

func (c UserController) Add() revel.Result

Add 添加用户 http -f POST :9000/auth/register username='AnnatarHe' pwd='aaa' school_id='01111111' role='11'

func (UserController) Fetch

func (c UserController) Fetch(uid int) revel.Result

Fetch 获取某个用户数据

func (UserController) FinishedPaper

func (c UserController) FinishedPaper(pid int) revel.Result

FinishedPaper is 完成了某张卷子,记录

func (UserController) Login

func (c UserController) Login() revel.Result

Login 用户登录 this interface should get username and password for auth

func (UserController) Me

func (c UserController) Me() revel.Result

Me get my profile

Jump to

Keyboard shortcuts

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