Documentation ¶
Index ¶
- type UserMemoryStore
- func (s *UserMemoryStore) All() []models.User
- func (s *UserMemoryStore) Create(u models.User) (models.User, error)
- func (s *UserMemoryStore) Delete(id uuid.UUID) (bool, error)
- func (s *UserMemoryStore) Exists(id uuid.UUID) (bool, error)
- func (s *UserMemoryStore) Find(id uuid.UUID) (models.User, error)
- func (s *UserMemoryStore) Reset()
- func (s *UserMemoryStore) Update(u models.User) (models.User, error)
- type UserStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserMemoryStore ¶
In Memory implementation of the UserStore interface
func NewUserMemoryStore ¶
func NewUserMemoryStore(clock clockwork.Clock) *UserMemoryStore
Constructs a new UserMemoryStore instance
func (*UserMemoryStore) All ¶
func (s *UserMemoryStore) All() []models.User
func (*UserMemoryStore) Reset ¶
func (s *UserMemoryStore) Reset()
Helper for resetting state in between tests
type UserStore ¶
type UserStore interface { All() []models.User Exists(id uuid.UUID) (bool, error) Find(id uuid.UUID) (models.User, error) Create(user models.User) (models.User, error) Update(user models.User) (models.User, error) Delete(id uuid.UUID) (bool, error) Reset() }
UserStore interface for persisting users
Click to show internal directories.
Click to hide internal directories.