Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Movie ¶
type Movie struct { Id int `gorm:"primary_key;auto_increment" json:"id"` Name string `gorm:"size:255;not null;unique" json:"name"` Rating int `json:"rating"` }
Movie structure.
func (*Movie) Initialize ¶
func (movie *Movie) Initialize()
Initialize the default values of a given movie.
func (*Movie) Validate ¶
func (movie *Movie) Validate() []common.FieldError
Validate a movie structure and returns all the errors encountered.
Click to show internal directories.
Click to hide internal directories.