Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Author ¶
type Author struct { CreatedAt time.Time UpdatedAt time.Time DeletedAt gorm.DeletedAt `gorm:"index"` FirstName string `gorm:"primaryKey;not null" json:"first_name"` LastName string `gorm:"primaryKey" json:"last_name"` Bio string `gorm:"type:text" json:"bio"` OriginCountry string `gorm:"primaryKey;not null" json:"origin_country"` Stories []Story `` /* 177-byte string literal not displayed */ }
Author struct describes a story author
type Claims ¶
type Claims struct { Email string `json:"email"` jwt.StandardClaims }
Claims is a custom JWT claim type not persisted in db
type Story ¶
type Story struct { gorm.Model Title string `gorm:"not null" json:"title"` Content string `gorm:"type:text;not null" json:"content"` CurrentCity string `gorm:"not null" json:"current_city"` Year uint `gorm:"not null" json:"year"` IsVisible bool `gorm:"default:false" json:"is_visible"` Summary string `gorm:"type:text" json:"summary"` Latitude float64 `gorm:"not null" json:"latitude"` Longitude float64 `gorm:"not null" json:"longitude"` ImageURL string `gorm:"type:text" json:"image_url"` VideoURL string `gorm:"type:text" json:"video_url"` AuthorFirstName string `json:"author_first_name"` AuthorLastName string `json:"author_last_name"` AuthorCountry string `json:"author_country"` Author Author `gorm:"foreignKey:AuthorFirstName,AuthorLastName,AuthorCountry;references:FirstName,LastName,OriginCountry" json:"author"` }
Story struct describes a story rendered on the map
Click to show internal directories.
Click to hide internal directories.