Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound is returned when a user being fetched does not exist. ErrNotFound = errors.New("user not found") // ErrAlreadyExists is returned when a new user record is being added already // exists. ErrAlreadyExists = errors.New("user already exists") )
Functions ¶
This section is empty.
Types ¶
type Record ¶
type Record struct { ID *user.UserID View *user.View IsStaffUser bool IsBanned bool CreatedAt time.Time }
User is the highest order of a form of identity.
type Store ¶
type Store interface { // Put creates a new user. Put(ctx context.Context, record *Record) error // GetByID fetches a user by its ID. GetByID(ctx context.Context, id *user.UserID) (*Record, error) // GetByView fetches a user by a view. GetByView(ctx context.Context, view *user.View) (*Record, error) }
Store manages a user's identity.
Click to show internal directories.
Click to hide internal directories.