models

package
v0.0.66 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: GPL-3.0 Imports: 8 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeSymbolsNumbersAndCapitalLatinLetters added in v0.0.66

func MakeSymbolsNumbersAndCapitalLatinLetters() (symbols []rune)

Types

type EmailChange

type EmailChange struct {
	Id             base2.Id
	UserId         base2.Id
	TimeOfCreation time.Time
	RequestId      *simple.RequestId

	// IP address of a user. B = Byte array.
	UserIPAB net.IP

	AuthDataBytes     cmr.AuthChallengeData
	IsCaptchaRequired base2.Flag
	CaptchaId         *simple.CaptchaId
	EmailChangeVerificationFlags

	// Old e-mail.
	VerificationCodeOld *simple.VerificationCode
	IsOldEmailSent      base2.Flag

	// New e-mail.
	NewEmail            simple.Email
	VerificationCodeNew *simple.VerificationCode
	IsNewEmailSent      base2.Flag
}

func NewEmailChange

func NewEmailChange() (ec *EmailChange)

func NewEmailChangeFromScannableSource

func NewEmailChangeFromScannableSource(src cmi.IScannable) (ec *EmailChange, err error)

type EmailChangeVerificationFlags

type EmailChangeVerificationFlags struct {
	IsVerifiedByCaptcha  *base2.Flag
	IsVerifiedByPassword base2.Flag
	IsVerifiedByOldEmail base2.Flag
	IsVerifiedByNewEmail base2.Flag
}

type PasswordChange

type PasswordChange struct {
	Id             base2.Id
	UserId         base2.Id
	TimeOfCreation time.Time
	RequestId      *simple.RequestId

	// IP address of a user. B = Byte array.
	UserIPAB net.IP

	AuthDataBytes        cmr.AuthChallengeData
	IsCaptchaRequired    base2.Flag
	CaptchaId            *simple.CaptchaId
	IsVerifiedByCaptcha  *base2.Flag
	IsVerifiedByPassword base2.Flag
	VerificationCode     *simple.VerificationCode
	IsEmailSent          base2.Flag
	IsVerifiedByEmail    base2.Flag
	NewPasswordBytes     []byte
}

func NewPasswordChange

func NewPasswordChange() (pc *PasswordChange)

func NewPasswordChangeFromScannableSource

func NewPasswordChangeFromScannableSource(src cmi.IScannable) (pc *PasswordChange, err error)

type PasswordChangeVerificationFlags

type PasswordChangeVerificationFlags struct {
	IsVerifiedByCaptcha  *base2.Flag
	IsVerifiedByPassword base2.Flag
	IsVerifiedByEmail    base2.Flag
}

type PreSession

type PreSession struct {
	Id             base2.Id
	UserId         base2.Id
	TimeOfCreation time.Time
	RequestId      simple.RequestId

	// IP address of a user. B = Byte array.
	UserIPAB net.IP

	AuthDataBytes        cmr.AuthChallengeData
	IsCaptchaRequired    base2.Flag
	CaptchaId            *simple.CaptchaId
	IsVerifiedByCaptcha  *base2.Flag
	IsVerifiedByPassword base2.Flag

	// Verification code is set on Step 2, so it is NULL on Step 1.
	VerificationCode *simple.VerificationCode

	IsEmailSent       base2.Flag
	IsVerifiedByEmail base2.Flag
}

func NewPreSession

func NewPreSession() (ps *PreSession)

func NewPreSessionFromScannableSource

func NewPreSessionFromScannableSource(src cmi.IScannable) (ps *PreSession, err error)

type RegistrationReadyForApproval added in v0.0.21

type RegistrationReadyForApproval struct {
	Id         cmb.Id       `json:"id"`
	PreRegTime time.Time    `json:"preRegTime"`
	Email      simple.Email `json:"email"`
	Name       *simple.Name `json:"name"`
}

RegistrationReadyForApproval is a short variant of an object representing a request for registration which is ready to be approved.

func NewRegistrationReadyForApproval added in v0.0.21

func NewRegistrationReadyForApproval() (r *RegistrationReadyForApproval)

func NewRegistrationReadyForApprovalArrayFromRows added in v0.0.64

func NewRegistrationReadyForApprovalArrayFromRows(rows base.IScannableSequence) (rs []RegistrationReadyForApproval, err error)

func NewRegistrationReadyForApprovalFromScannableSource added in v0.0.21

func NewRegistrationReadyForApprovalFromScannableSource(src base.IScannable) (r *RegistrationReadyForApproval, err error)

type Session

type Session struct {
	Id        cmb.Id    `json:"id"`
	UserId    cmb.Id    `json:"userId"`
	StartTime time.Time `json:"startTime"`

	// IP address of a user. B = Byte array.
	UserIPAB net.IP `json:"userIPA"`
}

func NewSession

func NewSession() (s *Session)

func NewSessionFromScannableSource

func NewSessionFromScannableSource(src cmi.IScannable) (s *Session, err error)

Directories

Path Synopsis
complex

Jump to

Keyboard shortcuts

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