Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPassword ¶
func HashPassword ¶
HashPassword hashes a given password string using bcrypt with bcrypt DefaultCost
Types ¶
type Repository ¶
type Repository interface { Begin() Commit() Rollback() GetUserAuthByEmail(string) User GetUserAuthByID(int64) User UpdateUserRememberToken(User) int64 }
Repository provides access to User repository.
type Service ¶
type Service interface { SignIn(UserSignIn) (string, error) CheckJWT(string) error GetCookiePayload(string) (UserJWT, error) }
Service provides authing operations.
func NewService ¶
func NewService(r Repository, key string) Service
NewService provides a new auth service
type UserChangePassword ¶
type UserSignIn ¶
Click to show internal directories.
Click to hide internal directories.