Documentation ¶
Index ¶
Constants ¶
View Source
const ( HashVerificationAccountTypeVerify = "Verify Your Email" HashVerificationAccountTypeResetPass = "Reset Your Password" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { AccountPublic Password string ` json:"password" db:"password" gorm:"type:varchar(255)"` }
type AccountPublic ¶
type AccountPublic struct { Base Email string `json:"email" tsense_default_sort:"1" tsense_sort:"1" db:"email" gorm:"type:varchar(255);index;unique"` IsVerified bool `json:"is_verified" db:"is_verified"` IsSSO bool `json:"is_sso" db:"is_sso"` // is an sso account SSOType string `json:"sso_type" db:"sso_type"` }
func (AccountPublic) GetAccountID ¶
func (a AccountPublic) GetAccountID() string
type Base ¶
type Base struct { ID string `json:"id" db:"id" gorm:"type:VARCHAR(100);primary"` CreatedAt types.Timestamp `json:"created_at" db:"created_at"` UpdatedAt types.Timestamp `json:"updated_at" db:"updated_at"` IsDeleted bool `json:"is_deleted" db:"is_deleted" gorm:"type:TINYINT(1);index"` }
Base : attach this as a base model using uuid
type BaseOwned ¶
type BaseOwned struct { Base AccountID string `json:"account_id" db:"account_id" gorm:"type:VARCHAR(255);index"` }
BaseOwned : use this for entities that are owned and need to have an account to own them
func (BaseOwned) GetAccountID ¶
type HashVerificationAccount ¶
type HashVerificationAccount struct { ID string `json:"id" db:"id" gorm:"type:varchar(255);primary"` AccountID string `json:"account_id" db:"account_id" gorm:"type:varchar(255)"` Email string `json:"email" db:"email" gorm:"type:varchar(255)"` TTLExpiry time.Time `json:"ttl_expiry" db:"ttl_expiry"` Type string `json:"type" db:"type" gorm:"type:varchar(40)"` HasBeenUsed bool `json:"has_been_used" db:"has_been_used"` }
func (HashVerificationAccount) GetAccountID ¶
func (h HashVerificationAccount) GetAccountID() string
GetAccountID : return back the account id for the record
func (HashVerificationAccount) GetID ¶
func (h HashVerificationAccount) GetID() string
func (HashVerificationAccount) GetIDKey ¶
func (h HashVerificationAccount) GetIDKey() string
GetIDKey : return the id column name ie your "db" tag
func (HashVerificationAccount) TableName ¶
func (h HashVerificationAccount) TableName() string
type Model ¶
type Model interface { // GetID : return back the id value GetID() string // GetIDKey : return the id column name ie your "db" tag GetIDKey() string // primary index // GetAccountID : return back the account id for the record GetAccountID() string // TableName : return back the table name TableName() string // table name or e }
Model : a model definition that can be used by a repository
Click to show internal directories.
Click to hide internal directories.