types

package
v0.0.0-...-0329133 Latest Latest
Warning

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

Go to latest
Published: Dec 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 AuthBody

type AuthBody struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type BearerTokenClaims

type BearerTokenClaims struct {
	jwt.RegisteredClaims
	UID      uint64 `json:"uid"`
	Username string `json:"username"`
}

type ImageFileType

type ImageFileType int
const (
	IMAGE_FILE_TYPE_UNKNOWN ImageFileType = -1

	IMAGE_FILE_TYPE_WEBP ImageFileType = iota

	IMAGE_FILE_TYPE_JPEG

	IMAGE_FILE_TYPE_PNG
)

type PostCreateBody

type PostCreateBody struct {
	Title   string   `json:"title" form:"title"`
	Content string   `json:"content" form:"content"`
	Images  []string `json:"images" form:"images"`
}

type ReplyCreateBody

type ReplyCreateBody struct {
	CommentID     uint64 `json:"comment_id" form:"comment_id"`
	ParentReplyID uint64 `json:"parent_reply_id" form:"parent_reply_id"`
	Content       string `json:"content" form:"content"`
}

type UserAuthBody

type UserAuthBody struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type UserCommentCreateBody

type UserCommentCreateBody struct {
	PostID  *uint64 `json:"post_id" form:"post_id"`
	Content string  `json:"content" form:"content"`
}

type UserCommentDeleteBody

type UserCommentDeleteBody struct {
	CommentID *uint64 `json:"comment_id" form:"comment_id"`
}

type UserCommentUpdateBody

type UserCommentUpdateBody struct {
	CommentID *uint64 `json:"comment_id" form:"comment_id"`
	Content   string  `json:"content" form:"content"`
}

type UserPostInfo

type UserPostInfo struct {
	UID   uint   `json:"id"`
	Title string `json:"title"`
}

type UserReplyDeleteBody

type UserReplyDeleteBody struct {
	ReplyID uint64 `json:"reply_id" form:"reply_id"`
}

type UserReplyUpdateBody

type UserReplyUpdateBody struct {
	ReplyID uint64 `json:"reply_id" form:"reply_id"`
	Content string `json:"content" form:"content"`
}

type UserUpdatePasswordBody

type UserUpdatePasswordBody struct {
	UserAuthBody
	NewPassword string `json:"new_password"`
}

type UserUpdateProfileBody

type UserUpdateProfileBody struct {
	NickName *string `json:"nickname"`
	Birth    *uint64 `json:"birth"`
	Gender   *string `json:"gender"`
}

Jump to

Keyboard shortcuts

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