Documentation ¶
Index ¶
- type DBRepo
- func (dbr *DBRepo) CreateStatement(stat string, ctx context.Context) (*sql.Stmt, error)
- func (dbr *DBRepo) CreateUserDataModelMethod() error
- func (dbr *DBRepo) DisposeFunction() error
- func (dbr *DBRepo) GetUserByItsEmailHMACMethod(um string) (string, error)
- func (dbr *DBRepo) PingingDB() error
- func (dbr *DBRepo) SaveUserWithHAMCMethod(user *DataModel) error
- type DBRepoHMAC
- type DataModel
- type UserClaims
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBRepo ¶
DBRepo use for holding *sql.DB
var Repo *DBRepo
func (*DBRepo) CreateStatement ¶
CreateStatement use for creating *sql.Stmt for a specific query or statement
func (*DBRepo) CreateUserDataModelMethod ¶
CreateUserDataModelMethod use for creating DataModel for every user
func (*DBRepo) DisposeFunction ¶
DisposeFunction use for dispose sql.DB
func (*DBRepo) GetUserByItsEmailHMACMethod ¶
GetUserByItsEmailHMACMethod use for getting user information by its email
func (*DBRepo) SaveUserWithHAMCMethod ¶
SaveUserWithHAMCMethod use for save user with its associated key into Database
type DBRepoHMAC ¶
type DBRepoHMAC interface { CreateUserDataModelMethod() error SaveUserWithHAMCMethod(user *DataModel) error GetUserByItsEmailHMACMethod(um string) (string, error) }
DBRepoHMAC holding our db functionalities schema we need to implement
type DataModel ¶
type DataModel struct { ID int `json:"id"` Mail string `json:"mail"` Key string `json:"key,omitempty"` HmacToken string `json:"hmac_token,omitempty"` }
DataModel for storing user stuff
type UserClaims ¶
type UserClaims struct { *jwt.StandardClaims Email string }
Click to show internal directories.
Click to hide internal directories.