Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorRequestBody ¶
type AuthorRequestBody struct {
ID int64
Name string `json:"name,omitempty" validate:"min=5,max=20"`
Bio string `json:"bio,omitempty"`
}
AuthorRequestBody is the request body for the Author entity
type AuthorResponseBody ¶
type AuthorResponseBody struct {
ID int64
Name string `json:"name,omitempty" validate:"min=5,max=20"`
Bio string `json:"bio,omitempty"`
}
AuthorResponseBody is the response body for the Author entity
func FromDB ¶
func FromDB(author repository.Author) *AuthorResponseBody
FromDB converts a repository.Author to an AuthorResponseBody
Click to show internal directories.
Click to hide internal directories.