param

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminComment

type AdminComment struct {
	Author            string             `json:"author" form:"author"`
	Email             string             `json:"email" form:"email"`
	AuthorURL         string             `json:"authorUrl" form:"authorUrl"`
	Content           string             `json:"content" form:"content"`
	PostID            int32              `json:"postId" form:"postId"`
	ParentID          int32              `json:"parentId" form:"parentId"`
	AllowNotification bool               `json:"allowNotification"`
	CommentType       consts.CommentType `json:"-"`
}

type AttachmentQuery

type AttachmentQuery struct {
	Page
	Keyword        string                 `json:"keyword" form:"keyword"`
	MediaType      string                 `json:"mediaType" form:"mediaType"`
	AttachmentType *consts.AttachmentType `json:"attachmentType" form:"attachmentType"`
}

type AttachmentUpdate

type AttachmentUpdate struct {
	Name string `json:"name" binding:"gte=1,lte=255"`
}

type Authentication

type Authentication struct {
	Password string `json:"password" form:"password"`
}

type Category

type Category struct {
	ID          int32  `json:"id" binding:"gte=0"`
	Name        string `json:"name" binding:"gte=1,lte=255"`
	Slug        string `json:"slug" binding:"gte=0,lte=255"`
	Description string `json:"description" binding:"gte=0,lte=100"`
	Thumbnail   string `json:"thumbnail" binding:"gte=0,lte=1023"`
	Password    string `json:"password" binding:"gte=0,lte=255"`
	ParentID    int32  `json:"parentId" binding:"gte=0"`
	Priority    int32  `json:"priority" binding:"gte=0"`
}

type Comment

type Comment struct {
	Author            string             `json:"author" form:"author" binding:"gte=1,lte=50"`
	Email             string             `json:"email" form:"email" binding:"email,lte=255"`
	AuthorURL         string             `json:"authorUrl" form:"authorUrl" binding:"lte=255"`
	Content           string             `json:"content" form:"content" binding:"gte=1,lte=1023"`
	PostID            int32              `json:"postId" form:"postId" binding:"gte=1"`
	ParentID          int32              `json:"parentId" form:"parentId" binding:"gte=0"`
	AllowNotification bool               `json:"allowNotification" form:"allowNotification"`
	CommentType       consts.CommentType `json:"-"`
}

type CommentQuery

type CommentQuery struct {
	Page
	*Sort
	ContentID     *int32
	Keyword       *string               `json:"keyword" form:"keyword"`
	CommentStatus *consts.CommentStatus `json:"status" form:"status"`
	ParentID      *int32                `json:"parentID" form:"parentID"`
}

type ExportMarkdown

type ExportMarkdown struct {
	NeedFrontMatter bool `json:"needFrontMatter"`
}

type Install

type Install struct {
	User
	Locale string `json:"locale"`
	Title  string `json:"title" binding:"required"`
	URL    string `json:"url"`
}

type Journal

type Journal struct {
	SourceContent string             `json:"sourceContent" form:"sourceContent" binding:"gte=1"`
	Content       string             `json:"content" form:"content"`
	Type          consts.JournalType `json:"type" form:"type"`
}

type JournalQuery

type JournalQuery struct {
	Page
	*Sort
	Keyword     *string             `json:"keyword" form:"keyword"`
	JournalType *consts.JournalType `json:"journalType" form:"journalType"`
}
type Link struct {
	Name        string `json:"name" form:"name" binding:"gte=1,lte=255"`
	URL         string `json:"url" form:"url" binding:"url,lte=255"`
	Description string `json:"description" form:"description" binding:"lte=255"`
	Team        string `json:"team" form:"team" binding:"lte=255"`
	Priority    int32  `json:"priority" form:"priority" binding:"gte=0"`
}

type LoginParam

type LoginParam struct {
	Username string `json:"username" binding:"gte=1,lte=20"`
	Password string `json:"password" binding:"gte=6"`
	AuthCode string `json:"authcode" `
}
type Menu struct {
	ID       int32  `json:"id" form:"id"`
	Name     string `json:"name" form:"name" binding:"gte=1,lte=50"`
	URL      string `json:"URL" form:"url" binding:"gte=1,lte=1023"`
	Priority int32  `json:"priority" form:"priority" binding:"gte=0"`
	Target   string `json:"target" form:"target" binding:"lte=50"`
	Icon     string `json:"icon" form:"icon" binding:"lte=50"`
	ParentID int32  `json:"parentId" form:"parentId" binding:"gte=0"`
	Team     string `json:"team" form:"team" binding:"lte=255"`
}

type Meta

type Meta struct {
	Key   string `json:"key" form:"key" binding:"required"`
	Value string `json:"value" form:"value" binding:"required"`
}

type Option

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

type OptionQuery

type OptionQuery struct {
	Page
	Keyword string            `json:"keyword" form:"keyword"`
	Type    consts.OptionType `json:"type" form:"type"`
}

type Page

type Page struct {
	PageNum  int `json:"page" form:"page"`
	PageSize int `json:"size" form:"size"`
}

type Photo

