Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Repo ¶
type Service ¶
type Service struct { Model UserID int64 `sql:"not null;unique_index:idx_userid_userserviceid"` Name string `sql:"not null;index"` AccessToken string `sql:"not null"` UserServiceID int64 `sql:"not null;unique_index:idx_userid_userserviceid"` UserServiceName string UserServiceEmail string Repos []Repo }
Service represents the object of external service.
type Token ¶
type User ¶
User represents the object of individual user.
func CreateUserByService ¶
func CreateUserByService(serviceName, serviceAccessToken string, userServiceID int64, userServiceName, userServiceEmail string) (*User, error)
CreateUserByService creates record of a new user using given service.
func GetUserByID ¶
GetUserByID returns the user object by given id if exists.
func GetUserByService ¶
GetUserByService returns the user object by given service if exists.
func GetUserByToken ¶
GetUserByToken returns the user object by given token value if exists.
Click to show internal directories.
Click to hide internal directories.