Documentation
¶
Index ¶
- Variables
- type DB
- func (db *DB) CreateQRCode(userID int, data, imagePath string) (int, error)
- func (db *DB) DeleteQRCode(qrcodeID int) error
- func (db *DB) GetAllQRCodesByUserID(userID int) ([]QRCode, error)
- func (db *DB) GetQRCodeByID(qrcodeID int) (*QRCode, error)
- func (db *DB) GetUser(usernameOrEmail string) (*User, error)
- func (db *DB) NewUser(username string, password_hash string, email string) error
- func (db *DB) UpdateQRCode(qrcodeID int, data, imagePath string) error
- type QRCode
- type QRCodeNotFoundError
- type User
- type UserNotFoundError
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrQRCodeNotFound = &QRCodeNotFoundError{}
View Source
var ErrUserNotFound = &UserNotFoundError{}
Functions ¶
This section is empty.
Types ¶
type DB ¶
func (*DB) CreateQRCode ¶
func (*DB) DeleteQRCode ¶
func (*DB) GetAllQRCodesByUserID ¶
type QRCodeNotFoundError ¶
type QRCodeNotFoundError struct {
ID int
}
represents an error when a QR code is not found
func (*QRCodeNotFoundError) Error ¶
func (e *QRCodeNotFoundError) Error() string
type UserNotFoundError ¶
type UserNotFoundError struct {
UsernameOrEmail string
}
UserNotFoundError represents an error when a user is not found.
func (*UserNotFoundError) Error ¶
func (e *UserNotFoundError) Error() string
Error returns the error message.
Click to show internal directories.
Click to hide internal directories.