初始化项目文件
This commit is contained in:
38
api_iris/service/init.go
Normal file
38
api_iris/service/init.go
Normal file
@ -0,0 +1,38 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"github.com/kataras/iris/v12"
|
||||
"main/jwtSet"
|
||||
"main/service/admin"
|
||||
"main/service/api"
|
||||
"main/service/test"
|
||||
)
|
||||
|
||||
func Apis(p iris.Party) {
|
||||
p.Get("/", api.Apis)
|
||||
p.PartyFunc("/weather", api.Weather)
|
||||
p.PartyFunc("/user", api.User)
|
||||
p.PartyFunc("/yeb", api.Yeb)
|
||||
p.PartyFunc("/yeb_log", api.YebLog)
|
||||
p.PartyFunc("/notes", api.Notes)
|
||||
p.PartyFunc("/file", api.File)
|
||||
p.PartyFunc("/backgammon", api.Backgammon)
|
||||
p.PartyFunc("/sys_info", api.SysInfo)
|
||||
p.PartyFunc("/chess", api.Chess)
|
||||
p.PartyFunc("/menu", api.Menus)
|
||||
p.PartyFunc("/sys", api.SysSettings)
|
||||
p.PartyFunc("/sudoku", api.Sudoku)
|
||||
p.PartyFunc("/public", api.PublicApis)
|
||||
}
|
||||
|
||||
func Admin(p iris.Party) {
|
||||
p.Get("/", jwtSet.Jwt.Serve, admin.Admin)
|
||||
p.PartyFunc("/logs", admin.Logs)
|
||||
p.PartyFunc("/menus", admin.Menus)
|
||||
p.PartyFunc("/user", admin.User)
|
||||
p.PartyFunc("/sys", admin.SysSettings)
|
||||
}
|
||||
|
||||
func Test(party iris.Party) {
|
||||
party.Get("/send", test.TestSend)
|
||||
}
|
Reference in New Issue
Block a user