databag/net/server/internal/routers.go

836 lines
14 KiB
Go
Raw Normal View History

2022-01-11 06:20:32 +00:00
package databag
import (
2022-07-22 21:42:58 +00:00
"github.com/gorilla/mux"
2022-01-11 06:20:32 +00:00
"net/http"
"strings"
)
2022-07-22 21:40:10 +00:00
type route struct {
2022-01-11 06:20:32 +00:00
Name string
Method string
Pattern string
HandlerFunc http.HandlerFunc
}
2022-07-22 21:40:10 +00:00
type routes []route
2022-01-11 06:20:32 +00:00
2022-07-22 21:40:10 +00:00
//NewRouter allocate router for databag API
2022-01-12 07:04:27 +00:00
func NewRouter() *mux.Router {
2022-01-13 05:08:44 +00:00
2022-07-22 19:28:14 +00:00
go SendNotifications()
2022-01-21 21:18:35 +00:00
2022-01-11 06:20:32 +00:00
router := mux.NewRouter().StrictSlash(true)
2022-07-22 21:40:10 +00:00
for _, route := range endpoints {
2022-01-11 06:20:32 +00:00
var handler http.Handler
handler = route.HandlerFunc
handler = Logger(handler, route.Name)
router.
Methods(route.Method).
Path(route.Pattern).
Name(route.Name).
Handler(handler)
}
2022-07-22 19:28:14 +00:00
fs := http.FileServer(http.Dir("/app/databag/net/web/build/"))
router.PathPrefix("/").Handler(http.StripPrefix("/", fs))
2022-01-11 06:20:32 +00:00
return router
}
2022-07-22 21:40:10 +00:00
var endpoints = routes{
2022-01-11 06:20:32 +00:00
2022-07-22 21:40:10 +00:00
route{
2022-01-11 06:20:32 +00:00
"AddAccount",
strings.ToUpper("Post"),
"/account/profile",
AddAccount,
},
2022-07-22 21:40:10 +00:00
route{
2022-01-11 06:20:32 +00:00
"AddAccountApp",
strings.ToUpper("Post"),
"/account/apps",
AddAccountApp,
},
2022-07-22 21:40:10 +00:00
route{
2022-01-11 06:20:32 +00:00
"AddAccountAuthentication",
strings.ToUpper("Post"),
"/account/auth",
AddAccountAuthentication,
},
2022-07-22 21:40:10 +00:00
route{
2022-01-11 06:20:32 +00:00
"GetAccountApps",
strings.ToUpper("Get"),
"/account/apps",
GetAccountApps,
},
2022-07-22 21:40:10 +00:00
route{
2022-01-13 21:14:30 +00:00
"GetAccountAsset",
strings.ToUpper("Get"),
"/account/assets/{assetID}",
2022-01-13 21:14:30 +00:00
GetAccountAsset,
},
2022-07-22 21:40:10 +00:00
route{
2022-03-09 19:27:50 +00:00
"GetAccountListing",
2022-01-13 05:00:52 +00:00
strings.ToUpper("Get"),
2022-03-09 19:27:50 +00:00
"/account/listing",
GetAccountListing,
2022-01-13 05:00:52 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-03-09 19:27:50 +00:00
"GetAccountListingImage",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Get"),
2022-03-09 19:27:50 +00:00
"/account/listing/{guid}/image",
GetAccountListingImage,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-04-05 18:39:18 +00:00
"GetAccountListingMessage",
strings.ToUpper("Get"),
"/account/listing/{guid}/message",
GetAccountListingMessage,
},
2022-07-22 21:40:10 +00:00
route{
2022-01-13 05:00:52 +00:00
"GetAccountStatus",
strings.ToUpper("Get"),
2022-01-13 05:08:44 +00:00
"/account/status",
2022-01-13 05:00:52 +00:00
GetAccountStatus,
},
2022-07-22 21:40:10 +00:00
route{
2022-01-11 06:20:32 +00:00
"GetAccountToken",
strings.ToUpper("Get"),
"/account/token",
GetAccountToken,
},
2022-07-22 21:40:10 +00:00
route{
2022-03-11 05:26:17 +00:00
"GetAccountAvailable",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Get"),
2022-02-08 20:24:42 +00:00
"/account/available",
2022-03-11 05:26:17 +00:00
GetAccountAvailable,
},
2022-07-22 21:40:10 +00:00
route{
2022-03-11 05:26:17 +00:00
"GetAccountUsername",
strings.ToUpper("Get"),
"/account/username",
2022-01-11 06:20:32 +00:00
GetAccountUsername,
},
2022-07-22 21:40:10 +00:00
route{
2022-01-13 21:14:30 +00:00
"RemoveAccount",
strings.ToUpper("Delete"),
"/account/profile",
RemoveAccount,
},
2022-07-22 21:40:10 +00:00
route{
2022-01-11 06:20:32 +00:00
"RemoveAccountApp",
strings.ToUpper("Delete"),
"/account/apps/{appID}",
2022-01-11 06:20:32 +00:00
RemoveAccountApp,
},
route{
"RemoveAgentToken",
strings.ToUpper("Delete"),
"/account/apps",
RemoveAgentToken,
},
2022-07-22 21:40:10 +00:00
route{
2022-06-08 08:25:41 +00:00
"SetAccountAccess",
strings.ToUpper("Put"),
"/account/access",
SetAccountAccess,
},
2022-07-22 21:40:10 +00:00
route{
2022-01-11 06:20:32 +00:00
"SetAccountAuthentication",
strings.ToUpper("Put"),
"/account/auth",
SetAccountAuthentication,
},
2022-07-22 21:40:10 +00:00
route{
2022-01-13 05:00:52 +00:00
"SetAccountExport",
strings.ToUpper("Put"),
"/account/export",
SetAccountExport,
},
2022-07-22 21:40:10 +00:00
route{
2022-01-13 21:14:30 +00:00
"SetAccountNode",
strings.ToUpper("Put"),
"/account/node",
SetAccountNode,
},
2022-07-22 21:40:10 +00:00
route{
2022-05-31 22:29:04 +00:00
"SetAccountLogin",
strings.ToUpper("Put"),
"/account/login",
SetAccountLogin,
},
route{
"SetAccountNotification",
2022-11-14 19:34:43 +00:00
strings.ToUpper("Put"),
"/account/notification",
SetAccountNotification,
},
route{
"SetAccountSeal",
strings.ToUpper("Put"),
"/account/seal",
SetAccountSeal,
},
2022-07-22 21:40:10 +00:00
route{
2022-03-09 06:39:02 +00:00
"SetAccountSerchable",
strings.ToUpper("Put"),
"/account/searchable",
SetAccountSearchable,
},
2022-07-22 21:40:10 +00:00
route{
2022-01-11 06:20:32 +00:00
"AddNodeAccount",
strings.ToUpper("Post"),
"/admin/accounts",
AddNodeAccount,
},
2022-07-22 21:40:10 +00:00
route{
2022-01-11 06:20:32 +00:00
"GetNodeAccountImage",
strings.ToUpper("Get"),
"/admin/accounts/{accountID}/image",
2022-01-11 06:20:32 +00:00
GetNodeAccountImage,
},
2022-07-22 21:40:10 +00:00
route{
2022-06-07 17:54:33 +00:00
"SetNodeAccountStatus",
strings.ToUpper("Put"),
"/admin/accounts/{accountID}/status",
2022-06-07 17:54:33 +00:00
SetNodeAccountStatus,
},
2022-07-22 21:40:10 +00:00
route{
2022-07-22 19:28:14 +00:00
"AddNodeAccountAccess",
strings.ToUpper("Post"),
"/admin/accounts/{accountID}/auth",
AddNodeAccountAccess,
},
2022-06-08 08:25:41 +00:00
2022-07-22 21:40:10 +00:00
route{
2022-01-11 06:20:32 +00:00
"GetNodeAccounts",
strings.ToUpper("Get"),
"/admin/accounts",
GetNodeAccounts,
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"GetNodeConfig",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Get"),
2022-02-08 20:24:42 +00:00
"/admin/config",
GetNodeConfig,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"GetNodeStatus",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Get"),
2022-02-08 20:24:42 +00:00
"/admin/status",
GetNodeStatus,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-01-13 05:00:52 +00:00
"ImportAccount",
strings.ToUpper("Post"),
"/admin/accounts/import",
ImportAccount,
},
2022-07-22 21:40:10 +00:00
route{
2022-01-11 06:20:32 +00:00
"RemoveNodeAccount",
strings.ToUpper("Delete"),
"/admin/accounts/{accountID}",
2022-01-11 06:20:32 +00:00
RemoveNodeAccount,
},
2022-07-22 21:40:10 +00:00
route{
2022-01-11 06:20:32 +00:00
"SetNodeAccount",
strings.ToUpper("Put"),
"/admin/accounts/{accountID}/reset",
2022-01-11 06:20:32 +00:00
SetNodeAccount,
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"SetNodeConfig",
strings.ToUpper("Put"),
"/admin/config",
SetNodeConfig,
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"SetNodeStatus",
strings.ToUpper("Put"),
"/admin/status",
SetNodeStatus,
},
route{
"AddFlag",
strings.ToUpper("Post"),
"/account/flag/{guid}",
AddFlag,
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"AddGroup",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Post"),
2022-02-08 20:24:42 +00:00
"/alias/groups",
AddGroup,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-03-03 08:57:52 +00:00
"GetGroupSubjectField",
strings.ToUpper("Get"),
"/alias/groups/{groupID}/subject/{field}",
2022-03-03 08:57:52 +00:00
GetGroupSubjectField,
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"GetGroups",
strings.ToUpper("Get"),
"/alias/groups",
GetGroups,
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"RemoveGroup",
strings.ToUpper("Delete"),
"/alias/groups/{groupID}",
2022-02-08 20:24:42 +00:00
RemoveGroup,
},
2022-07-22 21:40:10 +00:00
route{
2022-02-14 05:36:29 +00:00
"SetGroupSubject",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Put"),
"/alias/groups/{groupID}/subject",
2022-02-14 05:36:29 +00:00
SetGroupSubject,
2022-02-08 20:24:42 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"AddArticle",
strings.ToUpper("Post"),
"/attribute/articles",
AddArticle,
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"ClearArticleGroup",
strings.ToUpper("Delete"),
"/attribute/articles/{articleID}/groups/{groupID}",
2022-02-08 20:24:42 +00:00
ClearArticleGroup,
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"GetArticleSubjectField",
strings.ToUpper("Get"),
"/attribute/articles/{articleID}/subject/{field}",
2022-02-08 20:24:42 +00:00
GetArticleSubjectField,
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"GetArticles",
strings.ToUpper("Get"),
"/attribute/articles",
GetArticles,
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"RemoveArticle",
strings.ToUpper("Delete"),
"/attribute/articles/{articleID}",
2022-02-08 20:24:42 +00:00
RemoveArticle,
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"SetArticleGroup",
strings.ToUpper("Put"),
"/attribute/articles/{articleID}/groups/{groupID}",
2022-02-08 20:24:42 +00:00
SetArticleGroup,
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"SetArticleSubject",
strings.ToUpper("Put"),
"/attribute/articles/{articleID}/subject",
2022-02-08 20:24:42 +00:00
SetArticleSubject,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-01-13 21:14:30 +00:00
"Authorize",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Put"),
"/authorize",
2022-01-13 05:23:18 +00:00
Authorize,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-01-11 06:20:32 +00:00
"AddCard",
strings.ToUpper("Post"),
"/contact/cards",
AddCard,
},
2022-07-22 21:40:10 +00:00
route{
2022-01-11 06:20:32 +00:00
"ClearCardGroup",
strings.ToUpper("Delete"),
"/contact/cards/{cardID}/groups/{groupID}",
2022-01-11 06:20:32 +00:00
ClearCardGroup,
},
2022-07-22 21:40:10 +00:00
route{
2022-01-11 06:20:32 +00:00
"ClearCardNotes",
strings.ToUpper("Delete"),
"/contact/cards/{cardID}/notes",
2022-01-11 06:20:32 +00:00
ClearCardNotes,
},
2022-10-25 06:09:39 +00:00
route{
"GetCard",
strings.ToUpper("Get"),
"/contact/cards/{cardID}",
GetCard,
},
2022-07-22 21:40:10 +00:00
route{
"GetCardDetail",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Get"),
"/contact/cards/{cardID}/detail",
GetCardDetail,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-01-11 06:20:32 +00:00
"GetCardProfile",
strings.ToUpper("Get"),
"/contact/cards/{cardID}/profile",
2022-01-11 06:20:32 +00:00
GetCardProfile,
},
2022-07-22 21:40:10 +00:00
route{
2022-01-11 06:20:32 +00:00
"GetCardProfileImage",
strings.ToUpper("Get"),
"/contact/cards/{cardID}/profile/image",
2022-01-11 06:20:32 +00:00
GetCardProfileImage,
},
2022-07-22 21:40:10 +00:00
route{
2022-02-02 19:20:18 +00:00
"GetCards",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Get"),
2022-02-02 19:20:18 +00:00
"/contact/cards",
GetCards,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-01-11 06:20:32 +00:00
"GetCloseMessage",
strings.ToUpper("Get"),
"/contact/cards/{cardID}/closeMessage",
2022-01-11 06:20:32 +00:00
GetCloseMessage,
},
2022-07-22 21:40:10 +00:00
route{
2022-01-11 06:20:32 +00:00
"GetOpenMessage",
strings.ToUpper("Get"),
"/contact/cards/{cardID}/openMessage",
2022-01-11 06:20:32 +00:00
GetOpenMessage,
},
2022-07-22 21:40:10 +00:00
route{
2022-01-11 06:20:32 +00:00
"RemoveCard",
strings.ToUpper("Delete"),
"/contact/cards/{cardID}",
2022-01-11 06:20:32 +00:00
RemoveCard,
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"SetArticleRevision",
strings.ToUpper("Put"),
"/contact/article/revision",
SetArticleRevision,
},
2022-07-22 21:40:10 +00:00
route{
2022-01-11 06:20:32 +00:00
"SetCardGroup",
strings.ToUpper("Put"),
"/contact/cards/{cardID}/groups/{groupID}",
2022-01-11 06:20:32 +00:00
SetCardGroup,
},
2022-07-22 21:40:10 +00:00
route{
2022-01-11 06:20:32 +00:00
"SetCardNotes",
strings.ToUpper("Put"),
"/contact/cards/{cardID}/notes",
2022-01-11 06:20:32 +00:00
SetCardNotes,
},
2022-07-22 21:40:10 +00:00
route{
2022-01-11 06:20:32 +00:00
"SetCardProfile",
strings.ToUpper("Put"),
"/contact/cards/{cardID}/profile",
2022-01-11 06:20:32 +00:00
SetCardProfile,
},
2022-07-22 21:40:10 +00:00
route{
2022-01-11 06:20:32 +00:00
"SetCardStatus",
strings.ToUpper("Put"),
"/contact/cards/{cardID}/status",
2022-01-11 06:20:32 +00:00
SetCardStatus,
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"SetChannelRevision",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Put"),
2022-02-08 20:24:42 +00:00
"/contact/channel/revision",
SetChannelRevision,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"SetCloseMessage",
strings.ToUpper("Put"),
2022-02-08 20:24:42 +00:00
"/contact/closeMessage",
SetCloseMessage,
},
2022-07-22 21:40:10 +00:00
route{
2022-01-11 06:20:32 +00:00
"SetOpenMessage",
strings.ToUpper("Put"),
"/contact/openMessage",
SetOpenMessage,
},
2022-07-22 21:40:10 +00:00
route{
"SetProfileRevision",
strings.ToUpper("Put"),
"/contact/profile/revision",
SetProfileRevision,
},
2022-07-22 21:40:10 +00:00
route{
"SetViewRevision",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Put"),
"/contact/view/revision",
SetViewRevision,
2022-01-11 06:20:32 +00:00
},
route{
"SetPushEvent",
strings.ToUpper("Post"),
"/contact/notification",
SetPushEvent,
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"AddChannel",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Post"),
2022-02-08 20:24:42 +00:00
"/content/channels",
AddChannel,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-02-28 22:59:29 +00:00
"AddChannelTopicAsset",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Post"),
"/content/channels/{channelID}/topics/{topicID}/assets",
2022-02-28 22:59:29 +00:00
AddChannelTopicAsset,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"AddChannelTopic",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Post"),
"/content/channels/{channelID}/topics",
2022-02-08 20:24:42 +00:00
AddChannelTopic,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"AddChannelTopicTag",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Post"),
"/content/channels/{channelID}/topics/{topicID}/tags",
2022-02-08 20:24:42 +00:00
AddChannelTopicTag,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-02-11 21:07:39 +00:00
"ClearChannelCard",
strings.ToUpper("Delete"),
"/content/channels/{channelID}/cards/{cardID}",
2022-02-11 21:07:39 +00:00
ClearChannelCard,
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"ClearChannelGroup",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Delete"),
"/content/channels/{channelID}/groups/{groupID}",
2022-02-08 20:24:42 +00:00
ClearChannelGroup,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-03-02 07:52:37 +00:00
"GetChannelTopicAsset",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Get"),
"/content/channels/{channelID}/topics/{topicID}/assets/{assetID}",
2022-03-02 07:52:37 +00:00
GetChannelTopicAsset,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-03-02 21:19:16 +00:00
"GetChannelTopicAssets",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Get"),
"/content/channels/{channelID}/topics/{topicID}/assets",
2022-03-02 21:19:16 +00:00
GetChannelTopicAssets,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
"GetChannelDetail",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Get"),
"/content/channels/{channelID}/detail",
GetChannelDetail,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-05-09 21:08:54 +00:00
"GetChannelSummary",
strings.ToUpper("Get"),
"/content/channels/{channelID}/summary",
2022-05-09 21:08:54 +00:00
GetChannelSummary,
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"GetChannelSubjectField",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Get"),
"/content/channels/{channelID}/subject/{field}",
2022-02-08 20:24:42 +00:00
GetChannelSubjectField,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-02-18 20:21:15 +00:00
"GetChannelTopic",
strings.ToUpper("Get"),
"/content/channels/{channelID}/topics/{topicID}/detail",
2022-02-18 20:21:15 +00:00
GetChannelTopic,
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"GetChannelTopicDetail",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Get"),
"/content/channels/{channelID}/topics/{topicID}/detail",
2022-02-08 20:24:42 +00:00
GetChannelTopicDetail,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"GetChannelTopicSubjectField",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Get"),
"/content/channels/{channelID}/topics/{topicID}/subject/{field}",
2022-02-08 20:24:42 +00:00
GetChannelTopicSubjectField,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"GetChannelTopicTagSubjectField",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Get"),
"/content/channels/{channelID}/topics/{topicID}/tags/{tagID}/subject/{field}",
2022-02-08 20:24:42 +00:00
GetChannelTopicTagSubjectField,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"GetChannelTopicTags",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Get"),
"/content/channels/{channelID}/topics/{topicID}/tags",
2022-02-08 20:24:42 +00:00
GetChannelTopicTags,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"GetChannelTopics",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Get"),
"/content/channels/{channelID}/topics",
2022-02-08 20:24:42 +00:00
GetChannelTopics,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"GetChannels",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Get"),
2022-02-08 20:24:42 +00:00
"/content/channels",
GetChannels,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"RemoveChannel",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Delete"),
"/content/channels/{channelID}",
2022-02-08 20:24:42 +00:00
RemoveChannel,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-03-02 21:19:16 +00:00
"RemoveChannelTopicAsset",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Delete"),
"/content/channels/{channelID}/topics/{topicID}/assets/{assetID}",
2022-03-02 21:19:16 +00:00
RemoveChannelTopicAsset,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"RemoveChannelTopic",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Delete"),
"/content/channels/{channelID}/topics/{topicID}",
2022-02-08 20:24:42 +00:00
RemoveChannelTopic,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"RemoveChannelTopicTag",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Delete"),
"/content/channels/{channelID}/topics/{topicID}/tags/{tagID}",
2022-02-08 20:24:42 +00:00
RemoveChannelTopicTag,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-02-11 21:07:39 +00:00
"SetChannelCard",
strings.ToUpper("Put"),
"/content/channels/{channelID}/cards/{cardID}",
2022-02-11 21:07:39 +00:00
SetChannelCard,
},
2022-07-22 21:40:10 +00:00
route{
2022-02-19 06:33:13 +00:00
"SetChannelTopicConfirmed",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Put"),
"/content/channels/{channelID}/topics/{topicID}/confirmed",
2022-02-19 06:33:13 +00:00
SetChannelTopicConfirmed,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"SetChannelGroup",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Put"),
"/content/channels/{channelID}/groups/{groupID}",
2022-02-08 20:24:42 +00:00
SetChannelGroup,
2022-01-11 06:20:32 +00:00
},
route{
"GetChannelNotification",
strings.ToUpper("Get"),
"/content/channels/{channelID}/notification",
GetChannelNotification,
},
route{
"SetChannelNotification",
strings.ToUpper("Put"),
"/content/channels/{channelID}/notification",
SetChannelNotification,
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"SetChannelSubject",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Put"),
"/content/channels/{channelID}/subject",
2022-02-08 20:24:42 +00:00
SetChannelSubject,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"SetChannelTopicSubject",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Put"),
"/content/channels/{channelID}/topics/{topicID}/subject",
2022-02-08 20:24:42 +00:00
SetChannelTopicSubject,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-02-08 20:24:42 +00:00
"SetChannelTopicTagSubject",
2022-01-11 06:20:32 +00:00
strings.ToUpper("Put"),
"/content/channels/{channelID}/topics/{topicID}/tags/{tagID}/subject",
2022-02-08 20:24:42 +00:00
SetChannelTopicTagSubject,
2022-01-11 06:20:32 +00:00
},
2022-07-22 21:40:10 +00:00
route{
2022-01-11 06:20:32 +00:00
"GetProfile",
strings.ToUpper("Get"),
"/profile",
GetProfile,
},
2022-07-22 21:40:10 +00:00
route{
2022-01-11 06:20:32 +00:00
"GetProfileImage",
strings.ToUpper("Get"),
"/profile/image",
GetProfileImage,
},
2022-07-22 21:40:10 +00:00
route{
2022-01-11 06:20:32 +00:00
"GetProfileMessage",
strings.ToUpper("Get"),
"/profile/message",
GetProfileMessage,
},
2022-07-22 21:40:10 +00:00
route{
2022-01-11 06:20:32 +00:00
"SetProfile",
strings.ToUpper("Put"),
2022-01-19 08:03:46 +00:00
"/profile/data",
2022-01-11 06:20:32 +00:00
SetProfile,
},
2022-07-22 21:40:10 +00:00
route{
2022-01-19 08:03:46 +00:00
"SetProfileImage",
strings.ToUpper("Put"),
"/profile/image",
SetProfileImage,
},
2022-10-27 04:58:06 +00:00
route{
"RemoveProfile",
strings.ToUpper("Delete"),
"/profile",
RemoveProfile,
},
2022-07-22 21:40:10 +00:00
route{
2022-01-11 06:20:32 +00:00
"Status",
strings.ToUpper("Get"),
"/status",
Status,
},
2023-03-17 21:45:33 +00:00
2023-03-20 04:46:10 +00:00
route{
"AddCall",
strings.ToUpper("Post"),
2023-03-24 07:37:06 +00:00
"/talk/calls",
2023-03-20 04:46:10 +00:00
AddCall,
},
route{
"KeepCall",
strings.ToUpper("Put"),
2023-03-24 07:37:06 +00:00
"/talk/calls/{callId}",
2023-03-20 04:46:10 +00:00
KeepCall,
},
route{
"EndCall",
strings.ToUpper("Delete"),
2023-03-24 07:37:06 +00:00
"/talk/calls/{callId}",
2023-03-20 04:46:10 +00:00
EndCall,
},
route{
"AddRing",
strings.ToUpper("Post"),
2023-03-24 07:37:06 +00:00
"/talk/rings",
2023-03-20 04:46:10 +00:00
AddRing,
},
route{
"Signal",
strings.ToUpper("Get"),
"/signal",
Signal,
},
2022-01-11 06:20:32 +00:00
}