Documentation ¶
Index ¶
- func Authenticate(email string, password string) (user *models.User, err error)
- type BaseController
- func (c *BaseController) BuildRequestUrl(uri string) string
- func (c *BaseController) DelLogin()
- func (c *BaseController) Finish()
- func (c *BaseController) GetLogin() *models.User
- func (c *BaseController) LoginPath() string
- func (c *BaseController) Prepare()
- func (c *BaseController) SetLogin(user *models.User)
- func (c *BaseController) SetParams()
- type LoginController
- type MentorRequestController
- func (c *MentorRequestController) Delete()
- func (c *MentorRequestController) GetAll()
- func (c *MentorRequestController) GetManyByMenteeId()
- func (c *MentorRequestController) GetManyByMentorId()
- func (c *MentorRequestController) GetOne()
- func (c *MentorRequestController) Post()
- func (c *MentorRequestController) Put()
- func (c *MentorRequestController) URLMapping()
- type MentorTopicController
- type NestFinisher
- type NestPreparer
- type TopicController
- type UserController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseController ¶
type BaseController struct { beego.Controller User *models.User IsLogin bool }
func (*BaseController) BuildRequestUrl ¶
func (c *BaseController) BuildRequestUrl(uri string) string
func (*BaseController) DelLogin ¶
func (c *BaseController) DelLogin()
func (*BaseController) Finish ¶
func (c *BaseController) Finish()
func (*BaseController) GetLogin ¶
func (c *BaseController) GetLogin() *models.User
func (*BaseController) LoginPath ¶
func (c *BaseController) LoginPath() string
func (*BaseController) Prepare ¶
func (c *BaseController) Prepare()
func (*BaseController) SetLogin ¶
func (c *BaseController) SetLogin(user *models.User)
func (*BaseController) SetParams ¶
func (c *BaseController) SetParams()
type LoginController ¶
type LoginController struct {
BaseController
}
func (*LoginController) Login ¶
func (c *LoginController) Login()
func (*LoginController) Logout ¶
func (c *LoginController) Logout()
func (*LoginController) Signup ¶
func (c *LoginController) Signup()
type MentorRequestController ¶
type MentorRequestController struct {
beego.Controller
}
MentorRequestController oprations for MentorRequest
func (*MentorRequestController) Delete ¶
func (c *MentorRequestController) Delete()
Delete ... @Title Delete @Description delete the MentorRequest @Param id path string true "The id you want to delete" @Success 200 {string} delete success! @Failure 403 id is empty @router /:id [delete]
func (*MentorRequestController) GetAll ¶
func (c *MentorRequestController) GetAll()
GetAll ... @Title Get All @Description get MentorRequest @Param query query string false "Filter. e.g. col1:v1,col2:v2 ..." @Param fields query string false "Fields returned. e.g. col1,col2 ..." @Param sortby query string false "Sorted-by fields. e.g. col1,col2 ..." @Param order query string false "Order corresponding to each sortby field, if single value, apply to all sortby fields. e.g. desc,asc ..." @Param limit query string false "Limit the size of result set. Must be an integer" @Param offset query string false "Start position of result set. Must be an integer" @Success 200 {object} models.MentorRequest @Failure 403 @router / [get]
func (*MentorRequestController) GetManyByMenteeId ¶
func (c *MentorRequestController) GetManyByMenteeId()
GetManyByMenteeId ... @Title Get One @Description get MentorRequest by MenteeId @Param id path string true "The key for staticblock" @Success 200 {object} models.MentorRequest @Failure 403 :MenteeId is empty @router /mentee/:menteeid [get]
func (*MentorRequestController) GetManyByMentorId ¶
func (c *MentorRequestController) GetManyByMentorId()
GetManyByMentorId ... @Title Get One @Description get MentorRequest by MentorId @Param id path string true "The key for staticblock" @Success 200 {object} models.MentorRequest @Failure 403 :mentorid is empty @router /mentor/:mentorid [get]
func (*MentorRequestController) GetOne ¶
func (c *MentorRequestController) GetOne()
GetOne ... @Title Get One @Description get MentorRequest by MentorId and MenteeId @Param id path string true "The key for staticblock" @Success 200 {object} models.MentorRequest @Failure 403 :mentorid or :menteeid is empty @router /:mentorid/:menteeid [get]
func (*MentorRequestController) Post ¶
func (c *MentorRequestController) Post()
Post ... @Title Post @Description create MentorRequest @Param body body models.MentorRequest true "body for MentorRequest content" @Success 201 {int} models.MentorRequest @Failure 403 body is empty @router / [post]
func (*MentorRequestController) Put ¶
func (c *MentorRequestController) Put()
Put ... @Title Put @Description update the MentorRequest @Param id path string true "The id you want to update" @Param body body models.MentorRequest true "body for MentorRequest content" @Success 200 {object} models.MentorRequest @Failure 403 :id is not int @router /:mentorid/:menteeid [put]
func (*MentorRequestController) URLMapping ¶
func (c *MentorRequestController) URLMapping()
URLMapping ...
type MentorTopicController ¶
type MentorTopicController struct {
beego.Controller
}
MentorTopicController oprations for MentorTopic
func (*MentorTopicController) Delete ¶
func (c *MentorTopicController) Delete()
Delete ... @Title Delete @Description delete the MentorTopic @Param id path string true "The id you want to delete" @Success 200 {string} delete success! @Failure 403 id is empty @router /:id [delete]
func (*MentorTopicController) GetAll ¶
func (c *MentorTopicController) GetAll()
GetAll ... @Title Get All @Description get MentorTopic @Param query query string false "Filter. e.g. col1:v1,col2:v2 ..." @Param fields query string false "Fields returned. e.g. col1,col2 ..." @Param sortby query string false "Sorted-by fields. e.g. col1,col2 ..." @Param order query string false "Order corresponding to each sortby field, if single value, apply to all sortby fields. e.g. desc,asc ..." @Param limit query string false "Limit the size of result set. Must be an integer" @Param offset query string false "Start position of result set. Must be an integer" @Success 200 {object} models.MentorTopic @Failure 403 @router / [get]
func (*MentorTopicController) GetOne ¶
func (c *MentorTopicController) GetOne()
GetOne ... @Title Get One @Description get MentorTopic by id @Param id path string true "The key for staticblock" @Success 200 {object} models.MentorTopic @Failure 403 :id is empty @router /:id [get]
func (*MentorTopicController) Post ¶
func (c *MentorTopicController) Post()
Post ... @Title Post @Description create MentorTopic @Param body body models.MentorTopic true "body for MentorTopic content" @Success 201 {int} models.MentorTopic @Failure 403 body is empty @router / [post]
func (*MentorTopicController) Put ¶
func (c *MentorTopicController) Put()
Put ... @Title Put @Description update the MentorTopic @Param id path string true "The id you want to update" @Param body body models.MentorTopic true "body for MentorTopic content" @Success 200 {object} models.MentorTopic @Failure 403 :id is not int @router /:id [put]
func (*MentorTopicController) URLMapping ¶
func (c *MentorTopicController) URLMapping()
URLMapping ...
type NestFinisher ¶
type NestFinisher interface {
NestFinish()
}
type NestPreparer ¶
type NestPreparer interface {
NestPrepare()
}
type TopicController ¶
type TopicController struct {
beego.Controller
}
TopicController operations for Topic
func (*TopicController) Delete ¶
func (c *TopicController) Delete()
Delete ... @Title Delete @Description delete the Topic @Param id path string true "The id you want to delete" @Success 200 {string} delete success! @Failure 403 id is empty @router /:id [delete]
func (*TopicController) GetAll ¶
func (c *TopicController) GetAll()
GetAll ... @Title Get All @Description get Topic @Param query query string false "Filter. e.g. col1:v1,col2:v2 ..." @Param fields query string false "Fields returned. e.g. col1,col2 ..." @Param sortby query string false "Sorted-by fields. e.g. col1,col2 ..." @Param order query string false "Order corresponding to each sortby field, if single value, apply to all sortby fields. e.g. desc,asc ..." @Param limit query string false "Limit the size of result set. Must be an integer" @Param offset query string false "Start position of result set. Must be an integer" @Success 200 {object} models.Topic @Failure 403 @router / [get]
func (*TopicController) GetOne ¶
func (c *TopicController) GetOne()
GetOne ... @Title Get One @Description get Topic by id @Param id path string true "The key for staticblock" @Success 200 {object} models.Topic @Failure 403 :id is empty @router /:id [get]
func (*TopicController) Post ¶
func (c *TopicController) Post()
Post ... @Title Post @Description create Topic @Param body body models.Topic true "body for Topic content" @Success 201 {int} models.Topic @Failure 403 body is empty @router / [post]
func (*TopicController) Put ¶
func (c *TopicController) Put()
Put ... @Title Put @Description update the Topic @Param id path string true "The id you want to update" @Param body body models.Topic true "body for Topic content" @Success 200 {object} models.Topic @Failure 403 :id is not int @router /:id [put]
type UserController ¶
type UserController struct {
beego.Controller
}
UserController operations for User
func (*UserController) Delete ¶
func (c *UserController) Delete()
Delete ... @Title Delete @Description delete the User @Param id path string true "The id you want to delete" @Success 200 {string} delete success! @Failure 403 id is empty @router /:id [delete]
func (*UserController) GetAll ¶
func (c *UserController) GetAll()
GetAll ... @Title Get All @Description get User @Param query query string false "Filter. e.g. col1:v1,col2:v2 ..." @Param fields query string false "Fields returned. e.g. col1,col2 ..." @Param sortby query string false "Sorted-by fields. e.g. col1,col2 ..." @Param order query string false "Order corresponding to each sortby field, if single value, apply to all sortby fields. e.g. desc,asc ..." @Param limit query string false "Limit the size of result set. Must be an integer" @Param offset query string false "Start position of result set. Must be an integer" @Success 200 {object} models.User @Failure 403 @router / [get]
func (*UserController) GetOne ¶
func (c *UserController) GetOne()
GetOne ... @Title Get One @Description get User by id @Param id path string true "The key for staticblock" @Success 200 {object} models.User @Failure 403 :id is empty @router /:id [get]
func (*UserController) Post ¶
func (c *UserController) Post()
Post ... @Title Post @Description create User @Param body body models.User true "body for User content" @Success 201 {int} models.User @Failure 403 body is empty @router / [post]
func (*UserController) Put ¶
func (c *UserController) Put()
Put ... @Title Put @Description update the User @Param id path string true "The id you want to update" @Param body body models.User true "body for User content" @Success 200 {object} models.User @Failure 403 :id is not int @router /:id [put]