Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlogPost ¶
type BlogPost struct { ID string `gorm:primary_key" json:"id,omitempty"` Title string `gorm:"varchar(255);not null" json:"title,omitempty"` Description string `gorm:"type:text;not null" json:"description,omitempty"` Body string `gorm:"type:text;not null" json:"body,omitempty"` CreatedAt time.Time `gorm:"not null" json:"createdAt,omitempty"` UpdatedAt time.Time `gorm:"not null" json:"updatedAt,omitempty"` }
type CreateBlogPostSchema ¶
type CreateBlogPostSchema struct { Title string `json:"title" validate:"required"` Description string `json:"description" validate:"required"` Body string `json:"body" validate:"required"` }
swagger:parameters createBlogPostSchema
type ErrorResponse ¶
type ErrorResponse struct { Field string `json:"field"` Tag string `json:"tag"` Value string `json:"value,omitempty"` }
func ValidateStruct ¶
func ValidateStruct[T any](payload T) []*ErrorResponse
type UpdateBlogPostSchema ¶
Click to show internal directories.
Click to hide internal directories.