Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NewPostDTO ¶
type NewPostDTO struct { Title string `json:"title" validate:"required"` Slug string `json:"slug" validate:"required"` Body string `json:"body" validate:"omitempty"` AuthorID string `json:"author" validate:"required"` PublishTime time.Time `json:"publish_time"` }
func (*NewPostDTO) MapToEntity ¶
func (nU *NewPostDTO) MapToEntity() (*models.PostModel, error)
type NewPostResource ¶
type NewPostResource struct {
Data *NewPostDTO `json:"data" validate:"required"`
}
type PostResource ¶
type PostsResource ¶
type UpdatePostDTO ¶
type UpdatePostDTO struct { ID string `json:"id"` Title string `json:"title" validate:"required"` Slug string `json:"slug" validate:"required"` Body string `json:"body" validate:"omitempty"` AuthorID string `json:"author" validate:"required"` PublishTime time.Time `json:"publish_time"` }
func (*UpdatePostDTO) MapToEntity ¶
func (uU *UpdatePostDTO) MapToEntity() (*models.PostModel, error)
type UpdatedPostResource ¶
type UpdatedPostResource struct {
Data *UpdatePostDTO `json:"data" validate:"required"`
}
Click to show internal directories.
Click to hide internal directories.