Discover Packages
github.com/naiiytom/auth_connector
internal
user
package
Version:
v0.0.0-...-a4b3353
Opens a new window with list of versions in this module.
Published: Jan 11, 2024
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
View Source
var (
ErrNotFound = errors .New ("User not found")
ErrInvalidID = errors .New ("ID is not in its proper format")
ErrAuthenticationFailure = errors .New ("Authentication Failed")
ErrForbidden = errors .New ("Attempted action is not allowd")
)
type JwtUserTokenResponse struct {
Token string `json:"token"`
}
type LoginUser struct {
UserName string `json:"username"`
Password string `json:"password"`
}
type NewUser struct {
Name string `json:"name" validate:"required"`
Email string `json:"email" validate:"required"`
Password string `json:"password" validate:"required"`
}
type RefreshToken struct {
RefreshToken string `json:"refresh_token"`
}
type User struct {
ID string `db:"user_id" json:"id"`
Name string `db:"name" json:"name"`
Email string `db:"email" json:"email"`
PasswordHash []byte `db:"password_hash" json:"-"`
DateCreated time .Time `db:"date_created" json:"date_created"`
DateUpdated time .Time `db:"date_updated" json:"date_updated"`
}
type WebUser struct {
ID string `json:"id"`
Email string `json:"email"`
Username string `json:"username"`
IsAdmin string `json:"admin"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.