Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserRepo ¶
type UserRepo interface { Add(User) error Get(string) (User, error) Remove(string) error Update(User) error }
GameRepo is an interface for a game repository.
type UserRepoStorage ¶
func (UserRepoStorage) Add ¶
func (grs UserRepoStorage) Add(g User) error
Add adds a user to the repository.
func (UserRepoStorage) Get ¶
func (grs UserRepoStorage) Get(id string) (User, error)
Get returns a user from the repository.
func (UserRepoStorage) Remove ¶
func (grs UserRepoStorage) Remove(id string) error
Remove removes a user from the repository.
func (UserRepoStorage) Update ¶
func (grs UserRepoStorage) Update(g User) error
Update updates a user in the repository.
type UserService ¶
type UserService struct {
UserRepo UserRepo
}
func NewUserService ¶
func NewUserService(ur UserRepo) UserService
Click to show internal directories.
Click to hide internal directories.