Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type IUser ¶
type IUser interface { //GetUserById returns the user with the given id if found GetUserById(id string) (*models.User, error) //GetUserById returns the user with the given username or email if found GetUserByUsernameOrEmail(usernameOrEmail string) (*models.User, error) //SaveUser saves the new user to the user service SaveUser(user *models.User) error }
IUser is responsible to communicate with the user service
type User ¶
type User struct { Client protos.UserServiceClient // contains filtered or unexported fields }
User communicates with the user services
func (*User) GetUserById ¶
GetUserById finds the user with the given id via the user service
func (*User) GetUserByUsernameOrEmail ¶
GetUserByUsernameOrEmail checks whether the input is a email or a username and uses the functions for either one of them
Click to show internal directories.
Click to hide internal directories.