Documentation
¶
Index ¶
- Variables
- func ParseHostsText(text string) []string
- type LoginPending
- type Role
- type Store
- func (s *Store) CanAccessHost(ctx context.Context, user User, host string) (bool, error)
- func (s *Store) ClearUserTOTP(ctx context.Context, userID int64) error
- func (s *Store) Close() error
- func (s *Store) ConsumeLoginPending(ctx context.Context, id string) (LoginPending, error)
- func (s *Store) ConsumeTOTPSetupPending(ctx context.Context, userID int64) (string, error)
- func (s *Store) CountAdmins(ctx context.Context) (int, error)
- func (s *Store) CountUsers(ctx context.Context) (int, error)
- func (s *Store) CreateLoginPending(ctx context.Context, id string, userID int64, remember bool, expires time.Time) error
- func (s *Store) CreateSession(ctx context.Context, id string, userID int64, expires time.Time) error
- func (s *Store) CreateUser(ctx context.Context, email, passwordHash string, role Role) (int64, error)
- func (s *Store) DeleteLoginPending(ctx context.Context, id string) error
- func (s *Store) DeleteSession(ctx context.Context, id string) error
- func (s *Store) DeleteTOTPSetupPending(ctx context.Context, userID int64) error
- func (s *Store) DeleteUser(ctx context.Context, id int64) error
- func (s *Store) DeleteUserSessions(ctx context.Context, userID int64) error
- func (s *Store) ListDistinctHosts(ctx context.Context) ([]string, error)
- func (s *Store) ListUsers(ctx context.Context) ([]User, error)
- func (s *Store) ListUsersWithHosts(ctx context.Context) ([]UserWithHosts, error)
- func (s *Store) LoginPendingByID(ctx context.Context, id string) (LoginPending, error)
- func (s *Store) PeekTOTPSetupPending(ctx context.Context, userID int64) (secret string, ok bool, err error)
- func (s *Store) PingContext(ctx context.Context) error
- func (s *Store) SaveTOTPSetupPending(ctx context.Context, userID int64, secret string, expires time.Time) error
- func (s *Store) SessionUserID(ctx context.Context, id string) (int64, error)
- func (s *Store) SetUserHosts(ctx context.Context, userID int64, hosts []string) error
- func (s *Store) SetUserTOTPSecret(ctx context.Context, userID int64, secret string) error
- func (s *Store) UpdateUserPassword(ctx context.Context, id int64, passwordHash string) error
- func (s *Store) UpdateUserRole(ctx context.Context, id int64, role Role) error
- func (s *Store) UserByEmail(ctx context.Context, email string) (User, string, error)
- func (s *Store) UserByID(ctx context.Context, id int64) (User, error)
- func (s *Store) UserHosts(ctx context.Context, userID int64) ([]string, error)
- func (s *Store) UserTOTPEnabled(ctx context.Context, userID int64) (bool, error)
- func (s *Store) UserTOTPSecret(ctx context.Context, userID int64) (string, error)
- type User
- type UserWithHosts
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ParseHostsText ¶
Types ¶
type LoginPending ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) CanAccessHost ¶
func (*Store) ClearUserTOTP ¶
func (*Store) ConsumeLoginPending ¶
func (*Store) ConsumeTOTPSetupPending ¶
func (*Store) CreateLoginPending ¶
func (*Store) CreateSession ¶
func (*Store) CreateUser ¶
func (*Store) DeleteLoginPending ¶
func (*Store) DeleteTOTPSetupPending ¶
func (*Store) DeleteUserSessions ¶
func (*Store) ListDistinctHosts ¶
func (*Store) ListUsersWithHosts ¶
func (s *Store) ListUsersWithHosts(ctx context.Context) ([]UserWithHosts, error)
func (*Store) LoginPendingByID ¶
func (*Store) PeekTOTPSetupPending ¶
func (*Store) SaveTOTPSetupPending ¶
func (*Store) SessionUserID ¶
func (*Store) SetUserHosts ¶
func (*Store) SetUserTOTPSecret ¶
func (*Store) UpdateUserPassword ¶
func (*Store) UpdateUserRole ¶
func (*Store) UserByEmail ¶
func (*Store) UserTOTPEnabled ¶
type UserWithHosts ¶
Click to show internal directories.
Click to hide internal directories.