sqlite

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoUsersAffected = fmt.Errorf("database: no users affected on update")

	Base64Encoder = base64.URLEncoding.WithPadding(base64.NoPadding)
)

Functions

This section is empty.

Types

type SQLite

type SQLite struct {
	// contains filtered or unexported fields
}

func NewSQLiteFromConfig

func NewSQLiteFromConfig() (*SQLite, error)

func (*SQLite) Close

func (s *SQLite) Close() error

func (*SQLite) CreateUser

func (s *SQLite) CreateUser(ctx context.Context, user *user.User) error

func (*SQLite) DeleteKey

func (s *SQLite) DeleteKey(ctx context.Context, keyID string) error

func (*SQLite) DeleteUser

func (s *SQLite) DeleteUser(ctx context.Context, userId string) error

func (*SQLite) FindKeyById

func (s *SQLite) FindKeyById(ctx context.Context, keyID string) (user.Passkey, error)

func (*SQLite) FindUserByCredentialInfo

func (s *SQLite) FindUserByCredentialInfo(ctx context.Context, rid []byte, handle []byte) (*user.User, error)

func (*SQLite) GetAllUsers

func (s *SQLite) GetAllUsers(ctx context.Context) ([]*user.AdminListUser, error)

func (*SQLite) GetUserByGuid

func (s *SQLite) GetUserByGuid(ctx context.Context, guid string) (*user.User, error)

TODO: refactor this common code between GetUserByX functions

func (*SQLite) GetUserByUsername

func (s *SQLite) GetUserByUsername(ctx context.Context, username string) (*user.User, error)

func (*SQLite) NeedsSetup

func (s *SQLite) NeedsSetup(ctx context.Context) (bool, error)

func (*SQLite) SaveCredentialForUser

func (s *SQLite) SaveCredentialForUser(ctx context.Context, userId string, credential *webauthn.Credential) error

func (*SQLite) SaveUser

func (s *SQLite) SaveUser(ctx context.Context, user *user.User) error

func (*SQLite) SetUserEnabled

func (s *SQLite) SetUserEnabled(ctx context.Context, userId string, enabled bool) error

func (*SQLite) UpdateCredentialOnLogin

func (s *SQLite) UpdateCredentialOnLogin(ctx context.Context, credential *webauthn.Credential) error

func (*SQLite) UpdateKeyName

func (s *SQLite) UpdateKeyName(ctx context.Context, keyID string, name *string) error

func (*SQLite) UpdatePassword

func (s *SQLite) UpdatePassword(ctx context.Context, user *user.User) error

func (*SQLite) UpdateTOTPSeed

func (s *SQLite) UpdateTOTPSeed(ctx context.Context, userID string, secret string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL