Documentation ¶
Index ¶
Constants ¶
View Source
const UserDefaultImage string = "https://api.realworld.io/images/demo-avatar.png"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Article ¶
type Article struct { ID ID AuthorID ID Title string Slug string Description string Body string CreatedAt time.Time UpdatedAt time.Time TagNames []string Author User IsFavorite bool FavoriteCount int }
func NewArticle ¶
func RandomArticle ¶
type ArticleFavorite ¶
type ArticleFavoriteCount ¶
type ArticleTag ¶
type Comment ¶
type Comment struct { ID ID ArticleID ID AuthorID ID Body string CreatedAt time.Time UpdatedAt time.Time Author User }
func NewComment ¶
type User ¶
type User struct { ID ID Email string Username string Password string Image string Bio string CreatedAt time.Time UpdatedAt time.Time IsFollowed bool Token string }
func RandomUser ¶
func RandomUser() User
func (*User) SetImageURL ¶
func (*User) SetPassword ¶
func (*User) SetUsername ¶
type UserFollow ¶
func NewUserFollow ¶
func NewUserFollow(arg UserFollow) (UserFollow, error)
Click to show internal directories.
Click to hide internal directories.