Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base struct { // format: uuid // example: "6ba7b810-9dad-11d1-80b4-00c04fd430c8" ID uuid.UUID `json:"id" gorm:"type:uuid;primary_key;"` CreatedAt time.Time `json:"createdAt" gorm:"column:createdAt"` UpdatedAt time.Time `json:"updatedAt" gorm:"column:updatedAt"` DeletedAt *time.Time `json:"deletedAt" gorm:"column:deletedAt"` }
Base structure for all the models.
type Character ¶
type Character struct { Base FirstName string `json:"firstName" gorm:"column:firstName" validate:"required"` LastName string `json:"lastName" gorm:"column:lastName" validate:"required"` Nickname string `json:"nickname" validate:"required"` Items []Item `json:"items"` }
Character model.
type CharactersResponse ¶
type CharactersResponse struct { Total int16 `json:"total"` Characters []Character `json:"characters"` Link Link `json:"link"` }
CharactersResponse for the http request.
type Item ¶
type Item struct { Base Type string `json:"type" validate:"required"` Length float32 `json:"length" validate:"required"` Characteristics string `json:"characteristics" validate:"required"` Manufacturer string `json:"manufacturer"` }
Item model.
type ItemsResponse ¶
type ItemsResponse struct { Total int16 `json:"total"` Items []Item `json:"items"` Link Link `json:"link"` }
ItemsResponse for the http request.
Click to show internal directories.
Click to hide internal directories.