Documentation
¶
Index ¶
- func ArticleDetail(c *gin.Context)
- func ArticleRepliesWindow(req component.BetterRequest[ArticleRepliesWindowReq]) component.Response
- func Category(c *gin.Context)
- func Home(c *gin.Context)
- func Links(c *gin.Context)
- func Login(c *gin.Context)
- func Messages(c *gin.Context)
- func Notifications(c *gin.Context)
- func Publish(c *gin.Context)
- func ReloadTemplates()
- func ResetPassword(c *gin.Context)
- func Search(c *gin.Context)
- func Settings(c *gin.Context)
- func Sponsors(c *gin.Context)
- func UserProfile(c *gin.Context)
- type AnnouncementPayload
- type ArticleDetailProps
- type ArticlePayload
- type ArticlePermissions
- type ArticleRepliesWindowReq
- type CategoryHeaderPayload
- type CategoryNavPayload
- type CategoryPageProps
- type ErrorPageProps
- type FooterPayload
- type FriendLinkPayload
- type HomeProps
- type LayoutPayload
- type LinkGroupPayload
- type LinksPageProps
- type LoginPageProps
- type MessageConversationPayload
- type MessagesPageProps
- type NavItemPayload
- type NotificationArticlePayload
- type NotificationPayload
- type NotificationsPageProps
- type OpenGraphMeta
- type PageMeta
- type PagePayload
- type PaginationPayload
- type PublishArticlePayload
- type PublishCategoryPayload
- type PublishPageProps
- type PublishTypePayload
- type ReplyPayload
- type ReplyWindowPayload
- type ResetPasswordPageProps
- type SearchPageProps
- type SettingsPageProps
- type SettingsStatsPayload
- type SidebarPayload
- type SitePayload
- type SponsorPayload
- type SponsorSectionPayload
- type SponsorsContactPayload
- type SponsorsPageIntroPayload
- type SponsorsPageProps
- type SponsorsRulePayload
- type TabPayload
- type TopicAuthorPayload
- type TopicCategoryPayload
- type TopicPayload
- type TwitterMeta
- type UnreadStatusPayload
- type UserActivityPayload
- type UserConnectionPayload
- type UserProfileProps
- type ViewerPayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArticleDetail ¶
func ArticleRepliesWindow ¶ added in v0.2.2
func ArticleRepliesWindow(req component.BetterRequest[ArticleRepliesWindowReq]) component.Response
func Notifications ¶
func ReloadTemplates ¶
func ReloadTemplates()
func ResetPassword ¶
func UserProfile ¶
Types ¶
type AnnouncementPayload ¶
type ArticleDetailProps ¶
type ArticleDetailProps struct {
Article ArticlePayload `json:"article"`
Replies []ReplyPayload `json:"replies"`
HotTopics []TopicPayload `json:"hotTopics"`
Permissions ArticlePermissions `json:"permissions"`
}
type ArticlePayload ¶
type ArticlePayload struct {
ID uint64 `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
URL string `json:"url"`
HTML string `json:"html"`
Author TopicAuthorPayload `json:"author"`
Participants []TopicAuthorPayload `json:"participants"`
Categories []TopicCategoryPayload `json:"categories"`
ReplyCount uint64 `json:"replyCount"`
ViewCount uint64 `json:"viewCount"`
LikeCount uint64 `json:"likeCount"`
IsLiked bool `json:"isLiked"`
IsBookmarked bool `json:"isBookmarked"`
CreatedAt string `json:"createdAt"`
UpdatedAt string `json:"updatedAt"`
}
type ArticlePermissions ¶
type ArticleRepliesWindowReq ¶ added in v0.2.2
type CategoryHeaderPayload ¶
type CategoryNavPayload ¶
type CategoryNavPayload struct {
}
type CategoryPageProps ¶
type CategoryPageProps struct {
Category CategoryHeaderPayload `json:"category"`
Sort string `json:"sort"`
Tabs []TabPayload `json:"tabs"`
Topics []TopicPayload `json:"topics"`
Pagination PaginationPayload `json:"pagination"`
}
type ErrorPageProps ¶
type FooterPayload ¶
type FooterPayload struct {
}
type FriendLinkPayload ¶
type HomeProps ¶
type HomeProps struct {
Sort string `json:"sort"`
Tabs []TabPayload `json:"tabs"`
Topics []TopicPayload `json:"topics"`
Pagination PaginationPayload `json:"pagination"`
Announcement AnnouncementPayload `json:"announcement"`
}
type LayoutPayload ¶
type LayoutPayload struct {
Site SitePayload `json:"site"`
Viewer ViewerPayload `json:"viewer"`
Sidebar SidebarPayload `json:"sidebar"`
Unread UnreadStatusPayload `json:"unread"`
}
type LinkGroupPayload ¶
type LinkGroupPayload struct {
Name string `json:"name"`
Emoji string `json:"emoji"`
Color string `json:"color"`
Links []FriendLinkPayload `json:"links"`
}
type LinksPageProps ¶
type LinksPageProps struct {
Groups []LinkGroupPayload `json:"groups"`
TotalCount int `json:"totalCount"`
}
type LoginPageProps ¶
type MessageConversationPayload ¶
type MessageConversationPayload struct {
ID uint64 `json:"id"`
PeerID uint64 `json:"peerId"`
PeerUsername string `json:"peerUsername"`
PeerAvatar string `json:"peerAvatar"`
LastMsg string `json:"lastMsg"`
LastMsgTime string `json:"lastMsgTime"`
UnreadCount uint `json:"unreadCount"`
ConvID uint64 `json:"convId"`
PeerURL string `json:"peerUrl"`
}
type MessagesPageProps ¶
type MessagesPageProps struct {
Conversations []MessageConversationPayload `json:"conversations"`
SuggestedUsers []UserConnectionPayload `json:"suggestedUsers"`
}
type NavItemPayload ¶
type NavItemPayload struct {
}
type NotificationPayload ¶
type NotificationPayload struct {
ID uint64 `json:"id"`
EventType string `json:"eventType"`
IsRead bool `json:"isRead"`
CreatedAt string `json:"createdAt"`
Title string `json:"title"`
Content string `json:"content"`
Actor TopicAuthorPayload `json:"actor"`
Article *NotificationArticlePayload `json:"article,omitempty"`
Payload eventNotification.NotificationPayload `json:"payload"`
}
type NotificationsPageProps ¶
type NotificationsPageProps struct {
Total int64 `json:"total"`
UnreadCount int64 `json:"unreadCount"`
Notifications []NotificationPayload `json:"notifications"`
Pagination PaginationPayload `json:"pagination"`
}
type OpenGraphMeta ¶ added in v0.2.2
type OpenGraphMeta struct {
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
Type string `json:"type,omitempty"`
URL string `json:"url,omitempty"`
SiteName string `json:"siteName,omitempty"`
Image string `json:"image,omitempty"`
PublishedTime string `json:"publishedTime,omitempty"`
ModifiedTime string `json:"modifiedTime,omitempty"`
Author string `json:"author,omitempty"`
Section string `json:"section,omitempty"`
Tags []string `json:"tags,omitempty"`
}
type PageMeta ¶
type PageMeta struct {
Title string `json:"title"`
Description string `json:"description,omitempty"`
Canonical string `json:"canonical,omitempty"`
Robots string `json:"robots,omitempty"`
OpenGraph *OpenGraphMeta `json:"openGraph,omitempty"`
Twitter *TwitterMeta `json:"twitter,omitempty"`
JSONLD any `json:"jsonLd,omitempty"`
}
type PagePayload ¶
type PaginationPayload ¶
type PublishArticlePayload ¶
type PublishCategoryPayload ¶
type PublishPageProps ¶
type PublishPageProps struct {
ArticleID uint64 `json:"articleId"`
IsEditing bool `json:"isEditing"`
Categories []PublishCategoryPayload `json:"categories"`
Types []PublishTypePayload `json:"types"`
Article PublishArticlePayload `json:"article"`
}
type PublishTypePayload ¶
type ReplyPayload ¶
type ReplyPayload struct {
ID uint64 `json:"id"`
ArticleID uint64 `json:"articleId"`
Content string `json:"content"`
Author TopicAuthorPayload `json:"author"`
CreatedAt string `json:"createdAt"`
ReplyToID uint64 `json:"replyToId,omitempty"`
ReplyToUserID uint64 `json:"replyToUserId,omitempty"`
ReplyToUsername string `json:"replyToUsername,omitempty"`
IsOwnReply bool `json:"isOwnReply"`
}
type ReplyWindowPayload ¶ added in v0.2.2
type ReplyWindowPayload struct {
Replies []ReplyPayload `json:"replies"`
AnchorReplyID uint64 `json:"anchorReplyId,omitempty"`
BeforeCursor uint64 `json:"beforeCursor,omitempty"`
AfterCursor uint64 `json:"afterCursor,omitempty"`
HasBefore bool `json:"hasBefore"`
HasAfter bool `json:"hasAfter"`
Total int64 `json:"total"`
}
type ResetPasswordPageProps ¶
type ResetPasswordPageProps struct {
Token string `json:"token"`
}
type SearchPageProps ¶
type SearchPageProps struct {
Query string `json:"query"`
Topics []TopicPayload `json:"topics"`
Total int64 `json:"total"`
TotalPages int `json:"totalPages"`
Pagination PaginationPayload `json:"pagination"`
}
type SettingsPageProps ¶
type SettingsPageProps struct {
User *vo.UserDetailedVo `json:"user"`
Stats SettingsStatsPayload `json:"stats"`
Tabs []TabPayload `json:"tabs"`
}
type SettingsStatsPayload ¶
type SidebarPayload ¶
type SidebarPayload struct {
Main []NavItemPayload `json:"main"`
Resources []NavItemPayload `json:"resources"`
Categories []CategoryNavPayload `json:"categories"`
ActiveKey string `json:"activeKey"`
}
type SitePayload ¶
type SitePayload struct {
Name string `json:"name"`
Description string `json:"description"`
Logo string `json:"logo"`
Favicon string `json:"favicon"`
ExternalLinks string `json:"externalLinks,omitempty"`
BrandType string `json:"brandType"`
BrandText string `json:"brandText"`
BrandImage string `json:"brandImage"`
}
type SponsorPayload ¶
type SponsorSectionPayload ¶
type SponsorSectionPayload struct {
Key string `json:"key"`
Label string `json:"label"`
Tone string `json:"tone"`
Sponsors []SponsorPayload `json:"sponsors"`
}
type SponsorsContactPayload ¶ added in v0.2.2
type SponsorsPageIntroPayload ¶ added in v0.2.2
type SponsorsPageProps ¶
type SponsorsPageProps struct {
Sections []SponsorSectionPayload `json:"sections"`
TotalCount int `json:"totalCount"`
Content SponsorsPageIntroPayload `json:"content"`
Contact SponsorsContactPayload `json:"contact"`
Rules []SponsorsRulePayload `json:"rules"`
}
type SponsorsRulePayload ¶ added in v0.2.2
type SponsorsRulePayload struct {
Content string `json:"content"`
}
type TabPayload ¶
type TopicAuthorPayload ¶
type TopicCategoryPayload ¶
type TopicPayload ¶
type TopicPayload struct {
ID uint64 `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
URL string `json:"url"`
Author TopicAuthorPayload `json:"author"`
Participants []TopicAuthorPayload `json:"participants"`
Categories []TopicCategoryPayload `json:"categories"`
ReplyCount uint64 `json:"replyCount"`
ViewCount uint64 `json:"viewCount"`
ActivityText string `json:"activityText"`
LastUpdateTime string `json:"lastUpdateTime"`
}
type TwitterMeta ¶ added in v0.2.2
type UnreadStatusPayload ¶ added in v0.2.2
type UserActivityPayload ¶
type UserConnectionPayload ¶
type UserProfileProps ¶
type UserProfileProps struct {
User *vo.UserCard `json:"user"`
Badges []badgeservice.UserBadge `json:"badges"`
Topics []TopicPayload `json:"topics"`
Activities []UserActivityPayload `json:"activities"`
Following []UserConnectionPayload `json:"following"`
Followers []UserConnectionPayload `json:"followers"`
IsOwnProfile bool `json:"isOwnProfile"`
CanMessage bool `json:"canMessage"`
CanFollow bool `json:"canFollow"`
MessageURL string `json:"messageUrl"`
SettingsURL string `json:"settingsUrl"`
}
Click to show internal directories.
Click to hide internal directories.