Documentation ¶
Index ¶
- Variables
- func GetUserName(user *auth.User) string
- func InitAuthConfig()
- type ApiController
- func (c *ApiController) AddFavorites()
- func (c *ApiController) AddFileRecord()
- func (c *ApiController) AddNode()
- func (c *ApiController) AddNodeBrowseCount()
- func (c *ApiController) AddNodeModerators()
- func (c *ApiController) AddNotification()
- func (c *ApiController) AddPlane()
- func (c *ApiController) AddReply()
- func (c *ApiController) AddSensitive()
- func (c *ApiController) AddTab()
- func (c *ApiController) AddThanks()
- func (c *ApiController) AddTopic()
- func (c *ApiController) AddTopicBrowseCount()
- func (c *ApiController) AddTopicHitCount()
- func (c *ApiController) AddTranslator()
- func (c *ApiController) CancelTopTopic()
- func (c *ApiController) ChangeExpiredDataStatus()
- func (c *ApiController) DelSensitive()
- func (c *ApiController) DelTranslator()
- func (c *ApiController) DeleteFavorites()
- func (c *ApiController) DeleteFile()
- func (c *ApiController) DeleteNode()
- func (c *ApiController) DeleteNodeModerators()
- func (c *ApiController) DeleteNotification()
- func (c *ApiController) DeletePlane()
- func (c *ApiController) DeleteReply()
- func (c *ApiController) DeleteTab()
- func (c *ApiController) DeleteTopic()
- func (c *ApiController) EditContent()
- func (c *ApiController) GetAccount()
- func (c *ApiController) GetAccountFavoriteNum()
- func (c *ApiController) GetAllCreatedTopics()
- func (c *ApiController) GetAllRepliesOfTopic()
- func (c *ApiController) GetAllTabs()
- func (c *ApiController) GetAllTabsAdmin()
- func (c *ApiController) GetCheckinBonus()
- func (c *ApiController) GetCheckinBonusStatus()
- func (c *ApiController) GetCommunityHealth()
- func (c *ApiController) GetConsumptionRecord()
- func (c *ApiController) GetCreatedTopicsNum()
- func (c *ApiController) GetEnableTranslator()
- func (c *ApiController) GetFavorites()
- func (c *ApiController) GetFavoritesStatus()
- func (c *ApiController) GetFile()
- func (c *ApiController) GetFileNum()
- func (c *ApiController) GetFiles()
- func (c *ApiController) GetForumVersion()
- func (c *ApiController) GetFrontConfById()
- func (c *ApiController) GetFrontConfsByField()
- func (c *ApiController) GetHotNode()
- func (c *ApiController) GetHotTopic()
- func (c *ApiController) GetLatestNode()
- func (c *ApiController) GetLatestReplies()
- func (c *ApiController) GetMember()
- func (c *ApiController) GetMemberEditorType()
- func (c *ApiController) GetMemberLanguage()
- func (c *ApiController) GetMemberRepliesNum()
- func (c *ApiController) GetNode()
- func (c *ApiController) GetNodeFromTab()
- func (c *ApiController) GetNodeInfo()
- func (c *ApiController) GetNodeNavigation()
- func (c *ApiController) GetNodeRelation()
- func (c *ApiController) GetNodes()
- func (c *ApiController) GetNodesAdmin()
- func (c *ApiController) GetNodesNum()
- func (c *ApiController) GetNotifications()
- func (c *ApiController) GetOnlineNum()
- func (c *ApiController) GetPlane()
- func (c *ApiController) GetPlaneAdmin()
- func (c *ApiController) GetPlaneList()
- func (c *ApiController) GetPlanes()
- func (c *ApiController) GetPlanesAdmin()
- func (c *ApiController) GetRankingPlayer()
- func (c *ApiController) GetRankingRich()
- func (c *ApiController) GetReplies()
- func (c *ApiController) GetReply()
- func (c *ApiController) GetReplyWithDetails()
- func (c *ApiController) GetSensitive()
- func (c *ApiController) GetSessionClaims() *auth.Claims
- func (c *ApiController) GetSessionUser() *auth.User
- func (c *ApiController) GetSessionUsername() string
- func (c *ApiController) GetSortedTopics()
- func (c *ApiController) GetTabAdmin()
- func (c *ApiController) GetTabNodes()
- func (c *ApiController) GetTabWithNodes()
- func (c *ApiController) GetTabs()
- func (c *ApiController) GetTopic()
- func (c *ApiController) GetTopicAdmin()
- func (c *ApiController) GetTopicByUrlPathAndTitle()
- func (c *ApiController) GetTopics()
- func (c *ApiController) GetTopicsAdmin()
- func (c *ApiController) GetTopicsByNode()
- func (c *ApiController) GetTopicsByTab()
- func (c *ApiController) GetTopicsByTag()
- func (c *ApiController) GetTopicsNum()
- func (c *ApiController) GetTranslator()
- func (c *ApiController) GetUnreadNotificationNum()
- func (c *ApiController) ModeratorUpload()
- func (c *ApiController) ReadPoster()
- func (c *ApiController) RequireAdmin() bool
- func (c *ApiController) RequireSignedIn() bool
- func (c *ApiController) ResponseError(error string, data ...interface{})
- func (c *ApiController) ResponseOk(data ...interface{})
- func (c *ApiController) RestoreFrontConfs()
- func (c *ApiController) Search()
- func (c *ApiController) SetSessionClaims(claims *auth.Claims)
- func (c *ApiController) SetSessionUser(user *auth.User)
- func (c *ApiController) Signin()
- func (c *ApiController) Signout()
- func (c *ApiController) TopTopic()
- func (c *ApiController) TranslateTopic()
- func (c *ApiController) UpdateAccountBalance(amount int)
- func (c *ApiController) UpdateAccountConsumptionSum(amount int)
- func (c *ApiController) UpdateFileDescribe()
- func (c *ApiController) UpdateFrontConfById()
- func (c *ApiController) UpdateFrontConfsByField()
- func (c *ApiController) UpdateHotInfo()
- func (c *ApiController) UpdateMemberEditorType()
- func (c *ApiController) UpdateMemberLanguage()
- func (c *ApiController) UpdateNode()
- func (c *ApiController) UpdatePlane()
- func (c *ApiController) UpdatePoster()
- func (c *ApiController) UpdateReadStatus()
- func (c *ApiController) UpdateReply()
- func (c *ApiController) UpdateTab()
- func (c *ApiController) UpdateTopic()
- func (c *ApiController) UpdateTopicNode()
- func (c *ApiController) UpdateTranslator()
- func (c *ApiController) UploadFile()
- func (c *ApiController) UploadTopicPic()
- func (c *ApiController) VisibleTranslator()
- type GetAccessTokenRespFromWeChat
- type NewReplyForm
- type NewTopicForm
- type NewUploadFile
- type Response
Constants ¶
This section is empty.
Variables ¶
var JwtPublicKey string
Functions ¶
func GetUserName ¶
func InitAuthConfig ¶
func InitAuthConfig()
Types ¶
type ApiController ¶
type ApiController struct {
beego.Controller
}
func (*ApiController) AddFavorites ¶
func (c *ApiController) AddFavorites()
@router /add-favorites [post] @Tag Favorite API @Title AddFavorites
func (*ApiController) AddFileRecord ¶
func (c *ApiController) AddFileRecord()
func (*ApiController) AddNode ¶
func (c *ApiController) AddNode()
@Title AddNode @router /add-node [post] @Tag Node API
func (*ApiController) AddNodeBrowseCount ¶
func (c *ApiController) AddNodeBrowseCount()
@Title AddNodeBrowseCount @Tag Node API @router /add-node-browse-record [post]
func (*ApiController) AddNodeModerators ¶
func (c *ApiController) AddNodeModerators()
@Title AddNodeModerators @Tag Node API @router /add-node-moderators [post]
func (*ApiController) AddNotification ¶
func (c *ApiController) AddNotification()
func (*ApiController) AddPlane ¶
func (c *ApiController) AddPlane()
@Title AddPlane @router /add-plane [post] @Tag Plane API
func (*ApiController) AddReply ¶
func (c *ApiController) AddReply()
@Title AddReply @Tag Reply API @router /add-reply [post]
func (*ApiController) AddSensitive ¶
func (c *ApiController) AddSensitive()
@Title AddSensitive @router /add-sensitive [get] @Tag Seneistive API
func (*ApiController) AddTab ¶
func (c *ApiController) AddTab()
@router /get-tabs-admin [get] @Title AddTab @Tag Tab API
func (*ApiController) AddThanks ¶
func (c *ApiController) AddThanks()
@Tag Balance API @Title AddThanks @router /add-thanks [post]
func (*ApiController) AddTopic ¶
func (c *ApiController) AddTopic()
@Title AddTopic @Description add one topic @Param form body controllers.NewTopicForm true "topic info" @Success 200 {object} controllers.Response The Response object @router /add-topic [post] @Tag Topic API
func (*ApiController) AddTopicBrowseCount ¶
func (c *ApiController) AddTopicBrowseCount()
@Title AddTopicBrowseCount @Description add topic browse count @Param id query string true "topicId" @Success 200 {object} controller.Response The Response object @router /add-topic-browse-record [post] @Tag Topic API
func (*ApiController) AddTopicHitCount ¶
func (c *ApiController) AddTopicHitCount()
@Title AddTopicHitCount @Description add topic hit count,together with node @Param id query string true "topic id" @Success 200 {object} controller.Response The Response object @router /add-topic-hit-count [post] @Tag Topic API
func (*ApiController) AddTranslator ¶
func (c *ApiController) AddTranslator()
@router /add-translator [post] @Title AddTranslator @Tag Translator API
func (*ApiController) CancelTopTopic ¶
func (c *ApiController) CancelTopTopic()
@Title CancelTopTopic @Description cancels top topic according to the topType in the url. @Param id query string true "id" @Success 200 {object} controllers.Response The Response object @router /cancel-top-topic [post] @Tag Topic API
func (*ApiController) ChangeExpiredDataStatus ¶
func (c *ApiController) ChangeExpiredDataStatus()
@Tag Hot API @Title ChangeExpiredDataStatus @router /update-expired-data [post]
func (*ApiController) DelSensitive ¶
func (c *ApiController) DelSensitive()
@Title DelSensitive @router /del-sensitive [get] @Tag Seneistive API
func (*ApiController) DelTranslator ¶
func (c *ApiController) DelTranslator()
@router /del-translator [post] @Title DelTranslator @Tag Translator API
func (*ApiController) DeleteFavorites ¶
func (c *ApiController) DeleteFavorites()
@router /delete-favorites [post] @Tag Favorite API @Title DeleteFavorites
func (*ApiController) DeleteFile ¶
func (c *ApiController) DeleteFile()
func (*ApiController) DeleteNode ¶
func (c *ApiController) DeleteNode()
@Title DeleteNode @router /delete-node [post] @Tag Node API
func (*ApiController) DeleteNodeModerators ¶
func (c *ApiController) DeleteNodeModerators()
@Title DeleteNodeModerators @Tag Node API @router /delete-node-moderators [post]
func (*ApiController) DeleteNotification ¶
func (c *ApiController) DeleteNotification()
@Title DeleteNotification @router /delete-notifications [get] @Tag Notification API
func (*ApiController) DeletePlane ¶
func (c *ApiController) DeletePlane()
@Title DeletePlane @router /delete-plane [post] @Tag Plane API
func (*ApiController) DeleteReply ¶
func (c *ApiController) DeleteReply()
@Title DeleteReply @Tag Reply API @router /delete-reply [post]
func (*ApiController) DeleteTab ¶
func (c *ApiController) DeleteTab()
@router /delete-tab [post] @Title DeleteTab @Tag Tab API
func (*ApiController) DeleteTopic ¶
func (c *ApiController) DeleteTopic()
@Title DeleteTopic @Description delete a topic by id @Param id query string true "topic id" @Success 200 {bool} bool Delete success or failure @router /delete-topic [post] @Tag Topic API
func (*ApiController) EditContent ¶
func (c *ApiController) EditContent()
@Title EditContent @Description edit content @Param editType query string true "edit Type" @Success 200 {object} controllers.Response The Response object @router /edit-content [post] @Tag Topic API
func (*ApiController) GetAccount ¶
func (c *ApiController) GetAccount()
@Title GetAccount @Description Get current account @Success 200 {object} controllers.api_controller.Response The Response object @router /get-account [get] @Tag Account API
func (*ApiController) GetAccountFavoriteNum ¶
func (c *ApiController) GetAccountFavoriteNum()
@router /get-account-favorite-num [get] @Tag Favorite API @Title GetAccountFavoriteNum
func (*ApiController) GetAllCreatedTopics ¶
func (c *ApiController) GetAllCreatedTopics()
@Title GetAllCreatedTopics @Description get all created topics @Param id query string true "author id" @Param tab query string true "tab" @Param limit query string true "mumber of topics" @Param page query string true "page offset" @Success 200 {array} object.Topic The Response object @router /get-all-created-topics [get] @Tag Topic API
func (*ApiController) GetAllRepliesOfTopic ¶
func (c *ApiController) GetAllRepliesOfTopic()
@Title GetAllRepliesOfTopic @Tag Reply API @router /get-replies-of-topic [get]
func (*ApiController) GetAllTabs ¶
func (c *ApiController) GetAllTabs()
@router /get-all-tabs [get] @Title GetAllTabs @Tag Tab API
func (*ApiController) GetAllTabsAdmin ¶
func (c *ApiController) GetAllTabsAdmin()
@router /get-tabs-admin [get] @Title GetAllTabsAdmin @Tag Tab API
func (*ApiController) GetCheckinBonus ¶
func (c *ApiController) GetCheckinBonus()
@Tag Balance API @Title GetCheckinBonus @router /get-checkin-bonus [get]
func (*ApiController) GetCheckinBonusStatus ¶
func (c *ApiController) GetCheckinBonusStatus()
@router /get-checkin-bonus-status [get] @Tag Balance API @Title GetCheckinBonusStatus
func (*ApiController) GetCommunityHealth ¶
func (c *ApiController) GetCommunityHealth()
@Tag Info API @Title GetCommunityHealth @router /get-community-health [get]
func (*ApiController) GetConsumptionRecord ¶
func (c *ApiController) GetConsumptionRecord()
@Tag Balance API @Title GetConsumptionRecord @router /get-consumption-record [get]
func (*ApiController) GetCreatedTopicsNum ¶
func (c *ApiController) GetCreatedTopicsNum()
@Title GetCreatedTopicsNum @Description get created topics count @Param id query string true "member id" @Success 200 {int} int topics count @router /get-created-topics-num [get] @Tag Topic API
func (*ApiController) GetEnableTranslator ¶
func (c *ApiController) GetEnableTranslator()
func (*ApiController) GetFavorites ¶
func (c *ApiController) GetFavorites()
@router /get-favorites [get] @Tag Favorite API @Title GetFavorites
func (*ApiController) GetFavoritesStatus ¶
func (c *ApiController) GetFavoritesStatus()
@router /get-favorites-status [get] @Tag Favorite API @Title GetFavoritesStatus
func (*ApiController) GetFile ¶
func (c *ApiController) GetFile()
func (*ApiController) GetFileNum ¶
func (c *ApiController) GetFileNum()
func (*ApiController) GetFiles ¶
func (c *ApiController) GetFiles()
func (*ApiController) GetForumVersion ¶
func (c *ApiController) GetForumVersion()
@Tag Info API @Title GetForumVersion @router /get-forum-version [get]
func (*ApiController) GetFrontConfById ¶ added in v1.2.6
func (c *ApiController) GetFrontConfById()
@Title GetFrontConfById @Description Get front conf by id @Success 200 {object} object.FrontConf The Response object @router /get-front-conf-by-id [get] @Tag FrontConf API
func (*ApiController) GetFrontConfsByField ¶ added in v1.2.6
func (c *ApiController) GetFrontConfsByField()
@Title GetFrontConfsByField @Description Get front confs by field @Success 200 {array} object.FrontConf The Response object @router /get-front-confs-by-field [get] @Tag FrontConf API
func (*ApiController) GetHotNode ¶
func (c *ApiController) GetHotNode()
@Title GetHotNod @Tag Node API @router /get-hot-node [get]
func (*ApiController) GetHotTopic ¶
func (c *ApiController) GetHotTopic()
@Title GetHotTopic @Description get hot topic @Param limit query string true "limit size" @Success 200 {object} controller.Response The Response object @router /get-hot-topic [get] @Tag Topic API
func (*ApiController) GetLatestNode ¶
func (c *ApiController) GetLatestNode()
@Tag Node API @router /get-latest-node [get] @Title GetLatestNode
func (*ApiController) GetLatestReplies ¶
func (c *ApiController) GetLatestReplies()
@Title GetLatestReplies @Tag Reply API @router /get-latest-replies [get]
func (*ApiController) GetMember ¶
func (c *ApiController) GetMember()
@Title GetMember @Description get member by id @Param id query string true "id" @Success 200 {object} auth.User The Response object @router /get-member [get] @Tag Member API
func (*ApiController) GetMemberEditorType ¶
func (c *ApiController) GetMemberEditorType()
@Title GetMemberEditorType @Description member editortype @Success 200 {object} controllers.Response The Response object @router /get-member-editor-type [get] @Tag Member API
func (*ApiController) GetMemberLanguage ¶
func (c *ApiController) GetMemberLanguage()
@Title GetMemberLanguage @Description MemberLanguage @Success 200 {object} controllers.Response The Response object @router /get-member-language [get] @Tag Member API
func (*ApiController) GetMemberRepliesNum ¶
func (c *ApiController) GetMemberRepliesNum()
@Title GetMemberRepliesNum @Tag Reply API @router /get-member-replies-num [get] @Description GetRepliesNum gets member's all replies num.
func (*ApiController) GetNode ¶
func (c *ApiController) GetNode()
@Title GetNode @router /get-node [get] @Tag Node API
func (*ApiController) GetNodeFromTab ¶
func (c *ApiController) GetNodeFromTab()
func (*ApiController) GetNodeInfo ¶
func (c *ApiController) GetNodeInfo()
@Title GetNodeInfo @router /get-node-info [get] @Tag Node API
func (*ApiController) GetNodeNavigation ¶
func (c *ApiController) GetNodeNavigation()
@Tag Info API @Title GetNodeNavigation @router /node-navigation [get]
func (*ApiController) GetNodeRelation ¶
func (c *ApiController) GetNodeRelation()
@Title GetNodeRelation @router /get-node-relation [get] @Tag Node API
func (*ApiController) GetNodes ¶
func (c *ApiController) GetNodes()
@Title GetNodes @router /get-nodes [get] @Tag Node API
func (*ApiController) GetNodesAdmin ¶
func (c *ApiController) GetNodesAdmin()
@Title GetNodesAdmin @router /get-nodes-admin [get] @Tag Node API
func (*ApiController) GetNodesNum ¶
func (c *ApiController) GetNodesNum()
@Title GetNodesNum @router /get-nodes-num [get] @Tag Node API
func (*ApiController) GetNotifications ¶
func (c *ApiController) GetNotifications()
@router /get-notifications [get] @Title GetNotifications @Tag Notification API
func (*ApiController) GetOnlineNum ¶
func (c *ApiController) GetOnlineNum()
@Tag Info API @Title GetOnlineNum @router /get-online-num [get]
func (*ApiController) GetPlane ¶
func (c *ApiController) GetPlane()
@Title GetPlane @router /get-plane [get] @Tag Plane API
func (*ApiController) GetPlaneAdmin ¶
func (c *ApiController) GetPlaneAdmin()
@Title GetPlaneAdmin @router /get-planes-admin [get] @Tag Plane API
func (*ApiController) GetPlaneList ¶
func (c *ApiController) GetPlaneList()
@Title GetPlaneLis @router /get-plane-list [get] @Tag Plane API
func (*ApiController) GetPlanes ¶
func (c *ApiController) GetPlanes()
func (*ApiController) GetPlanesAdmin ¶
func (c *ApiController) GetPlanesAdmin()
@Title GetPlanesAdmin @router /get-planes-admin [get] @Tag Plane API
func (*ApiController) GetRankingPlayer ¶
func (c *ApiController) GetRankingPlayer()
@Title GetRankingPlayer @Description RankingPlayer @Success 200 {array} auth.User The Response object @router /get-ranking-player [get] @Tag Member API
func (*ApiController) GetRankingRich ¶
func (c *ApiController) GetRankingRich()
@Title GetRankingRich @Description RankingRich @Success 200 {array} auth.User The Response object @router /get-ranking-rich [get] @Tag Member API
func (*ApiController) GetReplies ¶
func (c *ApiController) GetReplies()
@Title GetReplies @Tag Reply API @router /get-replies [get]
func (*ApiController) GetReply ¶
func (c *ApiController) GetReply()
@Title GetReply @Tag Reply API @router /get-reply [get]
func (*ApiController) GetReplyWithDetails ¶
func (c *ApiController) GetReplyWithDetails()
@Title GetReplyWithDetails @Tag Reply API @router /get-reply-with-details [get]
func (*ApiController) GetSensitive ¶
func (c *ApiController) GetSensitive()
@Title GetSensitive @router /get-sensitive [get] @Tag Seneistive API
func (*ApiController) GetSessionClaims ¶
func (c *ApiController) GetSessionClaims() *auth.Claims
func (*ApiController) GetSessionUser ¶
func (c *ApiController) GetSessionUser() *auth.User
func (*ApiController) GetSessionUsername ¶
func (c *ApiController) GetSessionUsername() string
func (*ApiController) GetSortedTopics ¶
func (c *ApiController) GetSortedTopics()
@Title GetSortedTopics @Description get sorted topics @Param lps query string true "sort: last reply count" @Param hs query string true "sort: hot" @Param fcs query string true "sort: favorite count" @Param cts query string true "sort: created time" @Param page query string true "offset" @Param limit query string true "limit size" @Success 200 {object} controller.Response The Response object @router /get-hot-topic [get] @Tag Topic API
func (*ApiController) GetTabAdmin ¶
func (c *ApiController) GetTabAdmin()
@router /get-tabs-admin [get] @Title GetTabAdmin @Tag Tab API
func (*ApiController) GetTabNodes ¶
func (c *ApiController) GetTabNodes()
func (*ApiController) GetTabWithNodes ¶
func (c *ApiController) GetTabWithNodes()
@router /get-tab-with-nodes [get] @Title GetTabWithNodes @Tag Tab API
func (*ApiController) GetTabs ¶
func (c *ApiController) GetTabs()
@router /get-tabs [get] @Title GetTabs @Tag Tab API
func (*ApiController) GetTopic ¶
func (c *ApiController) GetTopic()
@Title GetTopic @Description get one topic by id @Param id query string true "id" @Success 200 {object} object.TopicWithAvatar The Response object @router /get-topic [get] @Tag Topic API
func (*ApiController) GetTopicAdmin ¶
func (c *ApiController) GetTopicAdmin()
@Title GetTopicAdmin @Description get topic for admin by id @Param id query string true "id" @Success 200 {object} object.AdminTopicInfo The Response object @router /get-topic-admin [get] @Tag Topic API
func (*ApiController) GetTopicByUrlPathAndTitle ¶
func (c *ApiController) GetTopicByUrlPathAndTitle()
@Title GetTopicByUrlPathAndTitle @router /get-topic-by-urlpath-and-title [get] @Tag Topic API
func (*ApiController) GetTopics ¶
func (c *ApiController) GetTopics()
@Title GetTopics @Description get current topics @Param limit query string true "topics size" @Param page query string true "offset" @Success 200 {array} object.TopicWithAvatar The Response object @router /get-topics [get] @Tag Topic API
func (*ApiController) GetTopicsAdmin ¶
func (c *ApiController) GetTopicsAdmin()
@Title GetTopicsAdmin @Description get topics for admin @Param limit query string true "topics size" @Param page query string true "offset" @Param un query string true "username(author)" @Param ti query string true "search: title" @Param cn query string true "search: content" @Param sdt query string true "sort: show deleted topics" @Param cs query string true "sort: created time" @Param lrs query string true "sort: last reply time" @Param us query string true "sort: username" @Param rcs query string true "sort: reply count" @Param hs query string true "sort: hot" @Param fcs query string true "sort: favorite count" @Success 200 {object} controllers.Response The Response object @router /get-topics-admin [get] @Tag Topic API
func (*ApiController) GetTopicsByNode ¶
func (c *ApiController) GetTopicsByNode()
@Title GetTopicsByNode @Description get topics by node @Param node-id query string true "node id" @Param limit query string true "number of topics" @Param page query string true "page offset" @Success 200 {array} object.NodeTopic The Response object @router /get-topics-by-node [get] @Tag Topic API
func (*ApiController) GetTopicsByTab ¶
func (c *ApiController) GetTopicsByTab()
@Title GetTopicsByTab @Description get topics by tab @Param tab-id query string true "tab id" @Param limit query string true "number of topics" @Param page query string true "page offset" @Success 200 {array} object.TopicWithAvatar The Response object @router /get-topics-by-tab [get] @Tag Topic API
func (*ApiController) GetTopicsByTag ¶
func (c *ApiController) GetTopicsByTag()
@Title GetTopicsByTag @Description get topics by tag @Param tag-id query string true "tag id" @Param limit query string true "number of topics" @Param page query string true "page offset" @Success 200 {array} object.NodeTopic The Response object @router /get-topics-by-tag [get] @Tag Topic API
func (*ApiController) GetTopicsNum ¶
func (c *ApiController) GetTopicsNum()
@Title GetTopicsNum @Description get the total number of topics @Success 200 {int} int The topic nums @router /get-topics-num [get] @Tag Topic API
func (*ApiController) GetTranslator ¶
func (c *ApiController) GetTranslator()
@router /get-translator [get] @Title GetTranslator @Tag Translator API
func (*ApiController) GetUnreadNotificationNum ¶
func (c *ApiController) GetUnreadNotificationNum()
@Title GetUnreadNotificationNum @router /get-unread-notification-num [post] @Tag Notification API
func (*ApiController) ModeratorUpload ¶
func (c *ApiController) ModeratorUpload()
@Title ModeratorUpload @Tag File API @router /upload-moderator [post]
func (*ApiController) ReadPoster ¶
func (c *ApiController) ReadPoster()
@Title ReadPoster @Description get poster by id @Param id query string true "id" @Success 200 {object} object.Poster The Response object @router /read-poster [get] @Tag Poster API
func (*ApiController) RequireAdmin ¶
func (c *ApiController) RequireAdmin() bool
func (*ApiController) RequireSignedIn ¶
func (c *ApiController) RequireSignedIn() bool
func (*ApiController) ResponseError ¶
func (c *ApiController) ResponseError(error string, data ...interface{})
func (*ApiController) ResponseOk ¶
func (c *ApiController) ResponseOk(data ...interface{})
func (*ApiController) RestoreFrontConfs ¶ added in v1.2.6
func (c *ApiController) RestoreFrontConfs()
@router /restore-front-confs [post] @Tag FrontConf API @Title RestoreFrontConfs
func (*ApiController) Search ¶
func (c *ApiController) Search()
@Title Search @router /search @Tag Search API
func (*ApiController) SetSessionClaims ¶
func (c *ApiController) SetSessionClaims(claims *auth.Claims)
func (*ApiController) SetSessionUser ¶
func (c *ApiController) SetSessionUser(user *auth.User)
func (*ApiController) Signin ¶
func (c *ApiController) Signin()
@Title Signin @Description sign in as a member @Param code QueryString string true "The code to sign in" @Param state QueryString string true "The state" @Success 200 {object} controllers.api_controller.Response The Response object @router /signin [post] @Tag Account API
func (*ApiController) Signout ¶
func (c *ApiController) Signout()
@Title Signout @Description sign out the current member @Success 200 {object} controllers.api_controller.Response The Response object @router /signout [post] @Tag Account API
func (*ApiController) TopTopic ¶
func (c *ApiController) TopTopic()
TopTopic tops topic according to the topType in the url. @Title TopTopic @Description tops topic according to the topType in the url. @Param id query string true "id" @Success 200 {object} controllers.Response The Response object @router /top-topic [post] @Tag Topic API
func (*ApiController) TranslateTopic ¶
func (c *ApiController) TranslateTopic()
@Title TranslateTopic @router /translate-topic [get] @Tag Topic API
func (*ApiController) UpdateAccountBalance ¶
func (c *ApiController) UpdateAccountBalance(amount int)
func (*ApiController) UpdateAccountConsumptionSum ¶
func (c *ApiController) UpdateAccountConsumptionSum(amount int)
func (*ApiController) UpdateFileDescribe ¶
func (c *ApiController) UpdateFileDescribe()
func (*ApiController) UpdateFrontConfById ¶ added in v1.2.6
func (c *ApiController) UpdateFrontConfById()
@router /update-front-conf-by-id [post] @Tag FrontConf API @Title UpdateFrontConfById
func (*ApiController) UpdateFrontConfsByField ¶ added in v1.2.6
func (c *ApiController) UpdateFrontConfsByField()
@router /update-front-confs-by-filed [post] @Tag FrontConf API @Title UpdateFrontConfsByField
func (*ApiController) UpdateHotInfo ¶
func (c *ApiController) UpdateHotInfo()
@Tag Hot API @Title UpdateHotInfo @router /update-hot-info [post]
func (*ApiController) UpdateMemberEditorType ¶
func (c *ApiController) UpdateMemberEditorType()
@Tag Member API @Title UpdateMemberEditorType @router /update-member-editor-type [post]
func (*ApiController) UpdateMemberLanguage ¶
func (c *ApiController) UpdateMemberLanguage()
@Tag Member API @Title UpdateMemberLanguage @router /update-member-language [post]
func (*ApiController) UpdateNode ¶
func (c *ApiController) UpdateNode()
@Title UpdateNode @router /update-node [post] @Tag Node API
func (*ApiController) UpdatePlane ¶
func (c *ApiController) UpdatePlane()
@Title UpdatePlane @router /update-plane [post] @Tag Plane API
func (*ApiController) UpdatePoster ¶
func (c *ApiController) UpdatePoster()
@Title UpdatePoster @Description update poster message @Success 200 {object} controllers.Response The Response object @router /update-poster [post] @Tag Poster API
func (*ApiController) UpdateReadStatus ¶
func (c *ApiController) UpdateReadStatus()
@Title UpdateReadStatus @router /update-read-status [post] @Tag Notification API
func (*ApiController) UpdateReply ¶
func (c *ApiController) UpdateReply()
@Title UpdateReply @Tag Reply API @router /update-reply [post]
func (*ApiController) UpdateTab ¶
func (c *ApiController) UpdateTab()
@router /update-tab [post] @Title UpdateTab @Tag Tab API
func (*ApiController) UpdateTopic ¶
func (c *ApiController) UpdateTopic()
func (*ApiController) UpdateTopicNode ¶
func (c *ApiController) UpdateTopicNode()
@Title UpdateTopicNode @Description update the topic node @Param updateTopicNode body controllers.updateTopicNode true "topic node info" @Success 200 {object} controllers.Response The Response object @router /update-topic-node [post] @Tag Topic API
func (*ApiController) UpdateTranslator ¶
func (c *ApiController) UpdateTranslator()
@router /update-translator [post] @Title UpdateTranslator @Tag Translator API
func (*ApiController) UploadFile ¶
func (c *ApiController) UploadFile()
@Title UploadFile @Tag File API @router /upload-file [post]
func (*ApiController) UploadTopicPic ¶
func (c *ApiController) UploadTopicPic()
@Title UploadTopicPic @Description upload topic picture @Param pic formData string true "the picture base64 code" @Success 200 {object} _controllers.Response The Response object @router /upload-topic-pic [post] @Tag Topic API
func (*ApiController) VisibleTranslator ¶
func (c *ApiController) VisibleTranslator()
@router /visible-translator [get] @Title VisibleTranslator @Tag Translator API