Documentation ¶
Index ¶
- func CreateUUID() (string, error)
- func FlushDB() error
- func Md5PasswordWithSalt(salt, password string) (md5Password string)
- func RandStringRunes(n int) string
- type ExpectWord
- type Post
- type User
- func (u *User) AddOrRemFollowingUser(followingUser User, following string) error
- func (u *User) CreateUser() error
- func (u *User) GetLastUsers() ([]string, error)
- func (u *User) GetUserByAuth() error
- func (u *User) GetUserByName() error
- func (u *User) GetUserByUserID() error
- func (u *User) GetUserPostCount() (int64, error)
- func (u *User) GetUserPosts(start int, count int) error
- func (u *User) IsFollowing(follwing *User) (bool, error)
- func (u *User) UpdateUserAuth() error
- type Word
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateUUID ¶
func Md5PasswordWithSalt ¶
Types ¶
type ExpectWord ¶
type ExpectWord struct { Name string `json:"name"` Am string `json:"am"` MP3 string `json:"mp3"` Means []mean `json:"means"` }
func GetWords ¶
func GetWords(wordNames []string) ([]ExpectWord, error)
type Post ¶
type Post struct { PostID int64 `json:"postid"` UserID int64 `json:"userid"` CreatedAt int64 `json:"created_at"` Content string `json:"content"` }
Post represent post model
func (*Post) GetTimelinePosts ¶
GetTimelinePosts used to get timeline posts
type User ¶
type User struct { UserID int64 `json:"userid"` Username string `json:"username"` Salt string `json:"salt"` Password string `json:"password"` Auth string `json:"auth"` Followers []string `json:"followers"` Following []string `json:"following"` Channels []string `json:"channels"` PostIDs []string `json:"postids"` }
User represent user model
func (*User) AddOrRemFollowingUser ¶
AddFollowingUser used to add following user
func (*User) GetLastUsers ¶
func (*User) GetUserByAuth ¶
GetUserByAuth used to get userinfo
func (*User) GetUserByName ¶
GetUserByName used to get user info
func (*User) GetUserByUserID ¶
func (*User) GetUserPostCount ¶
func (*User) GetUserPosts ¶
GetUserPosts used to get user postids
func (*User) UpdateUserAuth ¶
UpdateUserAuth update user auth secret
Click to show internal directories.
Click to hide internal directories.