Documentation ¶
Overview ¶
Package persistence holds view models and repository interfaces
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
type User interface { GetID() string GetEmail() string GetFacebookID() string GetGoogleID() string GetRole() access.Role }
User persistence model interface
type UserRepository ¶
type UserRepository interface { FindAll(ctx context.Context, limit, offset int64) ([]User, error) Get(ctx context.Context, id string) (User, error) GetByEmail(ctx context.Context, email string) (User, error) GetByFacebookID(ctx context.Context, facebookID string) (User, error) GetByGoogleID(ctx context.Context, googleID string) (User, error) Add(ctx context.Context, user User) error Delete(ctx context.Context, id string) error Count(ctx context.Context) (int64, error) UpdateEmail(ctx context.Context, id, email string) error UpdateFacebookID(ctx context.Context, id, facebookID string) error UpdateGoogleID(ctx context.Context, id, googleID string) error }
UserRepository allows to get/save user to mysql storage
Directories ¶
Path | Synopsis |
---|---|
Package memory holds view model repositories
|
Package memory holds view model repositories |
Package mysql holds view model repositories Package mysql holds view model repositories
|
Package mysql holds view model repositories Package mysql holds view model repositories |
Click to show internal directories.
Click to hide internal directories.