Documentation ¶
Index ¶
- func CheckPasswordHash(password, hash string) bool
- func HashPassword(password string) (string, error)
- type CreatedUserDTO
- type LoginResponseDTO
- type UserAccount
- type UserAccountHandlers
- func (h *UserAccountHandlers) CreateNewUserHandler(w http.ResponseWriter, r *http.Request)
- func (h *UserAccountHandlers) GetAuthorizerContextHandler(w http.ResponseWriter, r *http.Request)
- func (h *UserAccountHandlers) LoginHandler(w http.ResponseWriter, r *http.Request)
- func (h *UserAccountHandlers) TokenAuthorizerHandler(w http.ResponseWriter, r *http.Request) error
- type UserAccountRepository
- type UserAccountRepositoryImpl
- type UserPassDTO
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
func HashPassword ¶
Types ¶
type CreatedUserDTO ¶
type LoginResponseDTO ¶
type LoginResponseDTO struct {
AccessToken string `json:"access_token"`
}
type UserAccount ¶
type UserAccountHandlers ¶
type UserAccountHandlers struct { TenantRepository tenant.TenantRepository UserAccountRepository UserAccountRepository }
func NewHandlers ¶
func NewHandlers(tenantRepository tenant.TenantRepository, userAccountRepository UserAccountRepository) *UserAccountHandlers
NewHandlers initializes and returns a new Handlers instance
func (*UserAccountHandlers) CreateNewUserHandler ¶
func (h *UserAccountHandlers) CreateNewUserHandler(w http.ResponseWriter, r *http.Request)
func (*UserAccountHandlers) GetAuthorizerContextHandler ¶
func (h *UserAccountHandlers) GetAuthorizerContextHandler(w http.ResponseWriter, r *http.Request)
func (*UserAccountHandlers) LoginHandler ¶
func (h *UserAccountHandlers) LoginHandler(w http.ResponseWriter, r *http.Request)
func (*UserAccountHandlers) TokenAuthorizerHandler ¶
func (h *UserAccountHandlers) TokenAuthorizerHandler(w http.ResponseWriter, r *http.Request) error
type UserAccountRepository ¶
type UserAccountRepository interface { InsertUserAccount(userAccount UserAccount) error SelectByUsername(username string) (*UserAccount, error) }
type UserAccountRepositoryImpl ¶
func NewUserAccountRepository ¶
func NewUserAccountRepository(db *sql.DB) *UserAccountRepositoryImpl
func (*UserAccountRepositoryImpl) InsertUserAccount ¶
func (r *UserAccountRepositoryImpl) InsertUserAccount(userAccount UserAccount) error
func (*UserAccountRepositoryImpl) SelectByUsername ¶
func (r *UserAccountRepositoryImpl) SelectByUsername(username string) (*UserAccount, error)
type UserPassDTO ¶
Click to show internal directories.
Click to hide internal directories.