type Photo struct {
	Name        string `json:"name" form:"name" binding:"gte=1"`
	Thumbnail   string `json:"thumbnail" form:"thumbnail" binding:"gte=1"`
	TakeTime    *int64 `json:"takeTime" form:"takeTime"`
	URL         string `json:"url" form:"url" binding:"gte=1"`
	Team        string `json:"team" form:"team"`
	Location    string `json:"location" form:"location"`
	Description string `json:"description" form:"description"`
}

type Post

type Post struct {
	Title           string             `json:"title" form:"title" binding:"gte=1,lte=100"`
	Status          consts.PostStatus  `json:"status" form:"status" binding:"gte=0"`
	Slug            string             `json:"slug" form:"slug" binding:"lte=255"`
	EditorType      *consts.EditorType `json:"editorType" form:"editorType"`
	OriginalContent string             `json:"originalContent" form:"originalContent"`
	Summary         string             `json:"summary" form:"summary"`
	Thumbnail       string             `json:"thumbnail" form:"thumbnail"`
	DisallowComment bool               `json:"disallowComment" form:"disallowComment"`
	Password        string             `json:"password" form:"password" binding:"lte=255"`
	Template        string             `json:"template" form:"template" binding:"lte=255"`
	TopPriority     int32              `json:"topPriority" form:"topPriority" binding:"gte=0"`
	CreateTime      *int64             `json:"createTime" form:"createTime" `
	MetaKeywords    string             `json:"metaKeywords" form:"metaKeywords" `
	MetaDescription string             `json:"metaDescription" form:"metaDescription"`
	TagIDs          []int32            `json:"tagIds" form:"tagIds"`
	CategoryIDs     []int32            `json:"categoryIds" form:"categoryIds"`
	MetaParam       []Meta             `json:"metas" form:"metas"`
	Content         string             `json:"content" form:"content"`
	EditTime        *int64             `json:"editTime" form:"editTime"`
	UpdateTime      *int64             `json:"updateTime" form:"updateTime"`
}

type PostContent

type PostContent struct {
	Content         string `json:"content" form:"content"`
	OriginalContent string `json:"originalContent" form:"orginalContent"`
}

type PostQuery

type PostQuery struct {
	Page
	*Sort
	Keyword      *string              `json:"keyword" form:"keyword"`
	Statuses     []*consts.PostStatus `json:"statuses" form:"statuses"`
	CategoryID   *int32               `json:"categoryId" form:"categoryId"`
	More         *bool                `json:"more" form:"more"`
	TagID        *int32               `json:"tagId" form:"tagId"`
	WithPassword *bool                `json:"-" form:"-"`
}

type ResetPasswordParam

type ResetPasswordParam struct {
	Username string `json:"username" binding:"required"`
	Email    string `json:"email" binding:"required"`
	Code     string `json:"code"`
	Password string `json:"Password"`
}

type Sheet

type Sheet struct {
	Title           string             `json:"title" form:"title" binding:"required,lte=100"`
	Status          consts.PostStatus  `json:"status" form:"status"`
	Slug            string             `json:"slug" form:"slug" binding:"lte=255"`
	EditorType      *consts.EditorType `json:"editorType" form:"editorType"`
	Content         string             `json:"content" form:"content"`
	OriginalContent string             `json:"originalContent" form:"originalContent"`
	Summary         string             `json:"summary" form:"summary" `
	Thumbnail       string             `json:"thumbnail" form:"thumbnail" binding:"lte=255"`
	DisallowComment bool               `json:"disallowComment" form:"disallowComment"`
	Password        string             `json:"password" form:"password"`
	Template        string             `json:"template"`
	TopPriority     int32              `json:"topPriority" form:"topPriority" binding:"gte=0"`
	CreateTime      *int64             `json:"createTime" form:"createTime"`
	MetaKeywords    string             `json:"metaKeywords" form:"metaKeywords"`
	MetaDescription string             `json:"metaDescription" form:"metaDescription"`
	Metas           []Meta             `json:"metas" form:"metas"`
}

type Sort

type Sort struct {
	Fields []string `json:"sort" form:"sort"`
}

type Tag

type Tag struct {
	Name      string `json:"name" form:"name" binding:"gte=1,lte=255"`
	Slug      string `json:"slug" form:"slug" binding:"lte=255"`
	Thumbnail string `json:"thumbnail" form:"thumbnail" binding:"lte=1023"`
	Color     string `json:"color" form:"color" biding:"lte=24"`
}

type TestEmail

type TestEmail struct {
	To      string `json:"to" form:"to" binding:"email"`
	Subject string `json:"subject" form:"subject" binding:"gte=1"`
	Content string `json:"content" form:"content" binding:"gte=1"`
}

type ThemeContent

type ThemeContent struct {
	Path    string `json:"path" form:"path" binding:"gte=1"`
	Content string `json:"content" form:"path"`
}

type User

type User struct {
	Username    string `json:"username" binding:"required,lte=50"`
	Nickname    string `json:"nickname" binding:"required,lte=255"`
	Email       string `json:"email" binding:"required,email,lte=127"`
	Password    string `json:"password"`
	Avatar      string `json:"avatar" binding:"lte=1023"`
	Description string `json:"description" binding:"lte=1023"`
}

Jump to

Keyboard shortcuts

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