web

package
v0.0.0-...-4b5f6dc Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageController

type MessageController struct {
	Ctx     iris.Context
	Service service.MsgService
	Session *sessions.Session
}

func (*MessageController) GetAll

func (c *MessageController) GetAll() interface{}

---------------------工作汇报------------------- GET /rest/msg/all

type ReportController

type ReportController struct {
	Ctx     iris.Context
	Service service.ReportService
	Session *sessions.Session
}

type RestController

type RestController struct {
	Ctx           iris.Context
	UserService   service.UserService
	JobLogService service.JobLogService
	ProService    service.ProService
	OrganService  service.OrganService
	TypeService   service.JobTypeService
	Session       *sessions.Session
}

rest controller - 管理用户 查看所有用户工作记录

func (*RestController) DeleteJobBy

func (c *RestController) DeleteJobBy(id int64) interface{}

DELETE /rest/job/1

func (*RestController) DeleteOrganBy

func (c *RestController) DeleteOrganBy(id int64) interface{}

DELETE /rest/organ/1

func (*RestController) DeleteProBy

func (c *RestController) DeleteProBy(id int64) mvc.Response

删除项目 DELETE /rest/pro/12

func (*RestController) DeleteTypeBy

func (c *RestController) DeleteTypeBy(id int64) interface{}

DELETE /rest/type/1

func (*RestController) DeleteUserBy

func (c *RestController) DeleteUserBy(id int64) mvc.Response

删除用户 DELETE /rest/user/12

func (*RestController) GetJobBy

func (c *RestController) GetJobBy(id int64) interface{}

GET /rest/job/1

func (*RestController) GetJobMe

func (c *RestController) GetJobMe() interface{}

获取当前用户的工作日志 GET /rest/job/me

func (*RestController) GetJobs

func (c *RestController) GetJobs() interface{}

---------------------工作日志------------------- GET /rest/jobs

func (*RestController) GetMonthly

func (c *RestController) GetMonthly() interface{}

GET /rest/report/monthly

func (*RestController) GetOrganBy

func (c *RestController) GetOrganBy(id int64) interface{}

GET /rest/organ/1

func (*RestController) GetOrgans

func (c *RestController) GetOrgans() interface{}

--------------部门------------------- GET /rest/organs

func (*RestController) GetProBy

func (c *RestController) GetProBy(id int64) interface{}

GET /rest/pro/12

func (*RestController) GetPros

func (c *RestController) GetPros() mvc.Response

-----------------项目--------------------------- 获取所有项目

func (*RestController) GetTypeBy

func (c *RestController) GetTypeBy(id int64) interface{}

GET /rest/type/1

func (*RestController) GetTypes

func (c *RestController) GetTypes() interface{}

--------------工作类型---------------- GET /rest/types

func (*RestController) GetUserBy

func (c *RestController) GetUserBy(id int64) interface{}

GET /rest/user/1

func (*RestController) GetUsers

func (c *RestController) GetUsers() mvc.Response

---------------------用户----------------------- 获取所有用户 GET /rest/users

func (*RestController) PostJob

func (c *RestController) PostJob() interface{}

POST /rest/job

func (*RestController) PostOrgan

func (c *RestController) PostOrgan() interface{}

POST /rest/organ

func (*RestController) PostPro

func (c *RestController) PostPro() interface{}

提交 POST /rest/pro

func (*RestController) PostType

func (c *RestController) PostType() interface{}

POST /rest/type

func (*RestController) PostUser

func (c *RestController) PostUser() interface{}

提交用户 POST /rest/user

type UserController

type UserController struct {
	// context is auto-binded by Iris on each request,
	// remember that on each incoming request iris creates a new UserController each time,
	// so all fields are request-scoped by-default, only dependency injection is able to set
	// custom fields like the Service which is the same for all requests (static binding)
	// and the Session which depends on the current context (dynamic binding).
	Ctx iris.Context

	// Our UserService, it's an interface which
	// is binded from the main application.
	Service service.UserService

	// Session, binded using dependency injection from the main.go.
	Session *sessions.Session
}

func (*UserController) GetAlter

func (c *UserController) GetAlter() interface{}

修改用户密码 GET /user/alter

func (*UserController) GetMe

func (c *UserController) GetMe() interface{}

获取当前用户信息 Resource: http://localhost:8080/user/me

func (*UserController) GetText

func (c *UserController) GetText() mvc.Response

testcode

Jump to

Keyboard shortcuts

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