Documentation
¶
Index ¶
- func Card(c echo.Context) error
- func CheckSignIn(f echo.HandlerFunc) echo.HandlerFunc
- func CheckUserExist(n string) bool
- func InitUser()
- func Profile(c echo.Context) error
- func SetProfile(c echo.Context) error
- func SignIn(c echo.Context) error
- func SignOut(c echo.Context) error
- type Session
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckSignIn ¶
func CheckSignIn(f echo.HandlerFunc) echo.HandlerFunc
CheckSignIn checks whether user has signed in
func CheckUserExist ¶
CheckUserExist checks user exist by given user id
Types ¶
type Session ¶
type Session struct {
ID string `json:"id"`
Name string `json:"name"`
NickName string `json:"nickname"`
Avatar string `json:"avatar"`
Token string `json:"token"`
}
Session contains user's info
func GetSession ¶
GetSession return the session for given user
func GetUserByID ¶
GetUserByID return the user info by user id
type User ¶
type User struct {
//----account-----
ID string `json:"id"`
Name string `json:"name"`
Email string `json:"email,omitempty"`
//----profile-----
NickName string `json:"nickname"`
Avatar string `json:"avatar"`
Website string `json:"website"`
About string `json:"about"`
Location string `json:"location"`
BgColor string `json:"bg_color"`
TextColor string `json:"text_color"`
LookingForWork bool `json:"lfw"`
Education string `json:"education"`
Employer string `json:"employer"`
Skills string `json:"skills"`
AvailableFor string `json:"available_for"`
WorkingExp string `json:"working_exp"`
CreateDate string `json:"create_date"`
EditDate string `json:"edit_date"`
// contains filtered or unexported fields
}
User holds all info of one user
Click to show internal directories.
Click to hide internal directories.