-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.go
30 lines (24 loc) · 1.03 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Code generated by hertz generator. DO NOT EDIT.
package Service
import (
"github.com/cloudwego/hertz/pkg/app/server"
service "github.com/lyleshaw/open-plugin/biz/handler/service"
)
/*
This file will register all the routes of the services in the master idl.
And it will update automatically when you use the "update" command for the idl.
So don't modify the contents of the file, or your code will be deleted when it is updated.
*/
// Register register routes based on the IDL 'api.${HTTP Method}' annotation.
func Register(r *server.Hertz) {
root := r.Group("/", rootMw()...)
{
_api := root.Group("/api", _apiMw()...)
_api.GET("/chat", append(_getchatMw(), service.GetChat)...)
_api.POST("/chat", append(_postchatMw(), service.PostChat)...)
_api.GET("/plugin", append(_getpluginMw(), service.GetPlugin)...)
_api.POST("/plugin", append(_postpluginMw(), service.PostPlugin)...)
_api.DELETE("/plugin", append(_deletepluginMw(), service.DeletePlugin)...)
_api.GET("/plugins", append(_getpluginsMw(), service.GetPlugins)...)
}
}