Versions in this module Expand all Collapse all v0 v0.5.1 Feb 18, 2023 v0.5.0 Nov 12, 2021 Changes in this version + type Devices struct + func (d *Devices) All(ctx context.Context) ([]models.Device, error) + func (d *Devices) New(ctx context.Context, userID string, m models.Device) (string, error) + func (d *Devices) OfUser(ctx context.Context, userID string) ([]models.Device, error) + func (d *Devices) Read(ctx context.Context, id string) (*models.Device, error) + func (d *Devices) Remove(ctx context.Context, id string) error + type Factory struct + DevicesStorage *Devices + TwoFactorStorage *TwoFactor + UsersStorage *Users + func NewFactory(filename string) (*Factory, func() error, error) + func (f *Factory) Devices() storage.Devices + func (f *Factory) TwoFactor() storage.TwoFactor + func (f *Factory) Users() storage.Users + type TwoFactor struct + func (tf *TwoFactor) Get(ctx context.Context, userID string) (*models.TwoFactor, error) + func (tf *TwoFactor) Remove(ctx context.Context, userID string) error + func (tf *TwoFactor) Update(ctx context.Context, userID string, f func(*models.TwoFactor) error) error + type Users struct + func (s *Users) All(ctx context.Context) ([]storage.UserEntry, error) + func (s *Users) New(ctx context.Context, u storage.UserEntry) (string, error) + func (s *Users) Read(ctx context.Context, id string) (*storage.UserEntry, error) + func (s *Users) Remove(ctx context.Context, id string) error + func (s *Users) Update(ctx context.Context, id string, f func(*storage.UserEntry) error) error