Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface { GetById(id string) (*User, error) Create(u *User) error Update(u *User) error Destroy(id string) error GetByUsername(username string) (*User, error) UsernameAvailable(username, cuurentID string) bool EmailAvailable(username, cuurentID string) bool }
func NewRepository ¶
func NewRepository(db *sql.DB) Repository
type Service ¶
type Service interface { GetById(id string) (*User, error) Create(nu *NewUser) (*User, error) Update(id string, uu UpdateUser) error Destroy(id string) error Authenticate(username, password string) (auth.Claims, error) }
func NewService ¶
func NewService(ur Repository) Service
type UpdateUser ¶
Click to show internal directories.
Click to hide internal directories.