Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppConfig ¶
type AppConfig struct { Encryption Encryption Jwt JwtConfig Auth AuthConfig }
Reusable config goes here
type AuthConfig ¶
type AuthConfig struct {
ExcludedMethods []string
}
type Encryption ¶
type IsUserExistRequest ¶
type IsUserExistResponse ¶
type LoginRequest ¶
type LoginRequest struct { UserId string Password string LoginMethod constant.LoginMethod DeviceInfo DeviceInfo }
func (*LoginRequest) ToUserDevice ¶
func (l *LoginRequest) ToUserDevice(userId uint64) *UserDevice
type LoginResponse ¶
type RegisterRequest ¶
type RegisterRequest struct { Name string Email string PhoneNumber string Username string PlainPassword string UserPassword string MasterPassword string }
func (*RegisterRequest) ToUser ¶
func (r *RegisterRequest) ToUser() *User
type RegisterResponse ¶
type Token ¶
type Token struct { AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token"` }
func (Token) MarshalBinary ¶
MarshalBinary fulfills encoding.BinaryMarshaler implementation.
type User ¶
type User struct { Id uint64 `db:"id"` Name string `db:"name"` Email string `db:"email"` Username sql.NullString `db:"username"` PhoneNumber sql.NullString `db:"phone_number"` Password string `db:"password"` MasterPassword string `db:"master_password"` IsBlocked bool `db:"is_blocked"` Roles []string Timestamp }
type UserDevice ¶
type UserDevice struct { Id uint64 `db:"id"` UserId uint64 `db:"user_id"` DeviceId string `db:"device_id"` DeviceName string `db:"device_name"` DeviceModel string `db:"device_model"` OSName string `db:"os_name"` OSVersion string `db:"os_version"` LastLogin time.Time `db:"last_login"` IsRevoked bool `db:"is_revoked"` }
Click to show internal directories.
Click to hide internal directories.