Documentation ¶
Index ¶
- Variables
- func InitDuplicateUserMetrics()
- func ProvideAuthInfoStore(sqlStore db.DB, secretsService secrets.Service, userService user.Service) login.Store
- type AuthInfoStore
- func (s *AuthInfoStore) CollectLoginStats(ctx context.Context) (map[string]interface{}, error)
- func (s *AuthInfoStore) DeleteAuthInfo(ctx context.Context, cmd *login.DeleteAuthInfoCommand) error
- func (s *AuthInfoStore) DeleteUserAuthInfo(ctx context.Context, userID int64) error
- func (s *AuthInfoStore) GetAuthInfo(ctx context.Context, query *login.GetAuthInfoQuery) (*login.UserAuth, error)
- func (s *AuthInfoStore) GetExternalUserInfoByLogin(ctx context.Context, query *login.GetExternalUserInfoByLoginQuery) (*login.ExternalUserInfo, error)
- func (s *AuthInfoStore) GetLoginStats(ctx context.Context) (login.LoginStats, error)
- func (s *AuthInfoStore) GetUserByEmail(ctx context.Context, email string) (*user.User, error)
- func (s *AuthInfoStore) GetUserById(ctx context.Context, id int64) (*user.User, error)
- func (s *AuthInfoStore) GetUserByLogin(ctx context.Context, login string) (*user.User, error)
- func (s *AuthInfoStore) GetUserLabels(ctx context.Context, query login.GetUserLabelsQuery) (map[int64]string, error)
- func (s *AuthInfoStore) RunMetricsCollection(ctx context.Context) error
- func (s *AuthInfoStore) SetAuthInfo(ctx context.Context, cmd *login.SetAuthInfoCommand) error
- func (s *AuthInfoStore) UpdateAuthInfo(ctx context.Context, cmd *login.UpdateAuthInfoCommand) error
- func (s *AuthInfoStore) UpdateAuthInfoDate(ctx context.Context, authInfo *login.UserAuth) error
Constants ¶
This section is empty.
Variables ¶
View Source
var GetTime = time.Now
Functions ¶
func InitDuplicateUserMetrics ¶
func InitDuplicateUserMetrics()
Should be in use in ProvideAuthInfoStore due to query performance for big user tables we have disabled these metrics from Grafana for now
Types ¶
type AuthInfoStore ¶
type AuthInfoStore struct {
// contains filtered or unexported fields
}
func (*AuthInfoStore) CollectLoginStats ¶
func (s *AuthInfoStore) CollectLoginStats(ctx context.Context) (map[string]interface{}, error)
func (*AuthInfoStore) DeleteAuthInfo ¶
func (s *AuthInfoStore) DeleteAuthInfo(ctx context.Context, cmd *login.DeleteAuthInfoCommand) error
func (*AuthInfoStore) DeleteUserAuthInfo ¶
func (s *AuthInfoStore) DeleteUserAuthInfo(ctx context.Context, userID int64) error
func (*AuthInfoStore) GetAuthInfo ¶
func (s *AuthInfoStore) GetAuthInfo(ctx context.Context, query *login.GetAuthInfoQuery) (*login.UserAuth, error)
GetAuthInfo returns the auth info for a user It will return the latest auth info for a user
func (*AuthInfoStore) GetExternalUserInfoByLogin ¶
func (s *AuthInfoStore) GetExternalUserInfoByLogin(ctx context.Context, query *login.GetExternalUserInfoByLoginQuery) (*login.ExternalUserInfo, error)
func (*AuthInfoStore) GetLoginStats ¶
func (s *AuthInfoStore) GetLoginStats(ctx context.Context) (login.LoginStats, error)
func (*AuthInfoStore) GetUserByEmail ¶
func (*AuthInfoStore) GetUserById ¶
func (*AuthInfoStore) GetUserByLogin ¶
func (*AuthInfoStore) GetUserLabels ¶
func (s *AuthInfoStore) GetUserLabels(ctx context.Context, query login.GetUserLabelsQuery) (map[int64]string, error)
func (*AuthInfoStore) RunMetricsCollection ¶
func (s *AuthInfoStore) RunMetricsCollection(ctx context.Context) error
func (*AuthInfoStore) SetAuthInfo ¶
func (s *AuthInfoStore) SetAuthInfo(ctx context.Context, cmd *login.SetAuthInfoCommand) error
func (*AuthInfoStore) UpdateAuthInfo ¶
func (s *AuthInfoStore) UpdateAuthInfo(ctx context.Context, cmd *login.UpdateAuthInfoCommand) error
func (*AuthInfoStore) UpdateAuthInfoDate ¶
UpdateAuthInfoDate updates the auth info for the user with the latest date. Avoids overlapping entries hiding the last used one (ex: LDAP->SAML->LDAP).
Click to show internal directories.
Click to hide internal directories.