Documentation ¶
Index ¶
- func AuthEmailLogin(app *core.App, router fiber.Router)
- func AuthEmailRegister(app *core.App, router fiber.Router)
- func AuthEmailSend(app *core.App, router fiber.Router)
- func AuthMergeApply(app *core.App, router fiber.Router)
- func AuthMergeCheck(app *core.App, router fiber.Router)
- func AuthSocialLogin(app *core.App, router fiber.Router)
- func CacheFlush(app *core.App, router fiber.Router)
- func CacheWarmUp(app *core.App, router fiber.Router)
- func Captcha(app *core.App, router fiber.Router)
- func CaptchaGet(app *core.App, router fiber.Router)
- func CaptchaStatus(app *core.App, router fiber.Router)
- func CaptchaVerify(app *core.App, router fiber.Router)
- func CheckEmailVerifyCode(app *core.App, c *fiber.Ctx, email string, code string) (ok bool, resp error)
- func CommentCreate(app *core.App, router fiber.Router)
- func CommentDelete(app *core.App, router fiber.Router)
- func CommentGet(app *core.App, router fiber.Router)
- func CommentList(app *core.App, router fiber.Router)
- func CommentUpdate(app *core.App, router fiber.Router)
- func Conf(app *core.App, router fiber.Router)
- func ConfDomain(app *core.App, router fiber.Router)
- func EmailSend(app *core.App, router fiber.Router)
- func NotifyList(app *core.App, router fiber.Router)
- func NotifyRead(app *core.App, router fiber.Router)
- func NotifyReadAll(app *core.App, router fiber.Router)
- func PageDelete(app *core.App, router fiber.Router)
- func PageFetch(app *core.App, router fiber.Router)
- func PageFetchAll(app *core.App, router fiber.Router)
- func PageFetchStatus(app *core.App, router fiber.Router)
- func PageList(app *core.App, router fiber.Router)
- func PagePV(app *core.App, router fiber.Router)
- func PageUpdate(app *core.App, router fiber.Router)
- func Paginate(offset int, limit int) func(db *gorm.DB) *gorm.DB
- func SettingApply(app *core.App, router fiber.Router)
- func SettingGet(app *core.App, router fiber.Router)
- func SettingTemplate(app *core.App, router fiber.Router)
- func SiteCreate(app *core.App, router fiber.Router)
- func SiteDelete(app *core.App, router fiber.Router)
- func SiteList(app *core.App, router fiber.Router)
- func SiteUpdate(app *core.App, router fiber.Router)
- func SocialLoginGuard(app *core.App, handler fiber.Handler) fiber.Handler
- func Stat(app *core.App, router fiber.Router)
- func Transfer(app *core.App, router fiber.Router)
- func TransferExport(app *core.App, router fiber.Router)
- func TransferImport(app *core.App, router fiber.Router)
- func TransferUpload(app *core.App, router fiber.Router)
- func Upload(app *core.App, router fiber.Router)
- func UserCreate(app *core.App, router fiber.Router)
- func UserDelete(app *core.App, router fiber.Router)
- func UserInfo(app *core.App, router fiber.Router)
- func UserInfoUpdate(app *core.App, router fiber.Router)
- func UserList(app *core.App, router fiber.Router)
- func UserLogin(app *core.App, router fiber.Router)
- func UserStatus(app *core.App, router fiber.Router)
- func UserUpdate(app *core.App, router fiber.Router)
- func Version(app *core.App, router fiber.Router)
- func Vote(app *core.App, router fiber.Router)
- func VoteSync(app *core.App, router fiber.Router)
- type Map
- type ParamsCaptchaVerify
- type ParamsCommentCreate
- type ParamsCommentList
- type ParamsCommentUpdate
- type ParamsEmailSend
- type ParamsNotifyList
- type ParamsNotifyReadAll
- type ParamsPageFetchAll
- type ParamsPageList
- type ParamsPagePV
- type ParamsPageUpdate
- type ParamsSettingApply
- type ParamsSiteCreate
- type ParamsSiteUpdate
- type ParamsStat
- type ParamsTransferImport
- type ParamsUpload
- type ParamsUserCreate
- type ParamsUserInfo
- type ParamsUserList
- type ParamsUserLogin
- type ParamsUserStatus
- type ParamsUserUpdate
- type ParamsVote
- type RequestAuthDataMergeApply
- type RequestAuthEmailLogin
- type RequestAuthEmailRegister
- type RequestAuthEmailSend
- type RequestUserInfoUpdate
- type ResponseAdminUserList
- type ResponseAuthDataMergeApply
- type ResponseAuthDataMergeCheck
- type ResponseCaptchaGet
- type ResponseCaptchaStatus
- type ResponseCommentCreate
- type ResponseCommentGet
- type ResponseCommentList
- type ResponseCommentUpdate
- type ResponseConfAuthProviders
- type ResponseConfDomain
- type ResponseNotifyList
- type ResponsePageFetch
- type ResponsePageFetchStatus
- type ResponsePageList
- type ResponsePagePV
- type ResponsePageUpdate
- type ResponseSettingGet
- type ResponseSettingTemplate
- type ResponseSiteCreate
- type ResponseSiteList
- type ResponseSiteUpdate
- type ResponseStat
- type ResponseTransferExport
- type ResponseTransferUpload
- type ResponseUpload
- type ResponseUserCreate
- type ResponseUserInfo
- type ResponseUserInfoUpdate
- type ResponseUserLogin
- type ResponseUserStatus
- type ResponseUserUpdate
- type ResponseVote
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthEmailLogin ¶
@Id LoginByEmail @Summary Login by email @Description Login by email with verify code (Need send email verify code first) or password @Tags Auth @Param data body RequestAuthEmailLogin true "The data to login" @Success 200 {object} ResponseUserLogin @Failure 400 {object} Map{msg=string} @Failure 500 {object} Map{msg=string} @Accept json @Produce json @Router /auth/email/login [post]
func AuthEmailRegister ¶
@Id RegisterByEmail @Summary Register by email @Description Register by email and verify code (if user exists, will update user, like forget or change password. Need send email verify code first) @Tags Auth @Param data body RequestAuthEmailRegister true "The data to register" @Success 200 {object} ResponseUserLogin @Failure 400 {object} Map{msg=string} @Failure 500 {object} Map{msg=string} @Accept json @Produce json @Router /auth/email/register [post]
func AuthEmailSend ¶
@Id SendVerifyEmail @Summary Send verify email @Description Send email including verify code to user @Tags Auth @Param data body RequestAuthEmailSend true "The data" @Success 200 {object} Map{msg=string} @Failure 400 {object} Map{msg=string} @Failure 500 {object} Map{msg=string} @Accept json @Produce json @Router /auth/email/send [post]
func AuthMergeApply ¶
@Id ApplyDataMerge @Summary Apply data merge @Description This function is to solve the problem of multiple users with the same email address, should be called after user login and then check, and perform data merge. @Tags Auth @Security ApiKeyAuth @Param data body RequestAuthDataMergeApply true "The data" @Success 200 {object} ResponseAuthDataMergeApply @Failure 400 {object} Map{msg=string} @Failure 500 {object} Map{msg=string} @Accept json @Produce json @Router /auth/merge [post]
func AuthMergeCheck ¶
@Id CheckDataMerge @Summary Check data merge @Description Get all users with same email, if there are more than one user with same email, need merge @Tags Auth @Security ApiKeyAuth @Success 200 {object} ResponseAuthDataMergeCheck @Failure 400 {object} Map{msg=string} @Failure 500 {object} Map{msg=string} @Produce json @Router /auth/merge [get]
func AuthSocialLogin ¶
@Id GetSocialLoginProviders @Summary Get Social Login Providers @Description Get social login providers @Tags System @Produce json @Success 200 {object} ResponseConfAuthProviders @Success 404 {object} Map{msg=string} @Router /conf/auth/providers [get]
func CacheFlush ¶
@Id FlushCache @Summary Flush Cache @Description Flush all cache on the server @Tags Cache @Security ApiKeyAuth @Success 200 {object} Map{msg=string} @Failure 403 {object} Map{msg=string} @Failure 400 {object} Map{msg=string} @Produce json @Router /cache/flush [post]
func CacheWarmUp ¶
@Id WarmUpCache @Summary Warm-Up Cache @Description Cache warming helps you to pre-load the cache to improve the performance of the first request @Tags Cache @Security ApiKeyAuth @Produce json @Success 200 {object} Map{msg=string} @Failure 403 {object} Map{msg=string} @Failure 400 {object} Map{msg=string} @Router /cache/warm_up [post]
func CaptchaGet ¶
@Id GetCaptcha @Summary Get Captcha @Description Get a base64 encoded captcha image or a HTML page to verify for user @Tags Captcha @Produce json @Success 200 {object} ResponseCaptchaGet @Failure 500 {object} Map{msg=string} @Router /captcha [get]
func CaptchaStatus ¶
@Id GetCaptchaStatus @Summary Get Captcha Status @Description Get the status of the user's captcha verification @Tags Captcha @Produce json @Success 200 {object} ResponseCaptchaStatus @Router /captcha/status [get]
func CaptchaVerify ¶
@Id VerifyCaptcha @Summary Verify Captcha @Description Verify user enters correct captcha code @Tags Captcha @Param data body ParamsCaptchaVerify true "The data to check" @Produce json @Success 200 {object} Map{} @Failure 403 {object} Map{img_data=string} @Router /captcha/verify [post]
func CheckEmailVerifyCode ¶
func CommentCreate ¶
@Id CreateComment @Summary Create Comment @Description Create a new comment @Tags Comment @Param comment body ParamsCommentCreate true "The comment data" @Security ApiKeyAuth @Success 200 {object} ResponseCommentCreate @Failure 400 {object} Map{msg=string} @Failure 500 {object} Map{msg=string} @Accept json @Produce json @Router /comments [post]
func CommentDelete ¶
@Id DeleteComment @Summary Delete Comment @Description Delete a specific comment @Tags Comment @Param id path int true "The comment ID you want to delete" @Security ApiKeyAuth @Produce json @Success 200 {object} Map{} @Failure 403 {object} Map{msg=string} @Failure 404 {object} Map{msg=string} @Failure 500 {object} Map{msg=string} @Router /comments/{id} [delete]
func CommentGet ¶
@Id GetComment @Summary Get a comment @Description Get the detail of a comment by comment id @Tags Comment @Param id path int true "The comment ID you want to get" @Accept json @Produce json @Success 200 {object} ResponseCommentGet @Failure 404 {object} Map{msg=string} @Failure 500 {object} Map{msg=string} @Router /comments/{id} [get]
func CommentList ¶
@Id GetComments @Summary Get Comment List @Description Get a list of comments by some conditions @Tags Comment @Security ApiKeyAuth @Param options query ParamsCommentList true "The options" @Accept json @Produce json @Success 200 {object} ResponseCommentList @Failure 500 {object} Map{msg=string} @Router /comments [get]
func CommentUpdate ¶
@Id UpdateComment @Summary Update Comment @Description Update a specific comment @Tags Comment @Param id path int true "The comment ID you want to update" @Param comment body ParamsCommentUpdate true "The comment data" @Security ApiKeyAuth @Accept json @Produce json @Success 200 {object} ResponseCommentUpdate @Failure 400 {object} Map{msg=string} @Failure 403 {object} Map{msg=string} @Failure 404 {object} Map{msg=string} @Failure 500 {object} Map{msg=string} @Router /comments/{id} [put]
func Conf ¶
@Id Conf @Summary Get System Configs @Description Get System Configs for UI @Tags System @Produce json @Success 200 {object} common.ConfData @Router /conf [get]
func ConfDomain ¶
@Id GetDomain @Summary Get Domain Info @Description Get Domain Info @Tags System @Produce json @Param url query string false "Domain URL" @Success 200 {object} ResponseConfDomain @Router /conf/domain [get]
func EmailSend ¶
@Id SendEmail @Summary Send Email @Description Send an email to test the email sender @Tags System @Security ApiKeyAuth @Param email body ParamsEmailSend true "The email data" @Accept json @Produce json @Success 200 {object} Map{} @Failure 403 {object} Map{msg=string} @Failure 500 {object} Map{} @Router /send_email [post]
func NotifyList ¶
@Id GetNotifies @Summary Get Notifies @Description Get a list of notifies for user @Tags Notify @Param name query string true "The user name" @Param email query string true "The user email" @Accept json @Produce json @Success 200 {object} ResponseNotifyList @Failure 400 {object} Map{msg=string} @Failure 500 {object} Map{msg=string} @Router /notifies [get]
func NotifyRead ¶
@Id MarkNotifyRead @Summary Mark Notify as Read @Description Mark specific notification as read for user @Tags Notify @Param comment_id path int true "The comment id of the notify you want to mark as read" @Param notify_key path string true "The key of the notify" @Produce json @Success 200 {object} Map{} @Failure 400 {object} Map{msg=string} @Failure 404 {object} Map{msg=string} @Failure 500 {object} Map{msg=string} @Router /notifies/{comment_id}/{notify_key} [post]
func NotifyReadAll ¶
@Id MarkAllNotifyRead @Summary Mark All Notifies as Read @Description Mark all notifies as read for user @Tags Notify @Param options body ParamsNotifyReadAll true "The options" @Accept json @Produce json @Success 200 {object} Map{} @Failure 400 {object} Map{msg=string} @Failure 500 {object} Map{msg=string} @Router /notifies/read [post]
func PageDelete ¶
@Id DeletePage @Summary Delete Page @Description Delete a specific page @Tags Page @Param id path int true "The page ID you want to delete" @Security ApiKeyAuth @Produce json @Success 200 {object} Map{} @Failure 403 {object} Map{msg=string} @Failure 404 {object} Map{msg=string} @Failure 500 {object} Map{msg=string} @Router /pages/{id} [delete]
func PageFetch ¶
@Id FetchPage @Summary Fetch Page Data @Description Fetch the data of a specific page @Tags Page @Security ApiKeyAuth @Param id path int true "The page ID you want to fetch" @Accept json @Produce json @Success 200 {object} ResponsePageFetch @Failure 404 {object} Map{msg=string} @Failure 500 {object} Map{msg=string} @Router /pages/{id}/fetch [post]
func PageFetchAll ¶
@Id FetchAllPages @Summary Fetch All Pages Data @Description Fetch the data of all pages @Tags Page @Security ApiKeyAuth @Param options body ParamsPageFetchAll true "The options" @Accept json @Produce json @Success 200 {object} Map{} @Failure 400 {object} Map{msg=string} @Failure 500 {object} Map{msg=string} @Router /pages/fetch [post]
func PageFetchStatus ¶
@Id GetPageFetchStatus @Summary Get Pages Fetch Status @Description Get the status of the task of fetching all pages @Tags Page @Security ApiKeyAuth @Produce json @Success 200 {object} ResponsePageFetchStatus @Router /pages/fetch/status [get]
func PageList ¶
@Id GetPages @Summary Get Page List @Description Get a list of pages by some conditions @Tags Page @Security ApiKeyAuth @Param options query ParamsPageList true "The options" @Accept json @Produce json @Success 200 {object} ResponsePageList @Failure 403 {object} Map{msg=string} @Router /pages [get]
func PagePV ¶
@Id LogPv @Summary Increase Page Views (PV) @Description Increase and get the number of page views @Tags Page @Param page body ParamsPagePV true "The page to record pv" @Accept json @Produce json @Success 200 {object} ResponsePagePV @Router /pages/pv [post]
func PageUpdate ¶
@Id UpdatePage @Summary Update Page @Description Update a specific page @Tags Page @Security ApiKeyAuth @Param id path int true "The page ID you want to update" @Param page body ParamsPageUpdate true "The page data" @Accept json @Produce json @Success 200 {object} ResponsePageUpdate @Failure 400 {object} Map{msg=string} @Failure 403 {object} Map{msg=string} @Failure 404 {object} Map{msg=string} @Failure 500 {object} Map{msg=string} @Router /pages/{id} [put]
func SettingApply ¶
@Id ApplySettings @Summary Save and apply Settings @Description Apply settings and restart the server @Tags System @Security ApiKeyAuth @Param settings body ParamsSettingApply true "The settings" @Accept json @Produce json @Success 200 {object} Map{} @Failure 403 {object} Map{msg=string} @Failure 500 {object} Map{msg=string} @Router /settings [put]
func SettingGet ¶
@Id GetSettings @Summary Get Settings @Description Get settings from app config file @Tags System @Security ApiKeyAuth @Produce json @Success 200 {object} ResponseSettingGet @Failure 403 {object} Map{msg=string} @Failure 500 {object} Map{msg=string} @Router /settings [get]
func SettingTemplate ¶
@Id GetSettingsTemplate @Summary Get Settings Template @Description Get config templates in different languages for rendering the settings page in the frontend @Tags System @Security ApiKeyAuth @Param locale path string true "The locale of the settings template you want to get" @Produce json @Success 200 {object} ResponseSettingTemplate @Router /settings/template/{locale} [get]
func SiteCreate ¶
@Id CreateSite @Summary Create Site @Description Create a new site @Tags Site @Security ApiKeyAuth @Param site body ParamsSiteCreate true "The site data" @Accept json @Produce json @Success 200 {object} ResponseSiteCreate @Failure 400 {object} Map{msg=string} @Failure 403 {object} Map{msg=string} @Failure 500 {object} Map{msg=string} @Router /sites [post]
func SiteDelete ¶
@Id deleteSite @Summary Site Delete @Description Delete a specific site @Tags Site @Security ApiKeyAuth @Param id path int true "The site ID you want to delete" @Produce json @Success 200 {object} Map{} @Failure 403 {object} Map{msg=string} @Failure 404 {object} Map{msg=string} @Failure 500 {object} Map{msg=string} @Router /sites/{id} [delete]
func SiteList ¶
@Id GetSites @Summary Get Site List @Description Get a list of sites by some conditions @Tags Site @Security ApiKeyAuth @Produce json @Success 200 {object} ResponseSiteList @Router /sites [get]
func SiteUpdate ¶
@Id UpdateSite @Summary Update Site @Description Update a specific site @Tags Site @Security ApiKeyAuth @Param id path int true "The site ID you want to update" @Param site body ParamsSiteUpdate true "The site data" @Accept json @Produce json @Success 200 {object} ResponseSiteUpdate @Router /sites/{id} [put]
func SocialLoginGuard ¶
func Stat ¶
@Id GetStats @Summary Statistic @Description Get the statistics of various data analysis @Tags Statistic @Param type path string true "The type of statistics" Enums(latest_comments, latest_pages, pv_most_pages, comment_most_pages, page_pv, site_pv, page_comment, site_comment, rand_comments, rand_pages) @Param options query ParamsStat false "The options" @Accept json @Produce json @Success 200 {object} common.JSONResult @Failure 400 {object} Map{msg=string} @Failure 403 {object} Map{msg=string} @Failure 404 {object} Map{msg=string} @Failure 500 {object} Map{msg=string} @Router /stats/{type} [get]
func TransferExport ¶
@Id ExportArtrans @Summary Export Artrans @Description Export data from Artalk @Tags Transfer @Security ApiKeyAuth @Produce json @Success 200 {object} ResponseTransferExport @Failure 500 {object} Map{msg=string} @Router /transfer/export [get]
func TransferImport ¶
@Id ImportArtrans @Summary Import Artrans @Description Import data to Artalk @Tags Transfer @Security ApiKeyAuth @Param data body ParamsTransferImport true "The data to import" @Accept json @Produce html @Success 200 {string} string @Router /transfer/import [post]
func TransferUpload ¶
@Id UploadArtrans @Summary Upload Artrans @Description Upload a file to prepare to import @Tags Transfer @Security ApiKeyAuth @Param file formData file true "Upload file in preparation for import task" @Accept mpfd @Produce json @Success 200 {object} ResponseTransferUpload{filename=string} @Failure 500 {object} Map{msg=string} @Router /transfer/upload [post]
func Upload ¶
@Id Upload @Summary Upload @Description Upload file from this endpoint @Tags Upload @Param file formData file true "Upload file" @Security ApiKeyAuth @Accept mpfd @Produce json @Success 200 {object} ResponseUpload @Failure 400 {object} Map{msg=string} @Failure 403 {object} Map{msg=string} @Failure 500 {object} Map{msg=string} @Router /upload [post]
func UserCreate ¶
@Id CreateUser @Summary Create User @Description Create a new user @Tags User @Param user body ParamsUserCreate true "The user data" @Security ApiKeyAuth @Accept json @Produce json @Success 200 {object} ResponseUserCreate @Failure 400 {object} Map{msg=string} @Failure 403 {object} Map{msg=string} @Failure 500 {object} Map{msg=string} @Router /users [post]
func UserDelete ¶
@Id DeleteUser @Summary Delete User @Description Delete a specific user @Tags User @Param id path int true "The user ID you want to delete" @Security ApiKeyAuth @Produce json @Success 200 {object} Map{} @Failure 403 {object} Map{msg=string} @Failure 404 {object} Map{msg=string} @Failure 500 {object} Map{msg=string} @Router /users/{id} [delete]
func UserInfo ¶
@Id GetUser @Summary Get User Info @Description Get user info to prepare for login or check current user status @Tags Auth @Security ApiKeyAuth @Param user query ParamsUserInfo true "The user to query" @Produce json @Success 200 {object} ResponseUserInfo @Failure 400 {object} Map{msg=string} @Router /user [get]
func UserInfoUpdate ¶
@Id UpdateProfile @Summary Update user profile @Description Update user profile when user is logged in @Tags Auth @Security ApiKeyAuth @Param data body RequestUserInfoUpdate true "The profile data to update" @Success 200 {object} ResponseUserInfoUpdate @Failure 400 {object} Map{msg=string} @Failure 500 {object} Map{msg=string} @Accept json @Produce json @Router /user [post]
func UserList ¶
@Id GetUsers @Summary Get User List @Description Get a list of users by some conditions @Tags User @Param type path string false "The type of users" Enums(all, admin, in_conf) @Param options query ParamsUserList true "The options" @Security ApiKeyAuth @Accept json @Produce json @Success 200 {object} ResponseAdminUserList @Failure 403 {object} Map{msg=string} @Router /users/{type} [get]
func UserLogin ¶
@Id Login @Summary Get Access Token @Description Login user by name or email @Tags Auth @Param user body ParamsUserLogin true "The user login data" @Accept json @Produce json @Success 200 {object} ResponseUserLogin @Failure 400 {object} Map{msg=string,data=object{need_name_select=[]string}} "Multiple users with the same email address are matched" @Failure 401 {object} Map{msg=string} @Failure 500 {object} Map{msg=string} @Router /user/access_token [post]
func UserStatus ¶
@Id GetUserStatus @Summary Get Login Status @Description Get user login status by header Authorization @Tags Auth @Security ApiKeyAuth @Param user query ParamsUserStatus true "The user to query" @Produce json @Success 200 {object} ResponseUserStatus @Router /user/status [get]
func UserUpdate ¶
@Id UpdateUser @Summary Update User @Description Update a specific user @Tags User @Param id path int true "The user ID you want to update" @Param user body ParamsUserUpdate true "The user data" @Security ApiKeyAuth @Accept json @Produce json @Success 200 {object} ResponseUserUpdate @Failure 400 {object} Map{msg=string} @Failure 403 {object} Map{msg=string} @Failure 404 {object} Map{msg=string} @Failure 500 {object} Map{msg=string} @Router /users/{id} [put]
func Version ¶
@Id GetVersion @Summary Get Version Info @Description Get the version of Artalk @Tags System @Produce json @Success 200 {object} common.ApiVersionData @Router /version [get]
func Vote ¶
@Id Vote @Summary Vote @Description Vote for a specific comment or page @Tags Vote @Param type path string true "The type of vote target" Enums(comment_up, comment_down, page_up, page_down) @Param target_id path int true "Target comment or page ID you want to vote for" @Param vote body ParamsVote true "The vote data" @Accept json @Produce json @Success 200 {object} ResponseVote @Failure 403 {object} Map{msg=string} @Failure 404 {object} Map{msg=string} @Failure 500 {object} Map{msg=string} @Router /votes/{type}/{target_id} [post]
func VoteSync ¶
@Id SyncVotes @Summary Sync Vote Data @Description Sync the number of votes in the `comments` or `pages` data tables to keep them the same as the `votes` table @Tags Vote @Security ApiKeyAuth @Produce json @Success 200 {object} Map{} @Failure 403 {object} Map{msg=string} @Router /votes/sync [post]
Types ¶
type ParamsCaptchaVerify ¶
type ParamsCaptchaVerify struct {
Value string `form:"value" json:"value" validate:"required"` // The captcha value to check
}
type ParamsCommentCreate ¶
type ParamsCommentCreate struct { Name string `json:"name" validate:"required"` // The comment name Email string `json:"email" validate:"required"` // The comment email Link string `json:"link" validate:"optional"` // The comment link Content string `json:"content" validate:"required"` // The comment content Rid uint `json:"rid" validate:"optional"` // The comment rid UA string `json:"ua" validate:"optional"` // The comment ua PageKey string `json:"page_key" validate:"required"` // The comment page_key PageTitle string `json:"page_title" validate:"optional"` // The comment page_title SiteName string `json:"site_name" validate:"required"` // The site name of your content scope }
type ParamsCommentList ¶
type ParamsCommentList struct { PageKey string `query:"page_key" json:"page_key" validate:"required"` // The comment page_key SiteName string `query:"site_name" json:"site_name" validate:"optional"` // The site name of your content scope Limit int `query:"limit" json:"limit" validate:"optional"` // The limit for pagination Offset int `query:"offset" json:"offset" validate:"optional"` // The offset for pagination FlatMode bool `query:"flat_mode" json:"flat_mode" validate:"optional"` // Enable flat_mode SortBy string `query:"sort_by" json:"sort_by" enums:"date_asc,date_desc,vote" validate:"optional"` // Sort by condition ViewOnlyAdmin bool `query:"view_only_admin" json:"view_only_admin" validate:"optional"` // Only show comments by admin Search string `query:"search" json:"search" validate:"optional"` // Search keywords Type string `query:"type" json:"type" enums:"all,mentions,mine,pending" validate:"optional"` // Message center show type Scope string `query:"scope" json:"scope" enums:"page,user,site" validate:"optional"` // The scope of comments Name string `query:"name" json:"name" validate:"optional"` // The username Email string `query:"email" json:"email" validate:"optional"` // The user email }
type ParamsCommentUpdate ¶
type ParamsCommentUpdate struct { SiteName string `json:"site_name" validate:"required"` // The site name of your content scope Content string `json:"content" validate:"required"` // The comment content PageKey string `json:"page_key" validate:"required"` // The comment page_key Nick string `json:"nick" validate:"optional"` // The comment nick Email string `json:"email" validate:"optional"` // The comment email Link string `json:"link" validate:"optional"` // The comment link Rid uint `json:"rid" validate:"required"` // The comment rid UA string `json:"ua" validate:"optional"` // The comment ua IP string `json:"ip" validate:"optional"` // The comment ip IsCollapsed bool `json:"is_collapsed" validate:"required"` // The comment is_collapsed IsPending bool `json:"is_pending" validate:"required"` // The comment is_pending IsPinned bool `json:"is_pinned" validate:"required"` // The comment is_pinned }
type ParamsEmailSend ¶
type ParamsNotifyList ¶
type ParamsNotifyReadAll ¶
type ParamsNotifyReadAll struct { Name string `json:"name" validate:"required"` // The username Email string `json:"email" validate:"required"` // The user email }
Mark all notifies as read
type ParamsPageFetchAll ¶
type ParamsPageFetchAll struct {
SiteName string `json:"site_name" validate:"optional"` // If not empty, only fetch pages of this site
}
type ParamsPageList ¶
type ParamsPageList struct { SiteName string `query:"site_name" json:"site_name" validate:"optional"` // The site name of your content scope Limit int `query:"limit" json:"limit" validate:"optional"` // The limit for pagination Offset int `query:"offset" json:"offset" validate:"optional"` // The offset for pagination Search string `query:"search" json:"search" validate:"optional"` // Search keywords }
type ParamsPagePV ¶
type ParamsPageUpdate ¶
type ParamsPageUpdate struct { SiteName string `json:"site_name" validate:"required"` // The site name of your content scope Key string `json:"key" validate:"required"` // Updated page key Title string `json:"title" validate:"required"` // Updated page title AdminOnly bool `json:"admin_only" validate:"required"` // Updated page admin_only option }
type ParamsSettingApply ¶
type ParamsSettingApply struct {
Yaml string `json:"yaml" validate:"required"` // The content of the config file in YAML format
}
type ParamsSiteCreate ¶
type ParamsSiteUpdate ¶
type ParamsStat ¶
type ParamsStat struct { SiteName string `query:"site_name" json:"site_name" validate:"optional"` // The site name of your content scope PageKeys string `query:"page_keys" json:"page_keys" validate:"optional"` // multiple page keys separated by commas Limit int `query:"limit" json:"limit" validate:"optional"` // The limit for pagination }
type ParamsTransferImport ¶
type ParamsTransferImport struct {
artransfer.ImportParams
}
type ParamsUpload ¶
type ParamsUpload struct { }
type ParamsUserCreate ¶
type ParamsUserCreate struct { Name string `json:"name" validate:"required"` // The user name Email string `json:"email" validate:"required"` // The user email Password string `json:"password" validate:"optional"` // The user password Link string `json:"link" validate:"optional"` // The user link IsAdmin bool `json:"is_admin" validate:"required"` // The user is an admin ReceiveEmail bool `json:"receive_email" validate:"required"` // The user receive email BadgeName string `json:"badge_name" validate:"optional"` // The user badge name BadgeColor string `json:"badge_color" validate:"optional"` // The user badge color (hex format) }
type ParamsUserInfo ¶
type ParamsUserList ¶
type ParamsUserLogin ¶
type ParamsUserStatus ¶
type ParamsUserUpdate ¶
type ParamsUserUpdate struct { Name string `json:"name" validate:"required"` // The user name Email string `json:"email" validate:"required"` // The user email Password string `json:"password" validate:"optional"` // The user password Link string `json:"link" validate:"optional"` // The user link IsAdmin bool `json:"is_admin" validate:"required"` // The user is an admin ReceiveEmail bool `json:"receive_email" validate:"required"` // The user receive email BadgeName string `json:"badge_name" validate:"optional"` // The user badge name BadgeColor string `json:"badge_color" validate:"optional"` // The user badge color (hex format) }
type ParamsVote ¶
type RequestAuthDataMergeApply ¶
type RequestAuthDataMergeApply struct {
UserName string `json:"user_name" validate:"required"`
}
type RequestAuthEmailLogin ¶
type RequestAuthEmailSend ¶
type RequestAuthEmailSend struct {
Email string `json:"email" validate:"required"`
}
type RequestUserInfoUpdate ¶
type ResponseAdminUserList ¶
type ResponseAdminUserList struct { Total int64 `json:"count"` Users []entity.CookedUserForAdmin `json:"users"` }
type ResponseAuthDataMergeApply ¶
type ResponseAuthDataMergeApply struct { UpdatedComment int64 `json:"update_comments_count"` UpdatedNotify int64 `json:"update_notifies_count"` UpdatedVote int64 `json:"update_votes_count"` DeletedUser int64 `json:"deleted_user_count"` UserToken string `json:"user_token"` // Empty if login user is target user no need to re-login }
type ResponseCaptchaGet ¶
type ResponseCaptchaGet struct {
ImgData string `json:"img_data"`
}
type ResponseCaptchaStatus ¶
type ResponseCaptchaStatus struct {
IsPass bool `json:"is_pass"`
}
type ResponseCommentCreate ¶
type ResponseCommentCreate struct {
entity.CookedComment
}
type ResponseCommentGet ¶
type ResponseCommentGet struct { Comment entity.CookedComment `json:"comment"` // The comment detail ReplyComment *entity.CookedComment `json:"reply_comment"` // The reply comment if exists (like reply) }
type ResponseCommentList ¶
type ResponseCommentList struct { Comments []entity.CookedComment `json:"comments"` Count int64 `json:"count"` RootsCount int64 `json:"roots_count"` Page *entity.CookedPage `json:"page,omitempty"` }
type ResponseCommentUpdate ¶
type ResponseCommentUpdate struct {
entity.CookedComment
}
type ResponseConfAuthProviders ¶
type ResponseConfAuthProviders struct { Providers []auth.AuthProviderInfo `json:"providers" validator:"required"` Anonymous bool `json:"anonymous" validator:"required"` }
type ResponseConfDomain ¶
type ResponseNotifyList ¶
type ResponseNotifyList struct { Notifies []entity.CookedNotify `json:"notifies"` Count int `json:"count"` }
type ResponsePageFetch ¶
type ResponsePageFetch struct {
entity.CookedPage
}
type ResponsePageFetchStatus ¶
type ResponsePageList ¶
type ResponsePageList struct { Total int64 `json:"count"` Pages []entity.CookedPage `json:"pages"` }
type ResponsePagePV ¶
type ResponsePagePV struct {
PV int `json:"pv"`
}
type ResponsePageUpdate ¶
type ResponsePageUpdate struct {
entity.CookedPage
}
type ResponseSettingGet ¶
type ResponseSettingTemplate ¶
type ResponseSettingTemplate struct {
Yaml string `json:"yaml"`
}
type ResponseSiteCreate ¶
type ResponseSiteCreate struct {
entity.CookedSite
}
type ResponseSiteList ¶
type ResponseSiteList struct { Sites []entity.CookedSite `json:"sites"` Count int `json:"count"` }
type ResponseSiteUpdate ¶
type ResponseSiteUpdate struct {
entity.CookedSite
}
type ResponseStat ¶
type ResponseStat struct {
Data interface{} `json:"data"`
}
type ResponseTransferExport ¶
type ResponseTransferExport struct { // The exported data which is a JSON string Artrans string `json:"artrans"` }
type ResponseTransferUpload ¶
type ResponseTransferUpload struct { // The uploaded file name which can be used to import Filename string `json:"filename"` }
type ResponseUpload ¶
type ResponseUserCreate ¶
type ResponseUserCreate struct {
entity.CookedUserForAdmin
}
type ResponseUserInfo ¶
type ResponseUserInfo struct { User *entity.CookedUser `json:"user"` IsLogin bool `json:"is_login"` Notifies []entity.CookedNotify `json:"notifies"` NotifiesCount int `json:"notifies_count"` }
type ResponseUserInfoUpdate ¶
type ResponseUserInfoUpdate struct {
User entity.CookedUser `json:"user"`
}
type ResponseUserLogin ¶
type ResponseUserLogin struct { Token string `json:"token"` User entity.CookedUser `json:"user"` }
type ResponseUserStatus ¶
type ResponseUserUpdate ¶
type ResponseUserUpdate struct {
entity.CookedUserForAdmin
}
type ResponseVote ¶
Source Files ¶
- auth_email_login.go
- auth_email_register.go
- auth_email_send.go
- auth_merge_apply.go
- auth_merge_check.go
- auth_social_login.go
- cache_flush.go
- cache_warm_up.go
- captcha.go
- captcha_get.go
- captcha_status.go
- captcha_verify.go
- comment_create.go
- comment_delete.go
- comment_get.go
- comment_list.go
- comment_update.go
- conf.go
- conf_domain.go
- email_send.go
- notify_list.go
- notify_read.go
- notify_read_all.go
- page_delete.go
- page_fetch.go
- page_fetch_all.go
- page_fetch_status.go
- page_list.go
- page_pv.go
- page_update.go
- setting_apply.go
- setting_get.go
- setting_template.go
- site_create.go
- site_delete.go
- site_list.go
- site_update.go
- stat.go
- transfer.go
- transfer_export.go
- transfer_import.go
- transfer_upload.go
- upload.go
- user_create.go
- user_delete.go
- user_info.go
- user_info_update.go
- user_list.go
- user_login.go
- user_status.go
- user_update.go
- utils.go
- version.go
- vote.go
- vote_sync.go
Directories ¶
Path | Synopsis |
---|---|
This package's main job is to build the `where` conditions of SQL.
|
This package's main job is to build the `where` conditions of SQL. |