package
Version:
v1.5.2
Opens a new window with list of versions in this module.
Published: Sep 8, 2021
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
Documentation
¶
type BookDto struct {
Title string `validate:"required,min=3,max=50" json:"title"`
Isbn string `validate:"required,min=10,max=20" json:"isbn"`
CategoryID uint `json:"categoryId"`
FormatID uint `json:"formatId"`
}
BookDto defines a data transfer object for book.
NewBookDto is constructor.
Create creates a book model from this DTO.
ToString is return string of object
Validate performs validation check for the each item.
type LoginDto struct {
UserName string `json:"username"`
Password string `json:"password"`
}
LoginDto defines a data transfer object for login.
NewLoginDto is constructor.
ToString is return string of object
Source Files
¶
Click to show internal directories.
Click to hide internal directories.