Documentation
¶
Index ¶
- type AddOrUpdateEmailParams
- type AddUserAutoUserIdParams
- type AddUserBaseParams
- type AddUserHaveUserIdParams
- type DBTX
- type DecreaseTicketV1Params
- type DecreaseTicketV2Params
- type DisableTwoFactorParams
- type EditUserByUserIdParams
- type EnableTwoFactorTypeEmailParams
- type FindUsersParams
- type GetInfoOTPRow
- type GetOneUserInfoAdminRow
- type GetOneUserInfoRow
- type GetTicketItemByIdRow
- type GetTwoFactorMethodByIDAndByTypeParams
- type GetTwoFactorMethodByIDAndByTypeRow
- type GetTwoFactorMethodByIDRow
- type GetTwoFactorStatusParams
- type GetUserByEmailSQLCRow
- type GetUserTwoFactoryMethodsRow
- type GetValidOtpRow
- type GoCrmUser
- type InsertOTPVerifyParams
- type ListUsersParams
- type LoginUserBaseParams
- type NullPreGoAccUserTwoFactor9999TwoFactorAuthType
- type PreGoAccUserBase9999
- type PreGoAccUserInfo9999
- type PreGoAccUserTwoFactor9999
- type PreGoAccUserTwoFactor9999TwoFactorAuthType
- type PreGoAccUserVerify9999
- type Queries
- func (q *Queries) AddOrUpdateEmail(ctx context.Context, arg AddOrUpdateEmailParams) error
- func (q *Queries) AddUserAutoUserId(ctx context.Context, arg AddUserAutoUserIdParams) (sql.Result, error)
- func (q *Queries) AddUserBase(ctx context.Context, arg AddUserBaseParams) (sql.Result, error)
- func (q *Queries) AddUserHaveUserId(ctx context.Context, arg AddUserHaveUserIdParams) (sql.Result, error)
- func (q *Queries) CheckTicketItemExists(ctx context.Context, id int64) (int64, error)
- func (q *Queries) CheckUserBaseExists(ctx context.Context, userAccount string) (int64, error)
- func (q *Queries) DecreaseTicketV1(ctx context.Context, arg DecreaseTicketV1Params) (sql.Result, error)
- func (q *Queries) DecreaseTicketV2(ctx context.Context, arg DecreaseTicketV2Params) (sql.Result, error)
- func (q *Queries) DisableTwoFactor(ctx context.Context, arg DisableTwoFactorParams) error
- func (q *Queries) EditUserByUserId(ctx context.Context, arg EditUserByUserIdParams) (sql.Result, error)
- func (q *Queries) EnableTwoFactorTypeEmail(ctx context.Context, arg EnableTwoFactorTypeEmailParams) error
- func (q *Queries) FindUsers(ctx context.Context, arg FindUsersParams) ([]PreGoAccUserInfo9999, error)
- func (q *Queries) GetInfoOTP(ctx context.Context, verifyKeyHash string) (GetInfoOTPRow, error)
- func (q *Queries) GetOneUserInfo(ctx context.Context, userAccount string) (GetOneUserInfoRow, error)
- func (q *Queries) GetOneUserInfoAdmin(ctx context.Context, userAccount string) (GetOneUserInfoAdminRow, error)
- func (q *Queries) GetTicketItemById(ctx context.Context, id int64) (GetTicketItemByIdRow, error)
- func (q *Queries) GetTwoFactorMethodByID(ctx context.Context, userID uint32) (GetTwoFactorMethodByIDRow, error)
- func (q *Queries) GetTwoFactorMethodByIDAndByType(ctx context.Context, arg GetTwoFactorMethodByIDAndByTypeParams) (GetTwoFactorMethodByIDAndByTypeRow, error)
- func (q *Queries) GetTwoFactorStatus(ctx context.Context, arg GetTwoFactorStatusParams) (bool, error)
- func (q *Queries) GetUser(ctx context.Context, userID uint64) (PreGoAccUserInfo9999, error)
- func (q *Queries) GetUserByEmailSQLC(ctx context.Context, usrEmail string) (GetUserByEmailSQLCRow, error)
- func (q *Queries) GetUserTwoFactoryMethods(ctx context.Context, userID uint32) ([]GetUserTwoFactoryMethodsRow, error)
- func (q *Queries) GetUsers(ctx context.Context, userID uint64) ([]PreGoAccUserInfo9999, error)
- func (q *Queries) GetValidOtp(ctx context.Context, verifyKeyHash string) (GetValidOtpRow, error)
- func (q *Queries) InsertOTPVerify(ctx context.Context, arg InsertOTPVerifyParams) (sql.Result, error)
- func (q *Queries) IsTwoFactorEnabled(ctx context.Context, userID uint32) (int64, error)
- func (q *Queries) ListUsers(ctx context.Context, arg ListUsersParams) ([]PreGoAccUserInfo9999, error)
- func (q *Queries) LoginUserBase(ctx context.Context, arg LoginUserBaseParams) error
- func (q *Queries) LogoutUserBase(ctx context.Context, userAccount string) error
- func (q *Queries) ReactivateTwoFactor(ctx context.Context, arg ReactivateTwoFactorParams) error
- func (q *Queries) RemoveTwoFactor(ctx context.Context, arg RemoveTwoFactorParams) error
- func (q *Queries) RemoveUser(ctx context.Context, userID uint64) error
- func (q *Queries) UpdatePassword(ctx context.Context, arg UpdatePasswordParams) error
- func (q *Queries) UpdateTwoFactorStatus(ctx context.Context, arg UpdateTwoFactorStatusParams) error
- func (q *Queries) UpdateUserStatusByUserId(ctx context.Context) error
- func (q *Queries) UpdateUserVerificationStatus(ctx context.Context, verifyKeyHash string) error
- func (q *Queries) VerifyTwoFactor(ctx context.Context, arg VerifyTwoFactorParams) (int64, error)
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type ReactivateTwoFactorParams
- type RemoveTwoFactorParams
- type TicketItem
- type UpdatePasswordParams
- type UpdateTwoFactorStatusParams
- type VerifyTwoFactorParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddOrUpdateEmailParams ¶
type AddOrUpdateEmailParams struct { UserID uint32 TwoFactorEmail sql.NullString TwoFactorEmail_2 sql.NullString }
type AddUserAutoUserIdParams ¶
type AddUserAutoUserIdParams struct { UserAccount string UserNickname sql.NullString UserAvatar sql.NullString UserState uint8 UserMobile sql.NullString UserGender sql.NullInt16 UserBirthday sql.NullTime UserEmail sql.NullString UserIsAuthentication uint8 }
type AddUserBaseParams ¶
type AddUserHaveUserIdParams ¶
type AddUserHaveUserIdParams struct { UserID uint64 UserAccount string UserNickname sql.NullString UserAvatar sql.NullString UserState uint8 UserMobile sql.NullString UserGender sql.NullInt16 UserBirthday sql.NullTime UserEmail sql.NullString UserIsAuthentication uint8 }
type DecreaseTicketV1Params ¶
type DecreaseTicketV2Params ¶
type DisableTwoFactorParams ¶
type DisableTwoFactorParams struct { UserID uint32 TwoFactorAuthType PreGoAccUserTwoFactor9999TwoFactorAuthType }
type EditUserByUserIdParams ¶
type EditUserByUserIdParams struct { UserNickname sql.NullString UserAvatar sql.NullString UserMobile sql.NullString UserGender sql.NullInt16 UserBirthday sql.NullTime UserEmail sql.NullString UserID uint64 }
type EnableTwoFactorTypeEmailParams ¶
type EnableTwoFactorTypeEmailParams struct { UserID uint32 TwoFactorAuthType PreGoAccUserTwoFactor9999TwoFactorAuthType TwoFactorEmail sql.NullString }
type FindUsersParams ¶
type FindUsersParams struct { UserAccount string UserNickname sql.NullString }
type GetInfoOTPRow ¶
type GetOneUserInfoAdminRow ¶
type GetOneUserInfoRow ¶
type GetTicketItemByIdRow ¶
type GetTwoFactorMethodByIDAndByTypeParams ¶
type GetTwoFactorMethodByIDAndByTypeParams struct { UserID uint32 TwoFactorAuthType PreGoAccUserTwoFactor9999TwoFactorAuthType }
type GetTwoFactorMethodByIDAndByTypeRow ¶
type GetTwoFactorMethodByIDAndByTypeRow struct { UserID uint32 TwoFactorAuthType PreGoAccUserTwoFactor9999TwoFactorAuthType TwoFactorAuthSecret string TwoFactorEmail sql.NullString TwoFactorPhone sql.NullString TwoFactorIsActive bool TwoFactorCreatedAt sql.NullTime TwoFactorUpdatedAt sql.NullTime }
type GetTwoFactorMethodByIDRow ¶
type GetTwoFactorMethodByIDRow struct { UserID uint32 TwoFactorAuthType PreGoAccUserTwoFactor9999TwoFactorAuthType TwoFactorAuthSecret string TwoFactorEmail sql.NullString TwoFactorPhone sql.NullString TwoFactorIsActive bool TwoFactorCreatedAt sql.NullTime TwoFactorUpdatedAt sql.NullTime }
type GetTwoFactorStatusParams ¶
type GetTwoFactorStatusParams struct { UserID uint32 TwoFactorAuthType PreGoAccUserTwoFactor9999TwoFactorAuthType }
type GetUserByEmailSQLCRow ¶
type GetUserTwoFactoryMethodsRow ¶
type GetUserTwoFactoryMethodsRow struct { UserID uint32 TwoFactorAuthType PreGoAccUserTwoFactor9999TwoFactorAuthType TwoFactorAuthSecret string TwoFactorEmail sql.NullString TwoFactorPhone sql.NullString TwoFactorIsActive bool TwoFactorCreatedAt sql.NullTime TwoFactorUpdatedAt sql.NullTime }
type GetValidOtpRow ¶
type GoCrmUser ¶
type GoCrmUser struct { // Account ID UsrID uint32 // Email UsrEmail string // Phone Number UsrPhone string // Username UsrUsername string // Password UsrPassword string // Created Time UsrCreatedAt int32 // Updated Time UsrUpdatedAt int32 // Created IP UsrCreateIpAt string // Last Login Time UsrLastLoginAt int32 // Last Login IP UsrLastLoginIpAt string // Login Times UsrLoginTimes int32 // Status UsrStatus bool }
Account
type InsertOTPVerifyParams ¶
type ListUsersParams ¶
type LoginUserBaseParams ¶
type LoginUserBaseParams struct { UserLoginIp sql.NullString UserAccount string UserPassword string }
type NullPreGoAccUserTwoFactor9999TwoFactorAuthType ¶
type NullPreGoAccUserTwoFactor9999TwoFactorAuthType struct { PreGoAccUserTwoFactor9999TwoFactorAuthType PreGoAccUserTwoFactor9999TwoFactorAuthType Valid bool // Valid is true if PreGoAccUserTwoFactor9999TwoFactorAuthType is not NULL }
func (*NullPreGoAccUserTwoFactor9999TwoFactorAuthType) Scan ¶
func (ns *NullPreGoAccUserTwoFactor9999TwoFactorAuthType) Scan(value interface{}) error
Scan implements the Scanner interface.
type PreGoAccUserBase9999 ¶
type PreGoAccUserBase9999 struct { // User ID UserID int32 // User account UserAccount string // User password UserPassword string // Salt for hashing UserSalt string // Last login timestamp UserLoginTime sql.NullTime // Last logout timestamp UserLogoutTime sql.NullTime // IP address of last login UserLoginIp sql.NullString // Creation timestamp UserCreatedAt sql.NullTime // Update timestamp UserUpdatedAt sql.NullTime // authentication two factor enabled for the user IsTwoFactorEnabled sql.NullInt32 }
type PreGoAccUserInfo9999 ¶
type PreGoAccUserInfo9999 struct { // User ID UserID uint64 // User account UserAccount string // User nickname UserNickname sql.NullString // User avatar UserAvatar sql.NullString // User state: 0-Locked, 1-Activated, 2-Not Activated UserState uint8 // Mobile phone number UserMobile sql.NullString // User gender: 0-Secret, 1-Male, 2-Female UserGender sql.NullInt16 // User birthday UserBirthday sql.NullTime // User email address UserEmail sql.NullString // Authentication status: 0-Not Authenticated, 1-Pending, 2-Authenticated, 3-Failed UserIsAuthentication uint8 // Record creation time CreatedAt sql.NullTime // Record update time UpdatedAt sql.NullTime }
type PreGoAccUserTwoFactor9999 ¶
type PreGoAccUserTwoFactor9999 struct { // Khoa chinh tu dong tang TwoFactorID uint32 // Khoa ngoai lien ket voi bang nguoi dung UserID uint32 // Loai xac thuc 2fa TwoFactorAuthType PreGoAccUserTwoFactor9999TwoFactorAuthType // Ma bi mat xac thuc 2fa TwoFactorAuthSecret string // So dien thoai xac thuc 2fa TwoFactorPhone sql.NullString // Email xac thuc 2fa TwoFactorEmail sql.NullString // Trang thai kich hoat xac thuc 2fa TwoFactorIsActive bool // Thoi gian tao xac thuc 2fa TwoFactorCreatedAt sql.NullTime // Thoi gian cap nhat xac thuc 2fa TwoFactorUpdatedAt sql.NullTime }
pre_go_acc_user_two_factor_9999
type PreGoAccUserTwoFactor9999TwoFactorAuthType ¶
type PreGoAccUserTwoFactor9999TwoFactorAuthType string
const ( PreGoAccUserTwoFactor9999TwoFactorAuthTypeEMAIL PreGoAccUserTwoFactor9999TwoFactorAuthType = "EMAIL" PreGoAccUserTwoFactor9999TwoFactorAuthTypeSMS PreGoAccUserTwoFactor9999TwoFactorAuthType = "SMS" PreGoAccUserTwoFactor9999TwoFactorAuthTypeAPP PreGoAccUserTwoFactor9999TwoFactorAuthType = "APP" )
func (*PreGoAccUserTwoFactor9999TwoFactorAuthType) Scan ¶
func (e *PreGoAccUserTwoFactor9999TwoFactorAuthType) Scan(src interface{}) error
type PreGoAccUserVerify9999 ¶
type PreGoAccUserVerify9999 struct { // Verification ID VerifyID int32 // One-time password VerifyOtp string // Verification key - email address, phone number, .... VerifyKey string // Hash of the verification key VerifyKeyHash string // Verification type (e.g., 1 for email) VerifyType sql.NullInt32 // Verification status: 1 for verified, 0 for not verified IsVerified sql.NullInt32 // Deletion flag: 1 for deleted, 0 for not deleted IsDeleted sql.NullInt32 // Record creation time VerifyCreatedAt sql.NullTime // Record update time VerifyUpdatedAt sql.NullTime }
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) AddOrUpdateEmail ¶
func (q *Queries) AddOrUpdateEmail(ctx context.Context, arg AddOrUpdateEmailParams) error
func (*Queries) AddUserAutoUserId ¶
func (*Queries) AddUserBase ¶
func (*Queries) AddUserHaveUserId ¶
func (*Queries) CheckTicketItemExists ¶
func (*Queries) CheckUserBaseExists ¶
func (*Queries) DecreaseTicketV1 ¶
func (*Queries) DecreaseTicketV2 ¶
func (*Queries) DisableTwoFactor ¶
func (q *Queries) DisableTwoFactor(ctx context.Context, arg DisableTwoFactorParams) error
func (*Queries) EditUserByUserId ¶
func (*Queries) EnableTwoFactorTypeEmail ¶
func (q *Queries) EnableTwoFactorTypeEmail(ctx context.Context, arg EnableTwoFactorTypeEmailParams) error
func (*Queries) FindUsers ¶
func (q *Queries) FindUsers(ctx context.Context, arg FindUsersParams) ([]PreGoAccUserInfo9999, error)
func (*Queries) GetInfoOTP ¶
func (*Queries) GetOneUserInfo ¶
func (*Queries) GetOneUserInfoAdmin ¶
func (*Queries) GetTicketItemById ¶
func (*Queries) GetTwoFactorMethodByID ¶
func (*Queries) GetTwoFactorMethodByIDAndByType ¶
func (q *Queries) GetTwoFactorMethodByIDAndByType(ctx context.Context, arg GetTwoFactorMethodByIDAndByTypeParams) (GetTwoFactorMethodByIDAndByTypeRow, error)
func (*Queries) GetTwoFactorStatus ¶
func (*Queries) GetUserByEmailSQLC ¶
func (*Queries) GetUserTwoFactoryMethods ¶
func (*Queries) GetValidOtp ¶
func (*Queries) InsertOTPVerify ¶
func (*Queries) IsTwoFactorEnabled ¶
func (*Queries) ListUsers ¶
func (q *Queries) ListUsers(ctx context.Context, arg ListUsersParams) ([]PreGoAccUserInfo9999, error)
func (*Queries) LoginUserBase ¶
func (q *Queries) LoginUserBase(ctx context.Context, arg LoginUserBaseParams) error
func (*Queries) LogoutUserBase ¶
func (*Queries) ReactivateTwoFactor ¶
func (q *Queries) ReactivateTwoFactor(ctx context.Context, arg ReactivateTwoFactorParams) error
func (*Queries) RemoveTwoFactor ¶
func (q *Queries) RemoveTwoFactor(ctx context.Context, arg RemoveTwoFactorParams) error
func (*Queries) UpdatePassword ¶
func (q *Queries) UpdatePassword(ctx context.Context, arg UpdatePasswordParams) error
func (*Queries) UpdateTwoFactorStatus ¶
func (q *Queries) UpdateTwoFactorStatus(ctx context.Context, arg UpdateTwoFactorStatusParams) error
func (*Queries) UpdateUserStatusByUserId ¶
func (*Queries) UpdateUserVerificationStatus ¶
update lai
func (*Queries) VerifyTwoFactor ¶
type ReactivateTwoFactorParams ¶
type ReactivateTwoFactorParams struct { UserID uint32 TwoFactorAuthType PreGoAccUserTwoFactor9999TwoFactorAuthType }
type RemoveTwoFactorParams ¶
type RemoveTwoFactorParams struct { UserID uint32 TwoFactorAuthType PreGoAccUserTwoFactor9999TwoFactorAuthType }
type TicketItem ¶
type TicketItem struct { // Primary key ID int64 // Ticket title Name string // Ticket description Description sql.NullString // Initial stock quantity (e.g., 1000 tickets) StockInitial int32 // Current available stock (e.g., 900 tickets) StockAvailable int32 // Indicates if stock is pre-warmed (0/1) IsStockPrepared bool // Original ticket price PriceOriginal int64 // Discounted price during flash sale PriceFlash int64 // Flash sale start time SaleStartTime time.Time // Flash sale end time SaleEndTime time.Time // Ticket status (e.g., active/inactive) Status int32 // ID of associated activity ActivityID int64 // Timestamp of the last update UpdatedAt time.Time // Creation timestamp CreatedAt time.Time }
Table for ticket details
type UpdatePasswordParams ¶
type UpdateTwoFactorStatusParams ¶
type UpdateTwoFactorStatusParams struct { UserID uint32 TwoFactorAuthType PreGoAccUserTwoFactor9999TwoFactorAuthType }
type VerifyTwoFactorParams ¶
type VerifyTwoFactorParams struct { UserID uint32 TwoFactorAuthType PreGoAccUserTwoFactor9999TwoFactorAuthType }
Click to show internal directories.
Click to hide internal directories.