Documentation
¶
Index ¶
- Constants
- Variables
- func AddFavoriteBoard(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func AddFavoriteBoardWrapper(c *gin.Context)
- func AddFavoriteFolder(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func AddFavoriteFolderWrapper(c *gin.Context)
- func AddFavoriteLine(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func AddFavoriteLineWrapper(c *gin.Context)
- func AllHTMLWrapper(c *gin.Context)
- func ArticleLockKey(boardID bbs.BBoardID, articleID bbs.ArticleID) (key string)
- func AttemptChangeEmail(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func AttemptChangeEmailWrapper(c *gin.Context)
- func AttemptLogin(remoteAddr string, user *UserInfo, params interface{}, c *gin.Context) (result interface{}, statusCode int, err error)
- func AttemptLoginWrapper(c *gin.Context)
- func AttemptRegisterUser(remoteAddr string, user *UserInfo, params interface{}, c *gin.Context) (result interface{}, statusCode int, err error)
- func AttemptRegisterUserWrapper(c *gin.Context)
- func AttemptSetIDEmail(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func AttemptSetIDEmailWrapper(c *gin.Context)
- func ChangeEmail(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func ChangeEmailWrapper(c *gin.Context)
- func ChangePasswd(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func ChangePasswdWrapper(c *gin.Context)
- func CheckExistsUser(remoteAddr string, user *UserInfo, params interface{}, c *gin.Context) (result interface{}, statusCode int, err error)
- func CheckExistsUserWrapper(c *gin.Context)
- func CheckUserArticlePermDeletable(user *UserInfo, boardID bbs.BBoardID, articleID bbs.ArticleID, c *gin.Context) (err error)
- func CheckUserArticlePermEditable(user *UserInfo, boardID bbs.BBoardID, articleID bbs.ArticleID, ...) (err error)
- func CheckUserArticlePermReadable(user *UserInfo, boardID bbs.BBoardID, articleID bbs.ArticleID, ...) (err error)
- func CheckUserArticlesPermDeletable(user *UserInfo, boardID bbs.BBoardID, articleIDs []bbs.ArticleID, ...) (articlePermMap map[bbs.ArticleID]error, err error)
- func CheckUserArticlesPermEditable(user *UserInfo, boardID bbs.BBoardID, articleIDs []bbs.ArticleID, ...) (articlePermMap map[bbs.ArticleID]error, err error)
- func CheckUserArticlesPermEditableDeletable(user *UserInfo, boardID bbs.BBoardID, articleIDs []bbs.ArticleID, ...) (articlePermEditableMap map[bbs.ArticleID]error, ...)
- func CheckUserBoardPermCreatable(user *UserInfo, c *gin.Context) (err error)
- func CheckUserBoardPermEditable(user *UserInfo, boardID bbs.BBoardID, c *gin.Context) (err error)
- func CheckUserBoardPermPostable(user *UserInfo, boardID bbs.BBoardID, c *gin.Context) (err error)
- func CreateArticle(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func CreateArticleWrapper(c *gin.Context)
- func CreateBoard(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func CreateBoardWrapper(c *gin.Context)
- func CreateComment(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func CreateCommentWrapper(c *gin.Context)
- func CreateRank(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func CreateRankWrapper(c *gin.Context)
- func CrossPost(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func CrossPostWrapper(c *gin.Context)
- func DeleteArticles(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func DeleteArticlesWrapper(c *gin.Context)
- func DeleteComments(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func DeleteCommentsWrapper(c *gin.Context)
- func DeleteFavorite(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func DeleteFavoriteWrapper(c *gin.Context)
- func DeserializeArticlesAndUpdateDB(articleSummaries_b []*bbs.ArticleSummary, updateNanoTS types.NanoTS, ...) (articleSummaries []*schema.ArticleSummaryWithRegex, err error)
- func DeserializeBoardDetailsAndUpdateDB(boardDetails_b []*bbs.BoardDetail, updateNanoTS types.NanoTS) (boardDetails []*schema.BoardDetail, err error)
- func DeserializeBoardsAndUpdateDB(boardSummaries_b []*bbs.BoardSummary, updateNanoTS types.NanoTS) (boardSummaries []*schema.BoardSummary, err error)
- func DeserializePBArticlesAndUpdateDB(boardID bbs.BBoardID, articleSummaries_b []*boardd.Post, ...) (articleSummaries []*schema.ArticleSummaryWithRegex, err error)
- func DeserializePBBoardsAndUpdateDB(boardSummaries_b []*boardd.Board, updateNanoTS types.NanoTS) (boardSummaries []*schema.BoardSummary, err error)
- func DeserializePBManArticlesAndUpdateDB(boardID bbs.BBoardID, levelIdx types.ManArticleID, entries []*mand.Entry, ...) (articleSummaries []*schema.ManArticleSummary, err error)
- func DeserializeUserDetailAndUpdateDBForTest(user_b pttbbsapi.GetUserResult, updateNanoTS types.NanoTS) (userDetail *schema.UserDetail, err error)
- func EditArticleDetail(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func EditArticleDetailWrapper(c *gin.Context)
- func ErrBoardCooldown(diffNanoTS types.NanoTS) error
- func ErrBoardPosttime(diffNanoTS types.NanoTS) error
- func ErrFloodReject(diffNanoTS types.NanoTS) error
- func ErrorHTMLWrapper(c *gin.Context)
- func Form(theFunc APIFunc, params interface{}, c *gin.Context)
- func FormJSON(theFunc APIFunc, params interface{}, c *gin.Context)
- func FormLogout(theFunc APIFunc, params interface{}, c *gin.Context)
- func GetArticleBlocks(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func GetArticleBlocksAllGuest(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func GetArticleBlocksAllGuestWrapper(c *gin.Context)
- func GetArticleBlocksWrapper(c *gin.Context)
- func GetArticleDetail(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func GetArticleDetailAllGuest(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func GetArticleDetailAllGuestWrapper(c *gin.Context)
- func GetArticleDetailWrapper(c *gin.Context)
- func GetBoardDetail(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func GetBoardDetailAllGuest(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func GetBoardDetailAllGuestWrapper(c *gin.Context)
- func GetBoardDetailWrapper(c *gin.Context)
- func GetBoardSummary(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func GetBoardSummaryAllGuest(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func GetBoardSummaryAllGuestWrapper(c *gin.Context)
- func GetBoardSummaryWrapper(c *gin.Context)
- func GetManArticleBlocks(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func GetManArticleBlocksWrapper(c *gin.Context)
- func GetManArticleDetail(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func GetManArticleDetailWrapper(c *gin.Context)
- func GetUserID(remoteAddr string, user *UserInfo, params interface{}, c *gin.Context) (result interface{}, statusCode int, err error)
- func GetUserIDAllGuest(remoteAddr string, user *UserInfo, params interface{}, c *gin.Context) (result interface{}, statusCode int, err error)
- func GetUserIDAllGuestWrapper(c *gin.Context)
- func GetUserIDWrapper(c *gin.Context)
- func GetUserInfo(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func GetUserInfoWrapper(c *gin.Context)
- func GetUserVisitCount(remoteAddr string, user *UserInfo, params interface{}, c *gin.Context) (result interface{}, statusCode int, err error)
- func GetUserVisitCountWrapper(c *gin.Context)
- func GetUsername(remoteAddr string, user *UserInfo, params interface{}, c *gin.Context) (result interface{}, statusCode int, err error)
- func GetUsernameWrapper(c *gin.Context)
- func GetVersion(remoteAddr string, user *UserInfo, params interface{}, c *gin.Context) (result interface{}, statusCode int, err error)
- func GetVersionWrapper(c *gin.Context)
- func Index(remoteAddr string, user *UserInfo, params interface{}, c *gin.Context) (result interface{}, statusCode int, err error)
- func IndexHTMLWrapper(c *gin.Context)
- func IndexWrapper(c *gin.Context)
- func InitHTMLWrapper(c *gin.Context)
- func JSON(theFunc APIFunc, params interface{}, c *gin.Context)
- func LoadArticleComments(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func LoadArticleCommentsAllGuest(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func LoadArticleCommentsAllGuestWrapper(c *gin.Context)
- func LoadArticleCommentsWrapper(c *gin.Context)
- func LoadAutoCompleteBoards(remoteAddr string, user *UserInfo, params interface{}, c *gin.Context) (result interface{}, statusCode int, err error)
- func LoadAutoCompleteBoardsWrapper(c *gin.Context)
- func LoadBottomArticles(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func LoadBottomArticlesAllGuest(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func LoadBottomArticlesAllGuestWrapper(c *gin.Context)
- func LoadBottomArticlesWrapper(c *gin.Context)
- func LoadClassBoards(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func LoadClassBoardsWrapper(c *gin.Context)
- func LoadFavoriteBoards(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func LoadFavoriteBoardsWrapper(c *gin.Context)
- func LoadGeneralArticles(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func LoadGeneralArticlesAllGuest(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func LoadGeneralArticlesAllGuestWrapper(c *gin.Context)
- func LoadGeneralArticlesByKeyword(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func LoadGeneralArticlesWrapper(c *gin.Context)
- func LoadGeneralBoards(remoteAddr string, user *UserInfo, params interface{}, c *gin.Context) (result interface{}, statusCode int, err error)
- func LoadGeneralBoardsByClass(remoteAddr string, user *UserInfo, params interface{}, c *gin.Context) (result interface{}, statusCode int, err error)
- func LoadGeneralBoardsByClassWrapper(c *gin.Context)
- func LoadGeneralBoardsWrapper(c *gin.Context)
- func LoadManArticles(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func LoadManArticlesWrapper(c *gin.Context)
- func LoadPopularArticles(remoteAddr string, user *UserInfo, params interface{}, c *gin.Context) (result interface{}, statusCode int, err error)
- func LoadPopularArticlesWrapper(c *gin.Context)
- func LoadPopularBoards(remoteAddr string, user *UserInfo, params interface{}, c *gin.Context) (result interface{}, statusCode int, err error)
- func LoadPopularBoardsAllGuest(remoteAddr string, user *UserInfo, params interface{}, c *gin.Context) (result interface{}, statusCode int, err error)
- func LoadPopularBoardsAllGuestWrapper(c *gin.Context)
- func LoadPopularBoardsWrapper(c *gin.Context)
- func LoadUserArticles(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func LoadUserArticlesWrapper(c *gin.Context)
- func LoadUserComments(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func LoadUserCommentsWrapper(c *gin.Context)
- func Login(remoteAddr string, user *UserInfo, params interface{}, c *gin.Context) (result interface{}, statusCode int, err error)
- func LoginHTMLWrapper(c *gin.Context)
- func LoginRequiredJSON(theFunc LoginRequiredAPIFunc, params interface{}, c *gin.Context)
- func LoginRequiredPathJSON(theFunc LoginRequiredPathAPIFunc, params interface{}, path interface{}, ...)
- func LoginRequiredPathQuery(theFunc LoginRequiredPathAPIFunc, params interface{}, path interface{}, ...)
- func LoginRequiredQuery(theFunc LoginRequiredAPIFunc, params interface{}, c *gin.Context)
- func LoginRequiredRedirectPathQuery(theFunc LoginRequiredRedirectPathAPIFunc, params interface{}, path interface{}, ...)
- func LoginWrapper(c *gin.Context)
- func Logout(remoteAddr string, user *UserInfo, params interface{}, c *gin.Context) (result interface{}, statusCode int, err error)
- func LogoutWrapper(c *gin.Context)
- func ManArticleLockKey(boardID bbs.BBoardID, articleID types.ManArticleID) (key string)
- func OptionsWrapper(c *gin.Context)
- func ParseClaimInt(claim jwt.MapClaims, idx string) (ret int, err error)
- func ParseClaimString(claim jwt.MapClaims, idx string) (ret string, err error)
- func ParseJwt(raw string, secret []byte) (tok *jwt.Token, err error)
- func PathQuery(theFunc PathAPIFunc, params interface{}, path interface{}, c *gin.Context)
- func Query(theFunc APIFunc, params interface{}, c *gin.Context)
- func RedirectFormJSON(theFunc RedirectAPIFunc, params interface{}, c *gin.Context)
- func RedirectQuery(theFunc RedirectAPIFunc, params interface{}, c *gin.Context)
- func Refresh(remoteAddr string, user *UserInfo, params interface{}, c *gin.Context) (result interface{}, statusCode int, err error)
- func RefreshBrdnameBlackListMap() (nBoardID int, err error)
- func RefreshBrdnameBlackListMapAllGuest(remoteAddr string, user *UserInfo, params interface{}, c *gin.Context) (result interface{}, statusCode int, err error)
- func RefreshBrdnameBlackListMapAllGuestWrapper(c *gin.Context)
- func RefreshBrdnameWhiteListMap() (nBoardID int, err error)
- func RefreshBrdnameWhiteListMapAllGuest(remoteAddr string, user *UserInfo, params interface{}, c *gin.Context) (result interface{}, statusCode int, err error)
- func RefreshBrdnameWhiteListMapAllGuestWrapper(c *gin.Context)
- func RefreshWrapper(c *gin.Context)
- func RegisterClient(remoteAddr string, user *UserInfo, params interface{}, c *gin.Context) (result interface{}, statusCode int, err error)
- func RegisterClientWrapper(c *gin.Context)
- func RegisterHTMLWrapper(c *gin.Context)
- func RegisterUser(remoteAddr string, user *UserInfo, params interface{}, c *gin.Context) (result string, statusCode int, err error)
- func RegisterUserWrapper(c *gin.Context)
- func ReplyComments(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func ReplyCommentsWrapper(c *gin.Context)
- func SetIDEmail(remoteAddr string, user *UserInfo, params interface{}, path interface{}, ...) (result interface{}, statusCode int, err error)
- func SetIDEmailWrapper(c *gin.Context)
- func SetIsTest()
- func TryGetArticleContentInfo(userID bbs.UUserID, bboardID bbs.BBoardID, articleID bbs.ArticleID, ...) (content [][]*types.Rune, contentPrefix [][]*types.Rune, contentMD5 string, ...)
- func TryGetManArticleContentInfo(userID bbs.UUserID, bboardID bbs.BBoardID, articleID types.ManArticleID, ...) (content [][]*types.Rune, contentMD5 string, ...)
- func TryLoadPttWebPopularBoards(c *gin.Context) (boards []*schema.BoardSummary, err error)
- func UnsetIsTest()
- func UpdateArticleContentInfo(boardID bbs.BBoardID, articleID bbs.ArticleID, content [][]*types.Rune, ...) (err error)
- func UpdateManArticleContentInfo(boardID bbs.BBoardID, articleID types.ManArticleID, content [][]*types.Rune, ...) (err error)
- func UserAttemptChangeEmailHTMLWrapper(c *gin.Context)
- func UserAttemptSetIDEmailHTMLWrapper(c *gin.Context)
- func UserChangeEmailHTMLWrapper(c *gin.Context)
- func UserChangePasswdHTMLWrapper(c *gin.Context)
- func UserHTMLWrapper(c *gin.Context)
- func UserSetIDEmailHTMLWrapper(c *gin.Context)
- func ZKProxyWrapper(zkProxy *httputil.ReverseProxy) func(c *gin.Context)
- type APIFunc
- type AddFavoriteBoardParams
- type AddFavoriteBoardPath
- type AddFavoriteFolderParams
- type AddFavoriteFolderPath
- type AddFavoriteLineParams
- type AddFavoriteLinePath
- type AddFavoriteResult
- type AttemptChangeEmailParams
- type AttemptChangeEmailPath
- type AttemptChangeEmailResult
- type AttemptLoginParams
- type AttemptLoginResult
- type AttemptRegisterUserParams
- type AttemptRegisterUserResult
- type AttemptSetIDEmailParams
- type AttemptSetIDEmailPath
- type AttemptSetIDEmailResult
- type ChangeEmailParams
- type ChangeEmailPath
- type ChangeEmailResult
- type ChangePasswdParams
- type ChangePasswdPath
- type ChangePasswdResult
- type CheckExistsUserParams
- type CheckExistsUserResult
- type ClientInfo
- type CooldownLimit
- type CreateArticleParams
- type CreateArticlePath
- type CreateArticleResult
- type CreateBoardParams
- type CreateBoardPath
- type CreateBoardResult
- type CreateCommentParams
- type CreateCommentPath
- type CreateCommentResult
- type CreateRankParams
- type CreateRankPath
- type CreateRankResult
- type CrossPostParams
- type CrossPostPath
- type CrossPostResult
- type DeleteArticlesParams
- type DeleteArticlesPath
- type DeleteArticlesResult
- type DeleteCommentsParams
- type DeleteCommentsPath
- type DeleteCommentsResult
- type DeleteFavoriteParams
- type DeleteFavoritePath
- type DeleteFavoriteResult
- type EditArticleParams
- type EditArticlePath
- type EditArticleResult
- type GetArticleBlocksParams
- type GetArticleBlocksPath
- type GetArticleBlocksResult
- type GetArticleDetailParams
- type GetArticleDetailPath
- type GetArticleDetailResult
- type GetBoardDetailParams
- type GetBoardDetailPath
- type GetBoardDetailResult
- type GetBoardSummaryParams
- type GetBoardSummaryPath
- type GetBoardSummaryResult
- type GetManArticleBlocksParams
- type GetManArticleBlocksPath
- type GetManArticleBlocksResult
- type GetManArticleDetailPath
- type GetManArticleDetailResult
- type GetUserIDResult
- type GetUserInfoParams
- type GetUserInfoPath
- type GetUserInfoResult
- type GetUserVisitCountResult
- type GetUsernameResult
- type GetVersionResult
- type HTMLPath
- type IndexParams
- type IndexResult
- type JwtClaim
- type LoadArticleCommentsParams
- type LoadArticleCommentsPath
- type LoadArticleCommentsResult
- type LoadAutoCompleteBoardsParams
- type LoadBottomArticlesPath
- type LoadBottomArticlesResult
- type LoadClassBoardsParams
- type LoadClassBoardsPath
- type LoadClassBoardsResult
- type LoadFavoriteBoardsParams
- type LoadFavoriteBoardsPath
- type LoadFavoriteBoardsResult
- type LoadGeneralArticlesParams
- type LoadGeneralArticlesPath
- type LoadGeneralArticlesResult
- type LoadGeneralBoardsParams
- type LoadGeneralBoardsResult
- type LoadManArticlesParams
- type LoadManArticlesPath
- type LoadManArticlesResult
- type LoadPopularArticlesParams
- type LoadPopularArticlesResult
- type LoadPopularBoardsResult
- type LoadUserArticlesParams
- type LoadUserArticlesPath
- type LoadUserArticlesResult
- type LoadUserCommentsParams
- type LoadUserCommentsPath
- type LoadUserCommentsResult
- type LoginLog
- type LoginParams
- type LoginRequiredAPIFunc
- type LoginRequiredPathAPIFunc
- type LoginRequiredRedirectPathAPIFunc
- type LoginResult
- type PathAPIFunc
- type RedirectAPIFunc
- type RefreshBrdnameBlackListMapResult
- type RefreshBrdnameWhiteListMapResult
- type RefreshParams
- type RefreshResult
- type RegisterClientParams
- type RegisterClientResult
- type RegisterUserParams
- type ReplyCommentsParams
- type ReplyCommentsPath
- type ReplyCommentsResult
- type SetIDEmailParams
- type SetIDEmailPath
- type SetIDEmailResult
- type UserBoardPermReadable
- type UserInfo
Constants ¶
const ( DEFAULT_MAX_ARTICLE_BLOCK_LIST = 1 DEFAULT_MAX_LIST = 200 DEFAULT_DESCENDING = true DEFAULT_ASCENDING = true ARTICLE_LOCK_TS = 10 ARTICLE_LOCK_TS_DURATION = time.Duration(ARTICLE_LOCK_TS) * time.Second ARTICLE_LOCK_NANO_TS = types.NanoTS(ARTICLE_LOCK_TS) * types.TS_TO_NANO_TS HTML_CACHE_CONTROL_TS = 3600 JS_CACHE_CONTROL_TS = 86400 * 365 OFFSET_MTIME_NANO_TS = 1000000000 // 1 second REFRESH_IS_OVER18_NANO_TS = 86400 * 1000000000 INIT_USERNAME_PREFIX = "friend" INIT_USERNAME_RANDOM_LEN = 6 )
const ( ROOT_HTML_R = "/" INDEX_HTML_R = "/index.html" )
const ADD_FAVORITE_BOARD_R = "/user/:user_id/favorites/addboard"
const ADD_FAVORITE_FOLDER_R = "/user/:user_id/favorites/addfolder"
const ADD_FAVORITE_LINE_R = "/user/:user_id/favorites/addline"
const ARTICLES_HTML_R = "/board/:bid/articles"
const ARTICLE_HTML_R = "/board/:bid/article/:aid"
const ATTEMPT_CHANGE_EMAIL_R = "/user/:user_id/attemptchangeemail"
const ATTEMPT_LOGIN_R = "/account/attemptlogin"
const ATTEMPT_REGISTER_USER_R = "/account/attemptregister"
const ATTEMPT_SET_ID_EMAIL_R = "/user/:user_id/attemptsetidemail"
const BOARDS_FAVORITES_HTML_R = "/user/:user_id/favorites"
const BOARDS_HTML_R = "/boards"
const BOARDS_POPULAR_HTML_R = "/boards/popular"
const CHANGE_EMAIL_R = "/user/:user_id/changeemail"
const CHANGE_PASSWD_R = "/user/:user_id/updatepasswd" //nolint // passwd as route
const CHECK_EXISTS_USER_R = "/account/existsuser"
const CLS_BOARDS_HTML_R = "/cls/:cls_id"
const CREATE_ARTICLE_HTML_R = "/board/:bid/post"
const CREATE_ARTICLE_R = "/board/:bid/article"
const CREATE_BOARD_R = "/class/:cls/board"
const CREATE_COMMENT_R = "/board/:bid/article/:aid/comment"
const CREATE_RANK_R = "/board/:bid/article/:aid/rank"
const CROSS_POST_R = "/board/:bid/article/:aid/crosspost"
const (
DEFAULT_FAV_TITLE = "新的目錄"
)
const DELETE_ARTICLES_R = "/board/:bid/deletearticles"
const DELETE_COMMENTS_R = "/board/:bid/article/:aid/deletecomments"
const DELETE_FAVORITE_R = "/user/:user_id/favorites/delete"
const EDIT_ARTICLE_R = "/board/:bid/article/:aid/edit"
const ERR_HTML_R = "/error"
const GET_ARTICLE_BLOCKS_R = "/board/:bid/articleblocks/:aid"
const GET_ARTICLE_R = "/board/:bid/article/:aid"
const GET_BOARD_DETAIL_R = "/board/:bid"
const GET_BOARD_SUMMARY_R = "/board/:bid/summary"
const GET_MAN_ARTICLE_BLOCKS_R = "/board/:bid/manualblocks/*aid"
const GET_MAN_ARTICLE_R = "/board/:bid/manual/*aid"
const GET_USERNAME_R = "/username"
const GET_USER_ID_R = "/userid"
const GET_USER_INFO_R = "/user/:username"
const GET_USER_VISIT_COUNT_R = "/uservisitcount"
const GET_VERSION_R = "/version"
const INDEX_R = "/"
const INIT_HTML_R = "/init"
const (
IS_OVER_18_SUBSTRING = "document.cookie.indexOf('over18=1') === -1)"
)
const LOAD_ARTICLE_COMMENTS_R = "/board/:bid/article/:aid/comments"
const LOAD_AUTO_COMPLETE_BOARDS_R = "/boards/autocomplete"
const LOAD_BOTTOM_ARTICLES_R = "/board/:bid/articles/bottom"
const LOAD_CLASS_BOARDS_R = "/cls/:clsid"
const LOAD_FAVORITE_BOARDS_R = "/user/:user_id/favorites"
const LOAD_GENERAL_ARTICLES_R = "/board/:bid/articles"
const LOAD_GENERAL_BOARDS_BY_CLASS_R = "/boards/byclass"
const LOAD_GENERAL_BOARDS_R = "/boards"
const LOAD_MAN_ARTICLES_R = "/board/:bid/manuals"
const LOAD_POPULAR_ARTICLES_R = "/articles/popular"
const LOAD_POPULAR_BOARDS_R = "/boards/popular"
const LOAD_USER_ARTICLES_R = "/user/:user_id/articles"
const LOAD_USER_COMMENTS_R = "/user/:user_id/comments"
const LOGIN_HTML_R = "/login"
const LOGIN_R = "/account/login"
const LOGOUT_R = "/account/logout"
const (
MAX_USER_FAVORITES_BUF_SIZE = 65535
)
const REFRESH_BRDNAME_BLACK_LIST_MAP_R = "/boards/refresh-black-list"
const REFRESH_BRDNAME_WHITE_LIST_MAP_R = "/boards/refresh-white-list"
const REFRESH_R = "/account/refresh"
const REGISTER_CLIENT_R = "/client/register"
const REGISTER_HTML_R = "/register"
const REGISTER_USER_R = "/account/register"
const REPLY_COMMENTS_R = "/board/:bid/article/:aid/replycomments"
const SET_ID_EMAIL_R = "/user/:user_id/setidemail"
const USER_ATTEMPT_CHANGE_EMAIL_HTML_R = "/user/:user_id/attemptchangeemail"
const USER_ATTEMPT_SET_ID_EMAIL_HTML_R = "/user/:user_id/attemptsetidemail"
const USER_CHANGE_EMAIL_HTML_R = "/user/:user_id/changeemail"
const USER_CHANGE_PASSWD_HTML_R = "/user/:user_id/resetpassword" //nolint // passwd as route
const USER_HTML_R = "/user/:user_id"
const USER_SET_ID_EMAIL_HTML_R = "/user/:user_id/setidemail"
const ZK_CREATE_CHALLENGE_R = "/challenge"
const ZK_GET_CHALLENGE_R = "/challenge/:challenge"
const ZK_ISSUER_CERT_STATUS_R = "/issuer-cert/status"
const ZK_LINK_VERIFY_R = "/link-verify"
const ZK_SMT_ROOT_STATUS_R = "/smt-root/status"
Variables ¶
var ( GET_ARTICLE_CONTENT_INFO_TOO_SOON_NANO_TS = ARTICLE_LOCK_NANO_TS + types.NanoTS(1)*types.TS_TO_NANO_TS // 10 + 1 seconds. MIME_TYPE_MAP = map[string]string{ ".js": "text/javascript", ".html": "text/html", ".map": "application/json", } BRDNAME_WHITE_LIST_MAP = map[string]int{} BRDNAME_BLACK_LIST_MAP = map[string]bool{} )
var ( ErrInvalidRemoteAddr = errors.New("invalid remote addr") ErrInvalidParams = errors.New("invalid params") ErrNoUserID = errors.New("no userid") ErrNoUsername = errors.New("no username") ErrLoginFailed = errors.New("login failed") ErrNotImplemented = errors.New("not implemented") ErrInvalidPath = errors.New("invalid path") ErrInvalidToken = errors.New("invalid token") ErrInvalidOrigin = errors.New("invalid origin") ErrInvalidBackendStatusCode = errors.New("invalid backend status code") ErrNoUser = errors.New("no user") ErrNoBoard = errors.New("no board") ErrNoArticle = errors.New("no article") ErrNoUserBoard = errors.New("no user board") ErrInvalidBoardname = errors.New("invalid boardname") ErrNoEmail = errors.New("no email") ErrAlreadyDeleted = errors.New("already deleted") ErrFileNotFound = errors.New("file not found") ErrInvalidUser = errors.New("invalid user") ErrInvalidClient = errors.New("invalid client") ErrAlreadyExists = errors.New("already exists") ErrInvalidFav = errors.New("invalid fav") ErrNotFriend = errors.New("not friend") ErrBoardBlocked = errors.New("board blocked") ErrBoardReported = errors.New("board reported") ErrBoardBucket = errors.New("board bucket") ErrBoardNotPopular = errors.New("board not popular") ErrPermBoardCreatePermission = errors.New("no board create permission") ErrPermBoardReadHidden = errors.New("hidden board") ErrPermBoardReadBlocked = errors.New("blocked board") ErrPermBoardReadReported = errors.New("reported board") ErrPermBoardReadNotOver18 = errors.New("not over18") ErrPermBoardReadPermission = errors.New("no board read permission") ErrPermPostReadOnly = errors.New("read only") ErrPermPostBannedByBoard = errors.New("banned by board") ErrPermBoardPostPost = errors.New("no user post permission") ErrPermBoardPostRestricted = errors.New("only board friends") ErrPermBoardPostViolateLaw = errors.New("violate law") ErrPermBoardPostPermission = errors.New("no board post permission") ErrPermBoardPostLoginDays = errors.New("invalid login days") ErrPermBoardPostPostLimit = errors.New("reached post limit") ErrPermBoardEditPermission = errors.New("no board edit permission") ErrInvalidStatusCode = errors.New("invalid status code") )
var COOLDOWN_LIMIT = []*CooldownLimit{
{NUser: 4000, Posttime: 1},
{NUser: 2000, Posttime: 2},
{NUser: 1000, Posttime: 3},
{NUser: 0, Posttime: 10},
}
var (
IsTest = false
)
Functions ¶
func AddFavoriteBoard ¶
func AddFavoriteBoardWrapper ¶
func AddFavoriteFolder ¶
func AddFavoriteLine ¶
func AddFavoriteLineWrapper ¶
func AllHTMLWrapper ¶
func ArticleLockKey ¶
func AttemptChangeEmail ¶
func AttemptLogin ¶ added in v0.43.0
func AttemptLoginWrapper ¶ added in v0.43.0
func AttemptRegisterUser ¶
func AttemptSetIDEmail ¶
func ChangeEmail ¶
func ChangeEmailWrapper ¶
func ChangePasswd ¶
func ChangePasswdWrapper ¶
func CheckExistsUser ¶
func CheckExistsUserWrapper ¶
func CheckUserArticlePermDeletable ¶
func CheckUserArticlePermDeletable(user *UserInfo, boardID bbs.BBoardID, articleID bbs.ArticleID, c *gin.Context) (err error)
CheckUserArticlePermDeletable
Deletable
func CheckUserArticlePermEditable ¶
func CheckUserArticlePermEditable(user *UserInfo, boardID bbs.BBoardID, articleID bbs.ArticleID, isCheckBoard bool, c *gin.Context) (err error)
CheckUserArticlePermEditable
Editable
func CheckUserArticlePermReadable ¶
func CheckUserArticlePermReadable(user *UserInfo, boardID bbs.BBoardID, articleID bbs.ArticleID, isCheckBoard bool, c *gin.Context) (err error)
CheckUserArticlePermReadable
Readable
func CheckUserArticlesPermDeletable ¶
func CheckUserArticlesPermDeletable(user *UserInfo, boardID bbs.BBoardID, articleIDs []bbs.ArticleID, userBoardPermReadable *UserBoardPermReadable, c *gin.Context) (articlePermMap map[bbs.ArticleID]error, err error)
CheckUserArticlePermDeletable
Deletable
func CheckUserArticlesPermEditable ¶
func CheckUserArticlesPermEditable(user *UserInfo, boardID bbs.BBoardID, articleIDs []bbs.ArticleID, userBoardPerm *UserBoardPermReadable, c *gin.Context) (articlePermMap map[bbs.ArticleID]error, err error)
CheckUserArticlesPermEditable
articles Editable
func CheckUserArticlesPermEditableDeletable ¶
func CheckUserArticlesPermEditableDeletable(user *UserInfo, boardID bbs.BBoardID, articleIDs []bbs.ArticleID, userBoardPerm *UserBoardPermReadable, c *gin.Context) (articlePermEditableMap map[bbs.ArticleID]error, articlePermDeletableMap map[bbs.ArticleID]error, err error)
CheckUserArticlesPermEditable
articles Editable
func CheckUserBoardPermCreatable ¶
CheckUserBoardPermCreatable
func CheckUserBoardPermEditable ¶
CheckUserBoardPermEditable
func CheckUserBoardPermPostable ¶
CheckUserBoardPermPostable
https://github.com/ptt/pttbbs/blob/master/mbbsd/cache.c#L209
func CreateArticle ¶
func CreateArticleWrapper ¶
func CreateBoard ¶
func CreateBoardWrapper ¶
func CreateComment ¶
func CreateCommentWrapper ¶
func CreateRank ¶
func CreateRankWrapper ¶
func CrossPostWrapper ¶
func DeleteArticles ¶
func DeleteArticles(remoteAddr string, user *UserInfo, params interface{}, path interface{}, c *gin.Context) (result interface{}, statusCode int, err error)
DeleteArticles provides function from api /board/:bid/deletearticles it will call backend api (go-pttbbs) and deleting all components like: comments, ranks, user_read_records about this articles
func DeleteArticlesWrapper ¶
func DeleteComments ¶
func DeleteCommentsWrapper ¶
func DeleteFavorite ¶
func DeleteFavoriteWrapper ¶
func DeserializeArticlesAndUpdateDB ¶
func DeserializeArticlesAndUpdateDB(articleSummaries_b []*bbs.ArticleSummary, updateNanoTS types.NanoTS, isBottom bool) (articleSummaries []*schema.ArticleSummaryWithRegex, err error)
func DeserializeBoardDetailsAndUpdateDB ¶
func DeserializeBoardDetailsAndUpdateDB(boardDetails_b []*bbs.BoardDetail, updateNanoTS types.NanoTS) (boardDetails []*schema.BoardDetail, err error)
DeserializeBoards
each_b.Reason happens only with invalid permission.
func DeserializeBoardsAndUpdateDB ¶
func DeserializeBoardsAndUpdateDB(boardSummaries_b []*bbs.BoardSummary, updateNanoTS types.NanoTS) (boardSummaries []*schema.BoardSummary, err error)
DeserializeBoards
each_b.Reason happens only with invalid permission.
func DeserializePBBoardsAndUpdateDB ¶
func DeserializePBBoardsAndUpdateDB(boardSummaries_b []*boardd.Board, updateNanoTS types.NanoTS) (boardSummaries []*schema.BoardSummary, err error)
DeserializePBBoardsAndUpdateDB
func DeserializeUserDetailAndUpdateDBForTest ¶ added in v0.43.0
func DeserializeUserDetailAndUpdateDBForTest(user_b pttbbsapi.GetUserResult, updateNanoTS types.NanoTS) (userDetail *schema.UserDetail, err error)
func EditArticleDetail ¶
func ErrBoardCooldown ¶
func ErrBoardPosttime ¶
func ErrFloodReject ¶
func ErrorHTMLWrapper ¶ added in v0.43.0
func FormLogout ¶
func GetArticleBlocks ¶
func GetArticleBlocksWrapper ¶
func GetArticleDetail ¶
func GetArticleDetailWrapper ¶
func GetBoardDetail ¶
func GetBoardDetailAllGuest ¶
func GetBoardDetailWrapper ¶
func GetBoardSummary ¶
func GetBoardSummaryAllGuest ¶
func GetBoardSummaryWrapper ¶
func GetManArticleBlocks ¶
func GetManArticleDetail ¶
func GetUserIDAllGuest ¶
func GetUserIDWrapper ¶
func GetUserInfo ¶
func GetUserInfoWrapper ¶
func GetUserVisitCount ¶
func GetUsername ¶ added in v0.43.0
func GetUsernameWrapper ¶ added in v0.43.0
func GetVersion ¶
func GetVersionWrapper ¶
func IndexHTMLWrapper ¶
func IndexWrapper ¶
func InitHTMLWrapper ¶ added in v0.43.0
func LoadArticleComments ¶
func LoadAutoCompleteBoards ¶
func LoadBottomArticles ¶
func LoadClassBoards ¶
func LoadClassBoardsWrapper ¶
func LoadFavoriteBoards ¶
func LoadGeneralArticles ¶
func LoadGeneralBoards ¶
func LoadManArticles ¶
func LoadManArticlesWrapper ¶
func LoadPopularArticles ¶
func LoadPopularBoards ¶
func LoadUserArticles ¶
func LoadUserArticlesWrapper ¶
func LoadUserComments ¶
func LoadUserCommentsWrapper ¶
func LoginHTMLWrapper ¶
func LoginRequiredJSON ¶
func LoginRequiredJSON(theFunc LoginRequiredAPIFunc, params interface{}, c *gin.Context)
func LoginRequiredPathJSON ¶
func LoginRequiredPathJSON(theFunc LoginRequiredPathAPIFunc, params interface{}, path interface{}, c *gin.Context)
func LoginRequiredPathQuery ¶
func LoginRequiredPathQuery(theFunc LoginRequiredPathAPIFunc, params interface{}, path interface{}, c *gin.Context)
func LoginRequiredQuery ¶
func LoginRequiredQuery(theFunc LoginRequiredAPIFunc, params interface{}, c *gin.Context)
func LoginRequiredRedirectPathQuery ¶ added in v0.43.0
func LoginRequiredRedirectPathQuery(theFunc LoginRequiredRedirectPathAPIFunc, params interface{}, path interface{}, c *gin.Context)
func LoginWrapper ¶
func LogoutWrapper ¶
func ManArticleLockKey ¶
func ManArticleLockKey(boardID bbs.BBoardID, articleID types.ManArticleID) (key string)
func OptionsWrapper ¶
func ParseClaimInt ¶ added in v0.43.0
func ParseClaimString ¶ added in v0.43.0
func PathQuery ¶
func PathQuery(theFunc PathAPIFunc, params interface{}, path interface{}, c *gin.Context)
func RedirectFormJSON ¶ added in v0.43.0
func RedirectFormJSON(theFunc RedirectAPIFunc, params interface{}, c *gin.Context)
func RedirectQuery ¶ added in v0.43.0
func RedirectQuery(theFunc RedirectAPIFunc, params interface{}, c *gin.Context)
func RefreshBrdnameBlackListMap ¶ added in v0.42.2
func RefreshBrdnameBlackListMapAllGuest ¶ added in v0.42.3
func RefreshBrdnameBlackListMapAllGuestWrapper ¶ added in v0.42.3
func RefreshBrdnameWhiteListMap ¶ added in v0.42.2
func RefreshBrdnameWhiteListMapAllGuest ¶ added in v0.42.3
func RefreshBrdnameWhiteListMapAllGuestWrapper ¶ added in v0.42.3
func RefreshWrapper ¶
func RegisterClient ¶
func RegisterClientWrapper ¶
func RegisterHTMLWrapper ¶
func RegisterUser ¶
func RegisterUserWrapper ¶
func ReplyComments ¶
func ReplyCommentsWrapper ¶
func SetIDEmail ¶
func SetIDEmailWrapper ¶
func TryGetArticleContentInfo ¶
func TryGetArticleContentInfo(userID bbs.UUserID, bboardID bbs.BBoardID, articleID bbs.ArticleID, c *gin.Context, isSystem bool, isHash bool, isContent bool) (content [][]*types.Rune, contentPrefix [][]*types.Rune, contentMD5 string, ip string, host string, bbs string, signatureMD5 string, signatureDBCS []byte, articleDetailSummary *schema.ArticleDetailSummary, fileSize int, hash cmsys.Fnv64_t, statusCode int, err error)
TryGetArticleContentInfo
嘗試拿到 article-content
- 根據 article-id 得到相對應的 filename, ownerid, create-time.
- 嘗試從 schema 拿到 db summary 資訊. (create-time)
- 如果可以從 schema 拿到 db 資訊: 3.1. 如果已經 deleted: return deleted. 3.2. 如果距離上次跟 pttbbs 拿的時間太近: 從 schema 拿到 content, return schema-content.
- 嘗試做 lock. 4.1. 如果 lock 失敗: 從 schema 拿到 content, return schema-content.
- 從 pttbbs 拿到 article
- 如果從 pttbbs 拿到的時間比 schema 裡拿到的時間舊的話: return schema-content.
- parse article 為 content / comments.
- 將 comments parse 為 firstComments / theRestComments.
- 將 theRestComments 丟進 queue 裡.
func TryLoadPttWebPopularBoards ¶
func TryLoadPttWebPopularBoards(c *gin.Context) (boards []*schema.BoardSummary, err error)
func UnsetIsTest ¶
func UnsetIsTest()
func UserHTMLWrapper ¶
func ZKProxyWrapper ¶ added in v0.43.0
func ZKProxyWrapper(zkProxy *httputil.ReverseProxy) func(c *gin.Context)
Types ¶
type AddFavoriteBoardParams ¶
type AddFavoriteBoardPath ¶
type AddFavoriteFolderParams ¶
type AddFavoriteFolderPath ¶
type AddFavoriteLineParams ¶
type AddFavoriteLinePath ¶
type AddFavoriteResult ¶
type AddFavoriteResult *apitypes.BoardSummary
type AttemptChangeEmailPath ¶
type AttemptLoginParams ¶ added in v0.43.0
type AttemptLoginParams struct {
Input string `json:"input" form:"input"`
}
type AttemptLoginResult ¶ added in v0.43.0
type AttemptLoginResult struct{}
type AttemptRegisterUserParams ¶
type AttemptRegisterUserParams struct {
Email string `json:"email" form:"email"`
}
type AttemptRegisterUserResult ¶
type AttemptRegisterUserResult struct{}
type AttemptSetIDEmailParams ¶
type AttemptSetIDEmailPath ¶
type AttemptSetIDEmailResult ¶
type ChangeEmailParams ¶
type ChangeEmailPath ¶
type ChangeEmailResult ¶
type ChangePasswdParams ¶
type ChangePasswdParams struct {
ClientID string `json:"client_id" form:"client_id"`
ClientSecret string `json:"client_secret" form:"client_secret"`
OrigPassword string `json:"orig_password" form:"orig_password"`
Password string `json:"password" form:"password"`
PasswordConfirm string `json:"password_confirm" form:"password_confirm"`
}
type ChangePasswdPath ¶
type ChangePasswdResult ¶
type ChangePasswdResult LoginResult
func NewChangePasswdResult ¶
func NewChangePasswdResult(result_b *pttbbsapi.ChangePasswdResult) *ChangePasswdResult
type CheckExistsUserParams ¶
type CheckExistsUserResult ¶
type CheckExistsUserResult struct {
IsExists bool `json:"is_exists"`
}
type ClientInfo ¶
type ClientInfo struct {
ClientID string `json:"c"`
ClientType types.ClientType `json:"t"`
}
type CooldownLimit ¶
type CreateArticleParams ¶
type CreateArticlePath ¶
type CreateArticleResult ¶
type CreateArticleResult *apitypes.ArticleSummary
type CreateBoardParams ¶
type CreateBoardParams struct {
Brdname string `json:"brdname" form:"brdname" url:"brdname"`
BrdClass string `json:"class" form:"class" url:"class"`
BrdTitle string `json:"title" form:"title" url:"title"`
BMs []bbs.UUserID `json:"bms,omitempty" form:"bms,omitempty" url:"bms,omitempty"`
BrdAttr ptttype.BrdAttr `json:"brdattr,omitempty" form:"brdattr,omitempty" url:"brdattr,omitempty"`
Level ptttype.PERM `json:"level,omitempty" form:"level,omitempty" url:"level,omitempty"`
ChessCountry ptttype.ChessCode `json:"chess_country,omitempty" form:"chess_country,omitempty" url:"chess_country,omitempty"`
IsGroup bool `json:"is_group,omitempty" form:"is_group,omitempty" url:"is_group,omitempty"`
}
type CreateBoardPath ¶
type CreateBoardResult ¶
type CreateBoardResult *apitypes.BoardSummary
type CreateCommentParams ¶
type CreateCommentParams struct {
CommentType ptttype.CommentType `json:"type" form:"type" url:"type"`
Content string `json:"content" form:"content" url:"content"`
}
type CreateCommentPath ¶
type CreateCommentPath struct {
FBoardID apitypes.FBoardID `uri:"bid" binding:"required"`
FArticleID apitypes.FArticleID `uri:"aid" binding:"required"`
}
type CreateCommentResult ¶
type CreateRankParams ¶
type CreateRankParams struct {
Rank int `json:"rank" form:"rank" url:"rank"`
}
type CreateRankPath ¶
type CreateRankPath struct {
FBoardID apitypes.FBoardID `uri:"bid" binding:"required"`
FArticleID apitypes.FArticleID `uri:"aid" binding:"required"`
}
type CreateRankResult ¶
type CrossPostParams ¶
type CrossPostPath ¶
type CrossPostPath struct {
FBoardID apitypes.FBoardID `uri:"bid" binding:"required"`
FArticleID apitypes.FArticleID `uri:"aid" binding:"required"`
}
type CrossPostResult ¶
type DeleteArticlesParams ¶
type DeleteArticlesParams struct {
ArticleIDs []apitypes.FArticleID `json:"aids" form:"aids" url:"aids" binding:"required"`
}
type DeleteArticlesPath ¶
type DeleteArticlesResult ¶
type DeleteCommentsParams ¶
type DeleteCommentsParams struct {
TheList []*apitypes.DeleteCommentParams `json:"list" form:"list" url:"list"`
}
type DeleteCommentsPath ¶
type DeleteCommentsPath struct {
FBoardID apitypes.FBoardID `uri:"bid"`
FArticleID apitypes.FArticleID `uri:"aid"`
}
type DeleteCommentsResult ¶
type DeleteFavoriteParams ¶
type DeleteFavoritePath ¶
type DeleteFavoriteResult ¶
type EditArticleParams ¶
type EditArticlePath ¶
type EditArticlePath struct {
FBoardID apitypes.FBoardID `uri:"bid"`
FArticleID apitypes.FArticleID `uri:"aid"`
}
type EditArticleResult ¶
type GetArticleBlocksParams ¶
type GetArticleBlocksParams struct {
StartIdx string `json:"start_idx,omitempty" form:"start_idx,omitempty" url:"start_idx,omitempty"`
Max int `json:"limit,omitempty" form:"limit,omitempty" url:"limit,omitempty"`
}
func NewGetArticleBlocksParams ¶
func NewGetArticleBlocksParams() *GetArticleBlocksParams
type GetArticleBlocksPath ¶
type GetArticleBlocksPath struct {
FBoardID apitypes.FBoardID `uri:"bid"`
FArticleID apitypes.FArticleID `uri:"aid"`
}
type GetArticleBlocksResult ¶
type GetArticleBlocksResult struct {
Content [][]*types.Rune `json:"content,omitempty"`
IsDeleted bool `json:"deleted,omitempty"` //
CreateTime types.Time8 `json:"create_time,omitempty"` //
MTime types.Time8 `json:"modified,omitempty"` //
Recommend int `json:"recommend,omitempty"` //
NComments int `json:"n_comments,omitempty"` //
Owner bbs.UUserID `json:"owner,omitempty"` //
Nickname string `json:"nickname,omitempty"`
Title string `json:"title,omitempty"` //
Money int `json:"money,omitempty"` //
Class string `json:"class,omitempty"` // can be: R: 轉, [class]
Filemode ptttype.FileMode `json:"mode,omitempty"` //
SubjectType ptttype.SubjectType `json:"subject_type"`
IP string `json:"ip,omitempty"`
Host string `json:"host,omitempty"` // ip 的中文呈現, 外國則為國家.
BBS string `json:"bbs,omitempty"`
Rank int `json:"rank,omitempty"` // 評價
NextIdx string `json:"next_idx"`
TokenUser bbs.UUserID `json:"tokenuser"`
}
type GetArticleDetailParams ¶
type GetArticleDetailParams struct{}
type GetArticleDetailPath ¶
type GetArticleDetailPath struct {
FBoardID apitypes.FBoardID `uri:"bid"`
FArticleID apitypes.FArticleID `uri:"aid"`
}
type GetArticleDetailResult ¶
type GetArticleDetailResult struct {
BBoardID apitypes.FBoardID `json:"bid"` //
ArticleID apitypes.FArticleID `json:"aid"` //
IsDeleted bool `json:"deleted"` //
CreateTime types.Time8 `json:"create_time"` //
MTime types.Time8 `json:"modified"` //
Recommend int `json:"recommend"` //
NComments int `json:"n_comments"` //
Owner bbs.UUserID `json:"owner"` //
Nickname string `json:"nickname"`
Title string `json:"title"` //
Money int `json:"money"` //
Class string `json:"class"` // can be: R: 轉, [class]
Filemode ptttype.FileMode `json:"mode"` //
SubjectType ptttype.SubjectType `json:"subject_type"`
URL string `json:"url"` //
Read bool `json:"read"` //
Brdname string `json:"brdname"`
Content [][]*types.Rune `json:"content"`
ContentPrefix [][]*types.Rune `json:"prefix"`
IP string `json:"ip"`
Host string `json:"host"` // ip 的中文呈現, 外國則為國家.
BBS string `json:"bbs"`
Rank int `json:"rank"` // 評價
TokenUser bbs.UUserID `json:"tokenuser"`
}
type GetBoardDetailParams ¶
type GetBoardDetailParams struct {
Fields string `json:"fields,omitempty" form:"fields,omitempty" uri:"fields,omitempty"`
}
type GetBoardDetailPath ¶
type GetBoardDetailResult ¶
type GetBoardDetailResult *apitypes.BoardDetail
type GetBoardSummaryParams ¶
type GetBoardSummaryParams struct{}
type GetBoardSummaryPath ¶
type GetBoardSummaryResult ¶
type GetBoardSummaryResult *apitypes.BoardSummary
type GetManArticleBlocksParams ¶
type GetManArticleBlocksParams struct {
StartIdx string `json:"start_idx,omitempty" form:"start_idx,omitempty" url:"start_idx,omitempty"`
Max int `json:"limit,omitempty" form:"limit,omitempty" url:"limit,omitempty"`
}
func NewGetManArticleBlocksParams ¶
func NewGetManArticleBlocksParams() *GetManArticleBlocksParams
type GetManArticleBlocksPath ¶
type GetManArticleBlocksPath struct {
FBoardID apitypes.FBoardID `uri:"bid"`
FArticleID apitypes.FArticleID `uri:"aid"`
}
type GetManArticleBlocksResult ¶
type GetManArticleBlocksResult struct {
Content [][]*types.Rune `json:"content,omitempty"`
IsDeleted bool `json:"deleted,omitempty"` //
CreateTime types.Time8 `json:"create_time,omitempty"` //
MTime types.Time8 `json:"modified,omitempty"` //
Title string `json:"title,omitempty"` //
NextIdx string `json:"next_idx"`
TokenUser bbs.UUserID `json:"tokenuser"`
}
type GetManArticleDetailPath ¶
type GetManArticleDetailPath struct {
FBoardID apitypes.FBoardID `uri:"bid"`
FArticleID apitypes.FArticleID `uri:"aid"`
}
type GetManArticleDetailResult ¶
type GetManArticleDetailResult struct {
BBoardID apitypes.FBoardID `json:"bid"` //
ArticleID apitypes.FArticleID `json:"aid"` //
LevelIdx apitypes.FArticleID `json:"level_idx"`
IsDeleted bool `json:"deleted"` //
CreateTime types.Time8 `json:"create_time"` //
MTime types.Time8 `json:"modified"` //
Title string `json:"title"` //
IsDir bool `json:"is_dir"`
Content [][]*types.Rune `json:"content"`
TokenUser bbs.UUserID `json:"tokenuser"`
}
type GetUserIDResult ¶
type GetUserInfoParams ¶
type GetUserInfoParams struct {
Fields string `json:"fields,omitempty" form:"fields,omitempty" url:"fields,omitempty"`
}
type GetUserInfoPath ¶
type GetUserInfoPath struct {
Username string `uri:"username"`
}
type GetUserInfoResult ¶
type GetUserInfoResult struct {
UserID bbs.UUserID `json:"user_id"`
Username string `json:"username"`
Realname string `json:"realtime"`
Nickname string `json:"nickname"`
IsGovernmentID bool `json:"is_government_id"`
Uflag ptttype.UFlag `json:"flag"`
Userlevel ptttype.PERM `json:"perm"`
Numlogindays int `json:"login_days"`
Numposts int `json:"posts"`
Firstlogin types.Time8 `json:"first_login"`
Lastlogin types.Time8 `json:"last_login"`
LastIP string `json:"last_ip"`
LastHost string `json:"last_host"` // ip 的中文呈現, 外國則為國家.
Money int `json:"money"`
PttEmail string `json:"pttemail"`
Justify string `json:"justify"`
Over18 bool `json:"over18"`
PagerUIType uint8 `json:"pager_ui"` /* 呼叫器界面類別 (was: WATER_*) */
Pager ptttype.PagerMode `json:"pager"` /* 呼叫器狀態 */
Invisible bool `json:"invisible"`
Exmailbox uint32 `json:"exmail"`
Career string `json:"career"`
Role uint32 `json:"role"`
LastSeen types.Time8 `json:"last_seen"`
TimeSetAngel types.Time8 `json:"time_set_angel"`
TimePlayAngel types.Time8 `json:"time_play_angel"`
LastSong types.Time8 `json:"last_song"`
LoginView uint32 `json:"login_view"`
Vlcount int `json:"violation"`
FiveWin int `json:"five_win"`
FiveLose int `json:"five_lose"`
FiveTie int `json:"five_tie"`
ChcWin int `json:"chc_win"`
ChcLose int `json:"chc_lose"`
ChcTie int `json:"chc_tie"`
Conn6Win int `json:"conn6_win"`
Conn6Lose int `json:"conn6_lose"`
Conn6Tie int `json:"conn6_tie"`
GoWin int `json:"go_win"`
GoLose int `json:"go_lose"`
GoTie int `json:"go_tie"`
DarkWin int `json:"dark_win"`
DarkLose int `json:"dark_lose"`
DarkTie int `json:"dark_tie"` /* 暗棋戰績 和 */
ChessEloRating int `json:"chess_rank"` /* 象棋等級 */
UaVersion uint8 `json:"ua_version"`
Signature uint8 `json:"signaure"` /* 慣用簽名檔 */
BadPost int `json:"bad_post"` /* 評價為壞文章數 */
MyAngel bbs.UUserID `json:"angel"` /* 我的小天使 */
TimeRemoveBadPost types.Time8 `json:"time_remove_bad_post"`
TimeViolateLaw types.Time8 `json:"time_violate_law"`
IsDeleted bool `json:"deleted"`
UpdateTS types.Time8 `json:"update_ts"`
UserLevel2 ptttype.PERM2 `bson:"perm2"`
UpdateTS2 types.Time8 `bson:"update_ts2"`
Avatar []byte `json:"avatar"`
AvatarTS types.Time8 `json:"avatar_ts"`
Email string `json:"email"`
EmailTS types.Time8 `json:"email_ts"`
TwoFactorEnabled bool `json:"twofactor_enabled"`
TwoFactorEnabledTS types.Time8 `json:"twofactor_enabled_ts"`
IDEmail string `json:"idemail"`
IDEmailSet bool `json:"idemail_set"`
IDEmailTS types.Time8 `json:"idemail_ts"`
TokenUser bbs.UUserID `json:"tokenuser"`
}
func NewUserInfoResult ¶
func NewUserInfoResult(userDetail_db *schema.UserDetail, userNewInfo_db *schema.UserNewInfo, userIDEmail_db *schema.UserIDEmail, userEmail_db *schema.UserEmail, userPermInfo *schema.UserPermInfo) (result *GetUserInfoResult)
type GetUserVisitCountResult ¶
type GetUsernameResult ¶ added in v0.43.0
type GetVersionResult ¶
type IndexParams ¶
type IndexParams struct {
In int `json:"in,omitempty" form:"in,omitempty" url:"in,omitempty"`
}
func NewIndexParams ¶
func NewIndexParams() *IndexParams
type IndexResult ¶
type IndexResult struct {
Data interface{} `json:"data,omitempty"`
}
type LoadArticleCommentsParams ¶
type LoadArticleCommentsParams struct {
StartIdx string `json:"start_idx,omitempty" form:"start_idx,omitempty" url:"start_idx,omitempty"`
Descending bool `json:"desc,omitempty" form:"desc,omitempty" url:"desc,omitempty"`
Max int `json:"limit,omitempty" form:"limit,omitempty" url:"limit,omitempty"`
}
func NewLoadArticleCommentsParams ¶
func NewLoadArticleCommentsParams() *LoadArticleCommentsParams
type LoadArticleCommentsPath ¶
type LoadArticleCommentsPath struct {
FBoardID apitypes.FBoardID `uri:"bid"`
FArticleID apitypes.FArticleID `uri:"aid"`
}
type LoadArticleCommentsResult ¶
type LoadArticleCommentsResult struct {
List []*apitypes.Comment `json:"list"`
NextIdx string `json:"next_idx"`
TokenUser bbs.UUserID `json:"tokenuser,omitempty"`
}
type LoadAutoCompleteBoardsParams ¶
type LoadAutoCompleteBoardsParams struct {
Keyword string `json:"brdname,omitempty" form:"brdname,omitempty" url:"brdname,omitempty"`
StartIdx string `json:"start_idx,omitempty" form:"start_idx,omitempty" url:"start_idx,omitempty"`
Ascending bool `json:"asc,omitempty" form:"asc,omitempty" url:"asc,omitempty"`
Max int `json:"limit,omitempty" form:"limit,omitempty" url:"limit,omitempty"`
}
func NewLoadAutoCompleteBoardsParams ¶
func NewLoadAutoCompleteBoardsParams() *LoadAutoCompleteBoardsParams
type LoadBottomArticlesPath ¶
type LoadBottomArticlesResult ¶
type LoadBottomArticlesResult struct {
List []*apitypes.ArticleSummary `json:"list"`
TokenUser bbs.UUserID `json:"tokenuser,omitempty"`
}
type LoadClassBoardsParams ¶
type LoadClassBoardsParams struct {
StartIdx string `json:"start_idx,omitempty" form:"start_idx,omitempty" url:"start_idx,omitempty"`
SortBy ptttype.BSortBy `json:"sortby,omitempty" form:"sortby,omitempty" url:"sortby,omitempty"`
Ascending bool `json:"asc,omitempty" form:"asc,omitempty" url:"asc,omitempty"`
Max int `json:"limit,omitempty" form:"limit,omitempty" url:"limit,omitempty"`
}
func NewLoadClassBoardsParams ¶
func NewLoadClassBoardsParams() *LoadClassBoardsParams
type LoadClassBoardsPath ¶
type LoadClassBoardsResult ¶
type LoadClassBoardsResult struct {
List []*apitypes.BoardSummary `json:"list"`
NextIdx string `json:"next_idx"`
TokenUser bbs.UUserID `json:"tokenuser,omitempty"`
}
func NewLoadClassBoardsResult ¶
func NewLoadClassBoardsResult(boardSummaries_db []*schema.BoardSummary, userBoardInfoMap map[bbs.BBoardID]*apitypes.UserBoardInfo, nextIdx string, sortBy ptttype.BSortBy, userID bbs.UUserID) (ret *LoadClassBoardsResult)
type LoadFavoriteBoardsParams ¶
type LoadFavoriteBoardsParams struct {
LevelIdx schema.LevelIdx `json:"level_idx,omitempty" form:"level_idx,omitempty" url:"level_idx,omitempty"`
StartIdx string `json:"start_idx,omitempty" form:"start_idx,omitempty" url:"start_idx,omitempty"`
Ascending bool `json:"asc,omitempty" form:"asc,omitempty" url:"asc,omitempty"`
Max int `json:"limit,omitempty" form:"limit,omitempty" url:"limit,omitempty"`
}
func NewLoadFavoriteBoardsParams ¶
func NewLoadFavoriteBoardsParams() *LoadFavoriteBoardsParams
type LoadFavoriteBoardsPath ¶
type LoadFavoriteBoardsResult ¶
type LoadFavoriteBoardsResult struct {
List []*apitypes.BoardSummary `json:"list"`
NextIdx string `json:"next_idx"`
TokenUser bbs.UUserID `json:"tokenuser,omitempty"`
}
func NewLoadFavoriteBoardsResult ¶
func NewLoadFavoriteBoardsResult(userID bbs.UUserID, userFavorites_db []*schema.UserFavorites, boardSummaryMap_db map[ptttype.Bid]*schema.BoardSummary, userBoardInfoMap map[bbs.BBoardID]*apitypes.UserBoardInfo, nextIdx string) (result *LoadFavoriteBoardsResult)
type LoadGeneralArticlesParams ¶
type LoadGeneralArticlesParams struct {
Keyword string `json:"title,omitempty" form:"title,omitempty" url:"title,omitempty"`
StartIdx string `json:"start_idx,omitempty" form:"start_idx,omitempty" url:"start_idx,omitempty"`
Max int `json:"limit,omitempty" form:"limit,omitempty" url:"limit,omitempty"`
Descending bool `json:"desc,omitempty" form:"desc,omitempty" url:"desc,omitempty"`
}
func NewLoadGeneralArticlesParams ¶
func NewLoadGeneralArticlesParams() *LoadGeneralArticlesParams
type LoadGeneralArticlesPath ¶
type LoadGeneralArticlesResult ¶
type LoadGeneralArticlesResult struct {
List []*apitypes.ArticleSummary `json:"list"`
NextIdx string `json:"next_idx"`
TokenUser bbs.UUserID `json:"tokenuser,omitempty"`
}
type LoadGeneralBoardsParams ¶
type LoadGeneralBoardsParams struct {
Title string `json:"title,omitempty" form:"title,omitempty" url:"title,omitempty"`
Keyword string `json:"keyword,omitempty" form:"keyword,omitempty" url:"keyword,omitempty"`
StartIdx string `json:"start_idx,omitempty" form:"start_idx,omitempty" url:"start_idx,omitempty"`
Ascending bool `json:"asc,omitempty" form:"asc,omitempty" url:"asc,omitempty"`
Max int `json:"limit,omitempty" form:"limit,omitempty" url:"limit,omitempty"`
}
func NewLoadGeneralBoardsParams ¶
func NewLoadGeneralBoardsParams() *LoadGeneralBoardsParams
type LoadGeneralBoardsResult ¶
type LoadGeneralBoardsResult struct {
List []*apitypes.BoardSummary `json:"list"`
NextIdx string `json:"next_idx"`
TokenUser bbs.UUserID `json:"tokenuser,omitempty"`
}
func NewLoadGeneralBoardsResult ¶
func NewLoadGeneralBoardsResult(boardSummaries_db []*schema.BoardSummary, userBoardInfoMap map[bbs.BBoardID]*apitypes.UserBoardInfo, nextIdx string, url string, userID bbs.UUserID) *LoadGeneralBoardsResult
type LoadManArticlesParams ¶
type LoadManArticlesParams struct {
LevelIdx apitypes.FArticleID `json:"level_idx,omitempty" form:"level_idx,omitempty" url:"level_idx,omitempty"`
}
type LoadManArticlesPath ¶
type LoadManArticlesResult ¶
type LoadManArticlesResult struct {
List []*apitypes.ManArticleSummary `json:"list"`
TokenUser bbs.UUserID `json:"tokenuser,omitempty"`
}
func NewLoadManArticlesResult ¶
func NewLoadManArticlesResult(articleSummaries_db []*schema.ManArticleSummary, userID bbs.UUserID) (r *LoadManArticlesResult)
type LoadPopularArticlesParams ¶
type LoadPopularArticlesParams struct {
StartIdx string `json:"start_idx,omitempty" form:"start_idx,omitempty" url:"start_idx,omitempty"`
Max int `json:"limit,omitempty" form:"limit,omitempty" url:"limit,omitempty"`
Descending bool `json:"desc,omitempty" form:"desc,omitempty" url:"desc,omitempty"`
}
func NewLoadPopularArticlesParams ¶
func NewLoadPopularArticlesParams() *LoadPopularArticlesParams
type LoadPopularArticlesResult ¶
type LoadPopularArticlesResult struct {
List []*apitypes.ArticleSummary `json:"list"`
NextIdx string `json:"next_idx"`
TokenUser bbs.UUserID `json:"tokenuser,omitempty"`
}
type LoadPopularBoardsResult ¶
type LoadPopularBoardsResult struct {
List []*apitypes.BoardSummary `json:"list"`
TokenUser bbs.UUserID `json:"tokenuser,omitempty"`
}
func NewLoadPopularBoardsResult ¶
func NewLoadPopularBoardsResult(boardSummaries_db []*schema.BoardSummary, userBoardInfoMap map[bbs.BBoardID]*apitypes.UserBoardInfo, userID bbs.UUserID) *LoadPopularBoardsResult
type LoadUserArticlesParams ¶
type LoadUserArticlesParams struct {
StartIdx string `json:"start_idx,omitempty" form:"start_idx,omitempty" url:"start_idx,omitempty"`
Descending bool `json:"desc,omitempty" form:"desc,omitempty" url:"desc,omitempty"`
Max int `json:"limit,omitempty" form:"limit,omitempty" url:"limit,omitempty"`
}
func NewUserArticlesParams ¶
func NewUserArticlesParams() *LoadUserArticlesParams
type LoadUserArticlesPath ¶
type LoadUserArticlesResult ¶
type LoadUserArticlesResult struct {
List []*apitypes.ArticleSummary `json:"list"`
NextIdx string `json:"next_idx"`
TokenUser bbs.UUserID `json:"tokenuser,omitempty"`
}
func NewLoadUserArticlesResult ¶
func NewLoadUserArticlesResult(a_db []*schema.ArticleSummary, userReadBoardArticleMap map[types.BoardArticleID]bool, nextIdx string, userID bbs.UUserID) *LoadUserArticlesResult
type LoadUserCommentsParams ¶
type LoadUserCommentsParams struct {
StartIdx string `json:"start_idx,omitempty" form:"start_idx,omitempty" url:"start_idx,omitempty"`
Descending bool `json:"desc,omitempty" form:"desc,omitempty" url:"desc,omitempty"`
Max int `json:"limit,omitempty" form:"limit,omitempty" url:"limit,omitempty"`
}
func NewLoadUserCommentsParams ¶
func NewLoadUserCommentsParams() *LoadUserCommentsParams
type LoadUserCommentsPath ¶
type LoadUserCommentsResult ¶
type LoadUserCommentsResult struct {
List []*apitypes.ArticleComment `json:"list"`
NextIdx string `json:"next_idx"`
TokenUser bbs.UUserID `json:"tokenuser,omitempty"`
}
func NewLoadUserCommentsResult ¶
func NewLoadUserCommentsResult( commentSummaries_db []*schema.CommentSummary, articleSummaryMap map[types.BoardArticleID]*schema.ArticleSummary, userReadBoardArticleMap map[types.BoardArticleID]types.NanoTS, nextIdx string, userID bbs.UUserID, ) (result *LoadUserCommentsResult)
type LoginLog ¶
type LoginLog struct {
ClientInfo
LoginID string
LoginTime types.NanoTS
LoginIP string
IsSuccess bool
}
LoginLog record user login info, no matter success or not
type LoginParams ¶
type LoginParams struct {
ClientID string `json:"client_id" form:"client_id"`
ClientSecret string `json:"client_secret" form:"client_secret"`
// Input can be username or email
Input string `json:"input" form:"input"`
VerifyCode string `json:"verify_code" form:"verify_code"`
}
func NewLoginParams ¶
func NewLoginParams() *LoginParams
type LoginRequiredAPIFunc ¶
type LoginRequiredRedirectPathAPIFunc ¶ added in v0.43.0
type LoginResult ¶
type LoginResult struct {
Username string `json:"username"`
AccessToken string `json:"access_token"`
TokenType string `json:"token_type"`
RefreshToken string `json:"refresh_token"`
AccessExpireTS types.Time8 `json:"access_expire"`
RefreshExpireTS types.Time8 `json:"refresh_expire"`
}
func NewLoginResult ¶
type PathAPIFunc ¶
type RedirectAPIFunc ¶ added in v0.43.0
type RefreshBrdnameBlackListMapResult ¶ added in v0.42.3
type RefreshBrdnameBlackListMapResult struct {
Total int `json:"total"`
}
type RefreshBrdnameWhiteListMapResult ¶ added in v0.42.3
type RefreshBrdnameWhiteListMapResult struct {
Total int `json:"total"`
}
type RefreshParams ¶
type RefreshResult ¶
type RefreshResult LoginResult
type RegisterClientParams ¶
type RegisterClientParams struct {
ClientID string `json:"client_id"`
ClientType types.ClientType `json:"client_type"`
}
func NewRegisterClientParams ¶
func NewRegisterClientParams() *RegisterClientParams
type RegisterClientResult ¶
type RegisterClientResult struct {
ClientSecret string `json:"client_secret"`
TokenUser bbs.UUserID `json:"tokenuser,omitempty"`
}
func NewRegisterClientResult ¶
func NewRegisterClientResult(client *schema.Client, userID bbs.UUserID) *RegisterClientResult
type RegisterUserParams ¶
type RegisterUserParams struct {
Token string `json:"token" form:"token" url:"token"`
}
func NewRegisterUserParams ¶
func NewRegisterUserParams() *RegisterUserParams
type ReplyCommentsParams ¶
type ReplyCommentsParams struct {
TheList []*apitypes.ReplyCommentParams `json:"list" form:"list" url:"list"`
}
type ReplyCommentsPath ¶
type ReplyCommentsPath struct {
FBoardID apitypes.FBoardID `uri:"bid"`
FArticleID apitypes.FArticleID `uri:"aid"`
}
type ReplyCommentsResult ¶
type SetIDEmailParams ¶
type SetIDEmailPath ¶
type SetIDEmailResult ¶
type UserBoardPermReadable ¶
func CheckUserBoardPermReadable ¶
func CheckUserBoardPermReadable(user *UserInfo, boardID bbs.BBoardID, c *gin.Context) (userBoardPerm *UserBoardPermReadable, err error)
CheckUserBoardPermReadable
https://github.com/ptt/pttbbs/blob/master/mbbsd/board.c#L185
Source Files
¶
- add_favorite_board.go
- add_favorite_folder.go
- add_favorite_line.go
- api.go
- api_login_required.go
- api_login_required_path.go
- api_login_required_redirect_path.go
- api_path.go
- api_redirect.go
- api_result.go
- api_utils.go
- article_utils.go
- attempt_change_email.go
- attempt_login.go
- attempt_register_user.go
- attempt_set_id_email.go
- board_utils.go
- board_utils_load_pttweb_boards.go
- change_email.go
- change_passwd.go
- check_exists_user.go
- client_utils.go
- comment_utils.go
- const.go
- create_article.go
- create_board.go
- create_comment.go
- create_rank.go
- cross_post.go
- delete_articles.go
- delete_comments.go
- delete_favorite.go
- edit_article.go
- errors.go
- get_article_blocks.go
- get_article_blocks_all_guest.go
- get_article_detail.go
- get_article_detail_all_guest.go
- get_board_detail.go
- get_board_detail_all_guest.go
- get_board_summary.go
- get_board_summary_all_guest.go
- get_man_article_blocks.go
- get_man_article_detail.go
- get_user_id.go
- get_user_id_all_guest.go
- get_user_info.go
- get_user_visit_count.go
- get_username.go
- get_version.go
- html.go
- index.go
- jwt.go
- load_article_comments.go
- load_article_comments_all_guest.go
- load_auto_complete_boards.go
- load_bottom_articles.go
- load_bottom_articles_guest.go
- load_class_boards.go
- load_favorite_boards.go
- load_general_articles.go
- load_general_articles_all_guest.go
- load_general_articles_by_keyword.go
- load_general_boards.go
- load_general_boards_by_class.go
- load_man_articles.go
- load_popular_articles.go
- load_popular_boards.go
- load_popular_boards_all_guest.go
- load_user_articles.go
- load_user_comments.go
- login.go
- login_register_utils.go
- logout.go
- man_article_utils.go
- options.go
- refresh.go
- refresh_board_id_white_list_map_all_guest.go
- refresh_brdname_black_list_map_all_guest.go
- register_client.go
- register_user.go
- reply_comments.go
- set_id_email.go
- testinit.go
- types.go
- user_article_perm.go
- user_board_perm.go
- user_favorites_utils.go
- user_perm_info.go
- user_utils.go
- validate_remote_addr.go
- zk.go