-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.go
111 lines (106 loc) · 3.37 KB
/
api.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
// Code generated by hertz generator. DO NOT EDIT.
package Tiktokapi
import (
tiktokapi "github.com/PICOF/simple-tiktok/cmd/api/biz/handler/tiktokapi"
"github.com/cloudwego/hertz/pkg/app/server"
)
/*
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()...)
{
_douyin := root.Group("/douyin", _douyinMw()...)
{
_comment := _douyin.Group("/comment", _commentMw()...)
{
_action := _comment.Group("/action", _actionMw()...)
_action.POST("/", append(_comment_ctionMw(), tiktokapi.CommentAction)...)
}
{
_list := _comment.Group("/list", _listMw()...)
_list.GET("/", append(_getcommentlistMw(), tiktokapi.GetCommentList)...)
}
}
{
_favorite := _douyin.Group("/favorite", _favoriteMw()...)
{
_action0 := _favorite.Group("/action", _action0Mw()...)
_action0.POST("/", append(_like_ctionMw(), tiktokapi.LikeAction)...)
}
{
_list0 := _favorite.Group("/list", _list0Mw()...)
_list0.GET("/", append(_getlikelistMw(), tiktokapi.GetLikeList)...)
}
}
{
_feed := _douyin.Group("/feed", _feedMw()...)
_feed.GET("/", append(_getvideolistMw(), tiktokapi.GetVideoList)...)
}
{
_message := _douyin.Group("/message", _messageMw()...)
{
_action1 := _message.Group("/action", _action1Mw()...)
_action1.POST("/", append(_sendmessageMw(), tiktokapi.SendMessage)...)
}
{
_chat := _message.Group("/chat", _chatMw()...)
_chat.GET("/", append(_getchatrecordMw(), tiktokapi.GetChatRecord)...)
}
}
{
_publish := _douyin.Group("/publish", _publishMw()...)
{
_action2 := _publish.Group("/action", _action2Mw()...)
_action2.POST("/", append(_publish_ctionMw(), tiktokapi.PublishAction)...)
}
{
_list1 := _publish.Group("/list", _list1Mw()...)
_list1.GET("/", append(_getpublishlistMw(), tiktokapi.GetPublishList)...)
}
}
{
_relation := _douyin.Group("/relation", _relationMw()...)
{
_action3 := _relation.Group("/action", _action3Mw()...)
_action3.POST("/", append(_follow_ctionMw(), tiktokapi.FollowAction)...)
}
{
_follow := _relation.Group("/follow", _followMw()...)
{
_list2 := _follow.Group("/list", _list2Mw()...)
_list2.GET("/", append(_getfollowlistMw(), tiktokapi.GetFollowList)...)
}
}
{
_follower := _relation.Group("/follower", _followerMw()...)
{
_list3 := _follower.Group("/list", _list3Mw()...)
_list3.GET("/", append(_getfollowerlistMw(), tiktokapi.GetFollowerList)...)
}
}
{
_friend := _relation.Group("/friend", _friendMw()...)
{
_list4 := _friend.Group("/list", _list4Mw()...)
_list4.GET("/", append(_getfriendlistMw(), tiktokapi.GetFriendList)...)
}
}
}
{
_user := _douyin.Group("/user", _userMw()...)
_user.GET("/", append(_getuserinfoMw(), tiktokapi.GetUserInfo)...)
{
_login := _user.Group("/login", _loginMw()...)
_login.POST("/", append(_userloginMw(), tiktokapi.UserLogin)...)
}
{
_register := _user.Group("/register", _registerMw()...)
_register.POST("/", append(_userregisterMw(), tiktokapi.UserRegister)...)
}
}
}
}