domain

package
v0.0.0-...-a783adc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	Menu
	Tags `json:"tags"`
}

type CategoryName

type CategoryName string

type Comment

type Comment struct {
	Id string
	// 文章信息
	PostInfo PostInfo4Comment
	// 评论的内容
	Content string
	// 用户信息
	UserInfo   UserInfo4Comment
	CreateTime int64
}

type CommentReply

type CommentReply struct {
	ReplyId string
	// 回复内容
	Content string
	// 被回复的回复 Id
	ReplyToId string
	// 用户信息
	UserInfo UserInfo4Reply
	// 被回复用户的信息
	RepliedUserInfo UserInfo4Reply
	Status          CommentStatus
	CreateTime      int64
}

type CommentStatus

type CommentStatus uint
const (
	// CommentStatusPending 审核中
	CommentStatusPending CommentStatus = iota
	// CommentStatusApproved 审核通过
	CommentStatusApproved
	// CommentStatusRejected 审核不通过
	CommentStatusRejected
)

type CommentWithReplies

type CommentWithReplies struct {
	Comment
	Replies []CommentReply
}

type Config

type Config struct {
	Id         string
	Props      any
	Typ        string
	CreateTime int64
	UpdateTime int64
}

type DetailPostVO

type DetailPostVO struct {
	PrimaryPost
	ExtraPost
	IsLiked bool `json:"is_liked"`
}

type Email

type Email struct {
	// STMP 地址
	Host string
	Port int
	// 邮箱账号
	Account string
	// 密码
	Password string
	// 发件人
	Name string
	// 收件人
	To []string
	// 标题
	Subject string
	// 内容
	Body string
	// 内容类型
	ContentType string
}

type EmailConfig

type EmailConfig struct {
	Host     string `bson:"host"`
	Port     int    `bson:"port"`
	Account  string `bson:"account"`
	Password string `bson:"password"`
	Email    string `bson:"email"`
}

type ExtraPost

type ExtraPost struct {
	Content         string `json:"content"`
	MetaDescription string `json:"meta_description"`
	MetaKeywords    string `json:"meta_keywords"`
	WordCount       int    `json:"word_count"`
	UpdateTime      int64  `json:"update_time"`
}

type Friend

type Friend struct {
	Id          string
	Name        string
	Url         string
	Description string
	Email       string
	Status      FriendStatus
	Priority    int
}

type FriendStatus

type FriendStatus uint
const (
	// FriendStatusPending 审核中
	FriendStatusPending FriendStatus = iota
	// FriendStatusShowing 展示
	FriendStatusShowing
	// FriendStatusHiding 隐藏
	FriendStatusHiding
)

type FriendVO

type FriendVO struct {
	Name        string `json:"name"`
	Url         string `json:"url"`
	Description string `json:"description"`
	Priority    int    `json:"priority"`
}

type IndexConfig

type IndexConfig struct {
	WebMasterConfig WebMasterConfig
	NoticeConfig    NoticeConfig
}

type IndexConfigVO

type IndexConfigVO struct {
	WebMasterConfig WebMasterConfigVO `json:"web_master_config"`
	NoticeConfigVO  NoticeConfigVO    `json:"notice_config"`
}

IndexConfigVO 首页信息

type LatestComment

type LatestComment struct {
	PostInfo4Comment
	Name       string
	Content    string
	CreateTime int64
}
type Menu struct {
	CategoryName `json:"name"`
	Route        string `json:"route"`
}
type MenuVO struct {
	Menu
}

type MessageTemplate

type MessageTemplate struct {
	Name    string
	Title   string
	Content string
}

type NoticeConfig

type NoticeConfig struct {
	Content string `bson:"content" json:"content"`
	Enabled bool   `bson:"enabled" json:"enabled"`
}

NoticeConfig 公告配置

type NoticeConfigVO

type NoticeConfigVO struct {
	Content string `json:"content"`
}

type Post

type Post struct {
	PrimaryPost
	ExtraPost
	IsCommentAllowed bool     `json:"is_comment_allowed"`
	Likes            []string `json:"-"`
}

type PostInfo4Comment

type PostInfo4Comment struct {
	// 文章 ID
	PostId string
	// 文章标题字段
	PostTitle string
}

type PostRequest

type PostRequest struct {
	api.PageRequest
	Category *string  `form:"category"`
	Tags     []string `form:"tags"`
}

type PostStatus

type PostStatus uint
const (
	// PostStatusDraft 草稿
	PostStatusDraft PostStatus = iota
	// PostStatusPunished 已发布
	PostStatusPunished
	// PostStatusDeleted 已删除
	PostStatusDeleted
)

type PostsQueryCondition

type PostsQueryCondition struct {
	Size int64
	Skip int64

	Search *string

	api.Sorting

	Category *string
	Tags     []string
}

type PrimaryPost

type PrimaryPost struct {
	Sug          string   `json:"sug"`
	Author       string   `json:"author"`
	Title        string   `json:"title"`
	Summary      string   `json:"summary"`
	CoverImg     string   `json:"cover_img"`
	Category     string   `json:"category"`
	Tags         []string `json:"tags"`
	LikeCount    int      `json:"like_count"`
	CommentCount int      `json:"comment_count"`
	VisitCount   int      `json:"visit_count"`
	Priority     int      `json:"priority"`
	CreateTime   int64    `json:"create_time"`
}

type SearchCategoryVO

type SearchCategoryVO struct {
	CategoryName `json:"name"`
	Tags         `json:"tags"`
}

type SummaryPostVO

type SummaryPostVO struct {
	PrimaryPost
}

type SwitchConfig

type SwitchConfig struct {
	Status bool `bson:"status" json:"status"`
}

type Tags

type Tags []string

type TagsVO

type TagsVO struct {
	Tags `json:"tags"`
}

type UserInfo4Comment

type UserInfo4Comment struct {
	Name    string
	Email   string
	Ip      string
	Website string
}

type UserInfo4Reply

type UserInfo4Reply UserInfo4Comment

type VisitHistory

type VisitHistory struct {
	Url       string
	Ip        string
	UserAgent string
	Origin    string
	Referer   string
}

type WebMasterConfig

type WebMasterConfig struct {
	Name            string   `bson:"name" json:"name"`
	PostCount       uint     `bson:"postCount" json:"postCount"`
	CategoryCount   uint     `bson:"categoryCount" json:"categoryCount"`
	WebsiteViews    uint     `bson:"websiteViews" json:"websiteViews"`
	WebsiteLiveTime int64    `bson:"websiteLiveTime" json:"websiteLiveTime"`
	Profile         string   `bson:"profile" json:"profile"`
	Picture         string   `bson:"picture" json:"picture"`
	WebsiteIcon     string   `bson:"websiteIcon" json:"websiteIcon"`
	Domain          string   `bson:"domain" json:"domain"`
	Records         []string `bson:"records" json:"records"`
}

WebMasterConfig 站长信息

type WebMasterConfigVO

type WebMasterConfigVO struct {
	Name            string   `json:"name"`
	PostCount       uint     `json:"post_count"`
	CategoryCount   uint     `json:"category_count"`
	WebsiteViews    uint     `json:"website_views"`
	WebsiteLiveTime int64    `json:"website_live_time"`
	Profile         string   `json:"profile"`
	Picture         string   `json:"picture"`
	WebsiteIcon     string   `json:"website_icon"`
	Domain          string   `json:"domain"`
	Records         []string `json:"records"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL