models

package
v0.0.0-...-c8da4de Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticationRequest

type AuthenticationRequest struct {
	Username string `json:"username" validate:"required"`
	Password string `json:"password" validate:"required"`
}

type AuthenticationResponse

type AuthenticationResponse struct {
	Token            string   `json:"token"`
	RefreshToken     string   `json:"refreshToken,omitempty"`
	Roles            []string `json:"roles,omitempty"`
	Expires          int      `json:"expiresIn,omitempty"`
	TwoFactorEnabled bool     `json:"twoFactorEnabled"`
	TwoFactorMethod  string   `json:"twoFactorMethod,omitempty"`
}

type CompletePasswordLessRequest

type CompletePasswordLessRequest struct {
	RequestId string `json:"requestId" validate:"required"`
	Code      string `json:"code" validate:"required"`
}

type EnableTOTPResponse

type EnableTOTPResponse struct {
	URL string `json:"url"`
}

type EnableTwoFactorRequest

type EnableTwoFactorRequest struct {
	Method string `json:"method"`
}

type GeneralErrorResponse

type GeneralErrorResponse struct {
	Success      bool   `json:"success"`
	ErrorMessage string `json:"errorMessage"`
	Status       int    `json:"status"`
}

type JSONB

type JSONB map[string]interface{}

JSONB Interface

func (*JSONB) Scan

func (j *JSONB) Scan(value interface{}) error

Scan Unmarshal

func (JSONB) Value

func (j JSONB) Value() (driver.Value, error)

Value Marshal

type PasswordLessAuthRequest

type PasswordLessAuthRequest struct {
	Username   string `json:"username"`
	SendMethod string `json:"sendMethod"`
}

type PasswordLessAuthResponse

type PasswordLessAuthResponse struct {
	RequestId  string `json:"requestId" validate:"required"`
	SendMethod string `json:"sendMethod" validate:"required"`
}

type PasswordResetRequest

type PasswordResetRequest struct {
	Username string `json:"username" validate:"required"`
}

type SuccessResponse

type SuccessResponse struct {
	Success bool `json:"success"`
}

type TokenRefreshRequest

type TokenRefreshRequest struct {
	RefreshToken string `json:"refreshToken"`
}

type User

type User struct {
	ID               int      `json:"-"`
	UUID             string   `json:"id"`
	Username         string   `json:"username"`
	EmailAddress     string   `json:"emailAddress"`
	FirstName        string   `json:"firstName"`
	LastName         string   `json:"lastName"`
	CellNumber       string   `json:"cellNumber"`
	Roles            []string `json:"roles"`
	Active           bool     `json:"active"`
	TwoFactorEnabled bool     `json:"twoFactorEnabled"`
	TwoFactorMethod  string   `json:"twoFactorMethod"`
	TOTPSecret       string   `json:"-"`
	TOTPURL          string   `json:"-"`
	Metadata         JSONB    `json:"metadata"`
}

type UserRegistrationRequest

type UserRegistrationRequest struct {
	Username     string `json:"username" validate:"required"`
	Password     string `json:"password" validate:"required"`
	EmailAddress string `json:"emailAddress" validate:"required"`
	FirstName    string `json:"firstName" validate:"required"`
	LastName     string `json:"lastName" validate:"required"`
	CellNumber   string `json:"cellNumber" validate:"required"`
}

type UserUpdateRequest

type UserUpdateRequest struct {
	EmailAddress                 string `json:"emailAddress"`
	FirstName                    string `json:"firstName"`
	LastName                     string `json:"lastName"`
	CellNumber                   string `json:"cellNumber"`
	AllowTwoFactorAuthentication bool   `json:"allowTwoFactorAuthentication"`
	Metadata                     JSONB  `json:"metadata"`
}

type VerifyChangePasswordRequest

type VerifyChangePasswordRequest struct {
	Code     string `json:"code" validate:"required"`
	Password string `json:"password" validate:"required"`
}

type VerifyPassCodeRequest

type VerifyPassCodeRequest struct {
	Code string `json:"code"`
}

type VerifyTwoFactorRequest

type VerifyTwoFactorRequest struct {
	Method string `json:"method" validate:"required"`
	Token  string `json:"token" validate:"required"`
	Code   string `json:"code" validate:"required"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL