Documentation
¶
Index ¶
- func CheckDBAccountExists(a *server.App, accountID string) (bool, error)
- func CheckDBSessionExists(a *server.App, sessionID string) (bool, error)
- func CheckDBUserExists(a *server.App) (bool, error)
- func CheckDBUserIsGood(a *server.App, userInfo *GithubUserInfo) (bool, error)
- func CreateOrUpdateDBSession(a *server.App, accessToken string, browserInfo string) error
- func CreateUser(a *server.App, accessToken string, browserInfo string, ...) error
- func DeleteDBSession(a *server.App, accountID string, sessionID string) error
- func ExtendSessionExpiration(a *server.App, accountID string, sessionID string, newExpirationTime time.Time) error
- func GetAccountCount(a *server.App) (int, error)
- func GetDBUserSession(a *server.App, accessToken string, browserInfo string) (*db.Sessions, error)
- func GetSessionExpiration(a *server.App, accountID string, sessionID string, currentTime time.Time) (time.Time, error)
- func InspectInMemoryDB(a *server.App) error
- func InvalidateDBSession(a *server.App, sessionID string) error
- func PopulateAccountFromDB(a *server.App) error
- func PopulateProviderFromDB(a *server.App) error
- func UpdateUser(a *server.App, accessToken string, browserInfo string, ...) (*db.User, error)
- type GithubUserInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDBAccountExists ¶
func CheckDBSessionExists ¶
func CheckDBUserIsGood ¶
func CheckDBUserIsGood(a *server.App, userInfo *GithubUserInfo) (bool, error)
If there is already a user, we compare the login and email to see if it is the same user
func CreateOrUpdateDBSession ¶
func CreateUser ¶
func CreateUser(a *server.App, accessToken string, browserInfo string, userInfo *GithubUserInfo) error
CreateUser creates a new user along with the associated account, provider, and session.
func DeleteDBSession ¶
DeleteSession deletes the session from the database.
func ExtendSessionExpiration ¶
func GetDBUserSession ¶
GetDBUserSession gets the user session from the database based on the access token and browser info.
func GetSessionExpiration ¶
func InspectInMemoryDB ¶
InspectInMemoryDB inspects the in-memory database. (for debug purpose)
func PopulateAccountFromDB ¶
func PopulateProviderFromDB ¶
func UpdateUser ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.