Documentation
¶
Index ¶
- type Devices
- 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
- type TwoFactor
- type Users
- 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
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Devices ¶
type Devices struct {
// contains filtered or unexported fields
}
Devices storage implements storage.Devices interface for sqlite database.
func (*Devices) New ¶
New stores given devices data in database and returns id of new device (given with input model).
type Factory ¶
Factory implements storage factory interface.
func NewFactory ¶
NewFactory returns Factory, database closer for sqlite connection and error if something went wrong.
type TwoFactor ¶
type TwoFactor struct {
// contains filtered or unexported fields
}
TwoFactor storage implements storage.TwoFactor interface for sqlite database.
type Users ¶
type Users struct {
// contains filtered or unexported fields
}
Users storage implements storage.Users interface for sqlite database.
Click to show internal directories.
Click to hide internal directories.