Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
func NewStorage ¶
func (*Storage) NewArticleRepository ¶
func (s *Storage) NewArticleRepository() realworld.ArticleRepo
func (*Storage) NewUserRepository ¶
type User ¶
type User struct { Model Username string `gorm:"unique_index;not null"` Email string `gorm:"unique_index;not null"` Password string `gorm:"not null"` Bio sql.NullString Image sql.NullString Followers []Follow `gorm:"foreignkey:FollowingID"` Followings []Follow `gorm:"foreignkey:FollowerID"` Favorites []Article `gorm:"many2many:favorites;"` }
Click to show internal directories.
Click to hide internal directories.