Documentation
¶
Index ¶
- func DefaultDB() *gorm.DB
- type DBAuthorizationRepository
- func (ar *DBAuthorizationRepository) GetAuthorizationByAccessToken(token string) *model.Authorization
- func (ar *DBAuthorizationRepository) GetAuthorizationByCode(code string) *model.Authorization
- func (ar *DBAuthorizationRepository) GetAuthorizationByDeviceCode(device_code string) *model.Authorization
- func (ar *DBAuthorizationRepository) GetAuthorizationByRefreshToken(token string) *model.Authorization
- func (ar *DBAuthorizationRepository) GetAuthorizationByUserCode(user_code string) *model.Authorization
- func (ar *DBAuthorizationRepository) Remove(authorization *model.Authorization)
- func (ar *DBAuthorizationRepository) Save(authorization *model.Authorization)
- type DBClientRepository
- type DBConsentRepository
- type DBScopeRepository
- type DBUserRepository
- func (repo *DBUserRepository) ChangePassword(username, oldPassword, newPassword string) error
- func (repo *DBUserRepository) GetUser(userId string) (model.IUser, error)
- func (repo *DBUserRepository) GetUserByName(username string) (model.IUser, error)
- func (repo *DBUserRepository) GetUserPasswordHash(username string) (string, error)
- func (repo *DBUserRepository) ResetPassword(username string) (string, error)
- func (repo *DBUserRepository) SearchUsers(filters *models.Expression, skip int, take int) ([]models.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DBAuthorizationRepository ¶
func NewAuthorizationRepository ¶
func NewAuthorizationRepository() *DBAuthorizationRepository
func (*DBAuthorizationRepository) GetAuthorizationByAccessToken ¶
func (ar *DBAuthorizationRepository) GetAuthorizationByAccessToken(token string) *model.Authorization
func (*DBAuthorizationRepository) GetAuthorizationByCode ¶
func (ar *DBAuthorizationRepository) GetAuthorizationByCode(code string) *model.Authorization
func (*DBAuthorizationRepository) GetAuthorizationByDeviceCode ¶
func (ar *DBAuthorizationRepository) GetAuthorizationByDeviceCode(device_code string) *model.Authorization
func (*DBAuthorizationRepository) GetAuthorizationByRefreshToken ¶
func (ar *DBAuthorizationRepository) GetAuthorizationByRefreshToken(token string) *model.Authorization
func (*DBAuthorizationRepository) GetAuthorizationByUserCode ¶
func (ar *DBAuthorizationRepository) GetAuthorizationByUserCode(user_code string) *model.Authorization
func (*DBAuthorizationRepository) Remove ¶
func (ar *DBAuthorizationRepository) Remove(authorization *model.Authorization)
func (*DBAuthorizationRepository) Save ¶
func (ar *DBAuthorizationRepository) Save(authorization *model.Authorization)
type DBClientRepository ¶
func NewClientRepository ¶
func NewClientRepository() *DBClientRepository
func (*DBClientRepository) GetClientByClientID ¶
func (r *DBClientRepository) GetClientByClientID(id string) (model.IClient, error)
type DBConsentRepository ¶
func NewConsentRepository ¶
func NewConsentRepository() *DBConsentRepository
func (*DBConsentRepository) GetConsents ¶
func (r *DBConsentRepository) GetConsents(clientId string, principal string) ([]string, error)
func (*DBConsentRepository) RemoveConsents ¶
func (r *DBConsentRepository) RemoveConsents(clientId string, principal string) error
func (*DBConsentRepository) SaveConsents ¶
func (r *DBConsentRepository) SaveConsents(clientId string, principal string, scopes []string) error
type DBScopeRepository ¶
func NewScopeRepository ¶
func NewScopeRepository() *DBScopeRepository
func (*DBScopeRepository) GetSupportScopes ¶
func (r *DBScopeRepository) GetSupportScopes() ([]string, error)
type DBUserRepository ¶
func NewUserRepository ¶
func NewUserRepository() *DBUserRepository
func (*DBUserRepository) ChangePassword ¶
func (repo *DBUserRepository) ChangePassword(username, oldPassword, newPassword string) error
func (*DBUserRepository) GetUser ¶
func (repo *DBUserRepository) GetUser(userId string) (model.IUser, error)
func (*DBUserRepository) GetUserByName ¶
func (repo *DBUserRepository) GetUserByName(username string) (model.IUser, error)
func (*DBUserRepository) GetUserPasswordHash ¶
func (repo *DBUserRepository) GetUserPasswordHash(username string) (string, error)
func (*DBUserRepository) ResetPassword ¶
func (repo *DBUserRepository) ResetPassword(username string) (string, error)
Reset user password with a temporary password
func (*DBUserRepository) SearchUsers ¶
func (repo *DBUserRepository) SearchUsers(filters *models.Expression, skip int, take int) ([]models.User, error)
Click to show internal directories.
Click to hide internal directories.