dto

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2022 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttachmentDTO

type AttachmentDTO struct {
	ID             int32                 `json:"id"`
	Name           string                `json:"name"`
	Path           string                `json:"path"`
	FileKey        string                `json:"fileKey"`
	ThumbPath      string                `json:"thumbPath"`
	MediaType      string                `json:"mediaType"`
	Suffix         string                `json:"suffix"`
	Width          int32                 `json:"width"`
	Height         int32                 `json:"height"`
	Size           int64                 `json:"size"`
	AttachmentType consts.AttachmentType `json:"type"`
}

type AuthTokenDTO

type AuthTokenDTO struct {
	AccessToken  string `json:"access_token"`
	ExpiredIn    int    `json:"expired_in"`
	RefreshToken string `json:"refresh_token"`
}

type BackupDTO

type BackupDTO struct {
	DownloadLink string `json:"downloadLink"`
	Filename     string `json:"filename"`
	UpdateTime   int64  `json:"updateTime"`
	FileSize     int64  `json:"fileSize"`
}

type BaseDTO

type BaseDTO struct {
	Status  int         `json:"status"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

type CategoryDTO

type CategoryDTO struct {
	ID          int32  `json:"id"`
	Name        string `json:"name"`
	Slug        string `json:"slug"`
	Description string `json:"description"`
	Thumbnail   string `json:"thumbnail"`
	ParentID    int32  `json:"parentId"`
	Password    string `json:"password"`
	CreateTime  int64  `json:"createTime"`
	FullPath    string `json:"fullPath"`
	Priority    int32  `json:"priority"`
	Type        int32  `json:"type"`
}

type CategoryWithPostCount

type CategoryWithPostCount struct {
	*CategoryDTO
	PostCount int32 `json:"postCount"`
}

type Comment

type Comment struct {
	ID                int32                `json:"id"`
	Author            string               `json:"author"`
	Email             string               `json:"email"`
	IpAddress         string               `json:"ipAddress"`
	AuthorURL         string               `json:"authorUrl"`
	GravatarMD5       string               `json:"gravatarMd5"`
	Content           string               `json:"content"`
	Status            consts.CommentStatus `json:"status"`
	UserAgent         string               `json:"userAgent"`
	ParentID          int32                `json:"parentId"`
	IsAdmin           bool                 `json:"isAdmin"`
	AllowNotification bool                 `json:"allowNotification"`
	CreateTime        int64                `json:"createTime"`
	Avatar            string               `json:"avatar"`
}

type EnvironmentDTO

type EnvironmentDTO struct {
	Database  string `json:"database"`
	StartTime int64  `json:"startTime"`
	Version   string `json:"version"`
	Mode      string `json:"mode"`
}

type IndependentSheet

type IndependentSheet struct {
	ID        int32  `json:"id"`
	Title     string `json:"title"`
	FullPath  string `json:"fullPath"`
	RouteName string `json:"routeName"`
	Available bool   `json:"available"`
}

type Journal

type Journal struct {
	ID            int32              `json:"id"`
	SourceContent string             `json:"sourceContent"`
	Content       string             `json:"content"`
	Likes         int64              `json:"likes"`
	CreateTime    int64              `json:"createTime"`
	JournalType   consts.JournalType `json:"type"`
}

type JournalWithComment

type JournalWithComment struct {
	Journal
	CommentCount int64 `json:"commentCount"`
}
type Link struct {
	ID          int32  `json:"id"`
	Name        string `json:"name"`
	URL         string `json:"url"`
	Description string `json:"description"`
	Team        string `json:"team"`
	Priority    int32  `json:"priority"`
}

type Log

type Log struct {
	ID         int64          `json:"id"`
	LogKey     string         `json:"logKey"`
	LogType    consts.LogType `json:"type"`
	Content    string         `json:"content"`
	IPAddress  string         `json:"ipAddress"`
	CreateTime int64          `json:"createTime"`
}

type LoginPreCheckDTO

type LoginPreCheckDTO struct {
	NeedMFACode bool `json:"needMFACode"`
}
type Menu struct {
	ID       int32  `json:"id"`
	Name     string `json:"name"`
	URL      string `json:"url"`
	Priority int32  `json:"priority"`
	Target   string `json:"target"`
	Icon     string `json:"icon"`
	ParentID int32  `json:"parentId"`
	Team     string `json:"team"`
}

type Meta

type Meta struct {
	ID         int32  `json:"id"`
	PostID     int32  `json:"postId"`
	Key        string `json:"key"`
	Value      string `json:"value"`
	CreateTime int64  `json:"createTime"`
}

type Option

type Option struct {
	Key   string      `json:"key"`
	Value interface{} `json:"value"`
}

type Page

type Page struct {
	Content     interface{} `json:"content"`
	Pages       int         `json:"pages"`
	Total       int64       `json:"total"`
	RPP         int         `json:"rpp"`
	PageNum     int         `json:"pageNum"`
	HasNext     bool        `json:"hasNext"`
	HasPrevious bool        `json:"hasPrevious"`
	IsFirst     bool        `json:"isFirst"`
	IsLast      bool        `json:"isLast"`
	IsEmpty     bool        `json:"isEmpty"`
	HasContent  bool        `json:"hasContent"`
}

func NewPage

func NewPage(content interface{}, totalCount int64, page param.Page) *Page

type Photo

type Photo struct {
	ID          int32  `json:"id"`
	Name        string `json:"name"`
	Thumbnail   string `json:"thumbnail"`
	TakeTime    int64  `json:"takeTime"`
	URL         string `json:"url"`
	Team        string `json:"team"`
	Location    string `json:"location"`
	Description string `json:"description"`
	Likes       int64  `json:"likes"`
}

type Post

type Post struct {
	PostMinimal
	Summary         string `json:"summary"`
	Thumbnail       string `json:"thumbnail"`
	Visits          int64  `json:"visits"`
	DisallowComment bool   `json:"disallowComment"`
	Password        string `json:"password"`
	Template        string `json:"template"`
	TopPriority     int32  `json:"topPriority"`
	Likes           int64  `json:"likes"`
	WordCount       int64  `json:"wordCount"`
	Topped          bool   `json:"topped"`
}

type PostDetail

type PostDetail struct {
	Post
	OriginalContent string `json:"originalContent"`
	Content         string `json:"content"`
	CommentCount    int64  `json:"commentCount"`
}

type PostMinimal

type PostMinimal struct {
	ID              int32             `json:"id"`
	Title           string            `json:"title"`
	Status          consts.PostStatus `json:"status"`
	Slug            string            `json:"slug"`
	EditorType      consts.EditorType `json:"editorType"`
	CreateTime      int64             `json:"createTime"`
	EditTime        int64             `json:"editTime"`
	UpdateTime      int64             `json:"updateTime"`
	MetaKeywords    string            `json:"metaKeywords"`
	MetaDescription string            `json:"metaDescription"`
	FullPath        string            `json:"fullPath"`
}

type Statistic

type Statistic struct {
	PostCount     int64 `json:"postCount"`
	CommentCount  int64 `json:"commentCount"`
	CategoryCount int64 `json:"categoryCount"`
	TagCount      int64 `json:"tagCount"`
	JournalCount  int64 `json:"journalCount"`
	Birthday      int64 `json:"birthday"`
	EstablishDays int64 `json:"establishDays"`
	LinkCount     int64 `json:"linkCount"`
	VisitCount    int64 `json:"visitCount"`
	LikeCount     int64 `json:"likeCount"`
}

type StatisticWithUser

type StatisticWithUser struct {
	Statistic
	User User `json:"user"`
}

type Tag

type Tag struct {
	ID         int32  `json:"id"`
	Name       string `json:"name"`
	Slug       string `json:"slug"`
	Thumbnail  string `json:"thumbnail"`
	CreateTime int64  `json:"createTime"`
	FullPath   string `json:"fullPath"`
	Color      string `json:"color"`
}

type TagWithPostCount

type TagWithPostCount struct {
	*Tag
	PostCount int64 `json:"postCount"`
}

type ThemeAuthor

type ThemeAuthor struct {
	Name    string `json:"name"`
	Website string `json:"website"`
	Avatar  string `json:"avatar"`
}

type ThemeConfigGroup

type ThemeConfigGroup struct {
	Name    string                      `json:"name"`
	Label   string                      `json:"label"`
	Items   []*ThemeConfigItem          `json:"items" yaml:"-"`
	ItemMap map[string]*ThemeConfigItem `json:"-" yaml:"items"`
}

type ThemeConfigItem

type ThemeConfigItem struct {
	Name         string                      `json:"name"`
	Label        string                      `json:"label"`
	InputType    consts.ThemeConfigInputType `json:"type" yaml:"type"`
	DataType     consts.ThemeConfigDataType  `json:"dataType" yaml:"data-type"`
	DefaultValue interface{}                 `json:"defaultValue" yaml:"default"`
	PlaceHolder  string                      `json:"placeHolder"`
	Description  string                      `json:"description"`
	Options      []*ThemeConfigOption        `json:"options"`
}

type ThemeConfigOption

type ThemeConfigOption struct {
	Label string      `json:"label"`
	Value interface{} `json:"value"`
}

type ThemeFile

type ThemeFile struct {
	Name     string       `json:"name"`
	Path     string       `json:"path"`
	IsFile   bool         `json:"isFile"`
	Editable bool         `json:"editable"`
	Node     []*ThemeFile `json:"node"`
}

type ThemeProperty

type ThemeProperty struct {
	ID             string                     `json:"id"`
	Name           string                     `json:"name"`
	Website        string                     `json:"website"`
	Branch         string                     `json:"branch"`
	Repo           string                     `json:"repo"`
	UpdateStrategy consts.ThemeUpdateStrategy `json:"updateStrategy"`
	Description    string                     `json:"description"`
	Version        string                     `json:"version"`
	Require        string                     `json:"require"`
	Author         ThemeAuthor                `json:"author"`
	ThemePath      string                     `json:"themePath"`
	FolderName     string                     `json:"folderName"`
	HasOptions     bool                       `json:"hasOptions"`
	Activated      bool                       `json:"activated"`
	ScreenShots    string                     `json:"screenshots"`
	PostMetaField  []string                   `json:"postMetaField"`
	SheetMetaField []string                   `json:"sheetMetaField"`
}

type User

type User struct {
	ID          int32          `json:"id"`
	Username    string         `json:"username"`
	Nickname    string         `json:"nickname"`
	Email       string         `json:"email"`
	Avatar      string         `json:"avatar"`
	Description string         `json:"description"`
	MFAType     consts.MFAType `json:"mfaType"`
	CreateTime  int64          `json:"createTime"`
	UpdateTime  int64          `json:"updateTime"`
}

Jump to

Keyboard shortcuts

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