dto

package
v0.0.0-...-76c6153 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicResponse

type BasicResponse struct {
	Ok        bool      `json:"ok"`
	Details   string    `json:"details"`
	Timestamp time.Time `json:"timestamp"`
}

func NewBasicResponse

func NewBasicResponse(ok bool, details string) BasicResponse

type CreateCommentDto

type CreateCommentDto struct {
	PostID   int64  `json:"post_id" binding:"required"`
	ParentID *int64 `json:"parent_id"`
	Content  string `json:"content" binding:"required,min=1"`
}

type CreatePostRequest

type CreatePostRequest struct {
	Title    string   `json:"title" binding:"required,min=2"`
	Content  string   `json:"content" binding:"required,min=100,max=15000"`
	FeedView string   `json:"feed_view" binding:"required,min=100,max=2000"`
	Tags     []string `json:"tags"`
}

type EditPostRequest

type EditPostRequest struct {
	PostID   int64     `json:"id"`
	AuthorID uuid.UUID `json:"author_id"`
	Title    *string   `json:"title"`
	Content  *string   `json:"content"`
	FeedView *string   `json:"feed_view"`
}

type GetCommentsDto

type GetCommentsDto struct {
	Limit  int `json:"limit"`
	Offset int `json:"offset"`
}

type GetPost

type GetPost struct {
	Post    model.FullPost `json:"post"`
	IsLiked bool           `json:"is_liked"`
}

type GetPostsRequest

type GetPostsRequest struct {
	Limit  int `json:"limit"`
	Offset int `json:"offset"`
}

type MQPostCreatedMsg

type MQPostCreatedMsg struct {
	PostID    int64     `json:"post_id"`
	UserID    uuid.UUID `json:"user_id"`
	PostTitle string    `json:"post_title"`
	CreatedAt time.Time `json:"created_at"`
}

type MQPostValidationStatusUpdateMsg

type MQPostValidationStatusUpdateMsg struct {
	PostID    int64     `json:"post_id"`
	UserID    uuid.UUID `json:"user_id"`
	StatusMsg string    `json:"status_msg"`
}

type UpdatePostValidationStatusRequest

type UpdatePostValidationStatusRequest struct {
	PostID    int64  `json:"post_id" binding:"required"`
	Validated bool   `json:"validated" binding:"required"`
	StatusMsg string `json:"status_msg" binding:"required,max=1024"`
}

Jump to

Keyboard shortcuts

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