Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileUploadReturn ¶
type FileUploadReturn struct {
File File `json:"data"`
}
FileUploadReturn DTO for file upload
type Post ¶
type Post struct { gorm.Model Title string Body string Slug string `gorm:"type:varchar(100);unique_index"` UserID int User User }
Post a post
func (*Post) FormattedDate ¶
FormattedDate returns the post's CreatedAt date, but formatted
type Profile ¶
type Profile struct { gorm.Model UserID uint NickName string `gorm:"size:128"` FirstName string `gorm:"size:128"` LastName string `gorm:"size:128"` PhotoURL string `gorm:"size:2000"` PublicEmail string `gorm:"size:256"` Phone string `gorm:"size:30"` Twitter string `gorm:"size:128"` Github string `gorm:"size:128"` Note string `gorm:"type:TEXT"` }
Profile the users profile
func (*Profile) DisplayName ¶
DisplayName returns either the nickname if it's not empty, or the First+Last Name
type User ¶
type User struct { gorm.Model Email string `gorm:"type:varchar(100);unique_index"` Password string Profile Profile Posts []Post }
User the user of our application
type ViewMenus ¶
type ViewMenus struct {
// contains filtered or unexported fields
}
ViewMenus data structure for menus in views
func NewViewMenus ¶
NewViewMenus returns a new ViewMenus
Click to show internal directories.
Click to hide internal directories.