Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hasher ¶
type Hasher interface { // Hash generates the hashed string from plain-text. Hash(string) (string, error) // Compare compares plain-text version to the hashed one. An error should // indicate failed comparison. Compare(string, string) error }
Hasher specifies an API for generating hashes of an arbitrary textual content.
type Metadata ¶
type Metadata map[string]interface{}
Metadata to be used for storing user arrbitary data
type Service ¶
type Service interface { // Register creates new user account. Register(u User) (id string, err error) // Login verifies provided Email/Password with record in DB Login(email, password string) (u User, err error) // Retrieves user info for a given user ID. Get(id string) (u User, err error) // GetByEmail retrives user for a given email. GetByEmail(email string) (u User, err error) // Update updates user account Update(u User) error }
Service specifies users API
func NewUsersService ¶
func NewUsersService(repo UserRepository, logger logger.Logger) Service
NewUsersService init Service
Click to show internal directories.
Click to hide internal directories.