Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrRecordNotFound record not found error, happens when haven't find any matched data when looking up with a struct ErrRecordNotFound = errors.New("record not found") )
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend stores all the Database internals for data access
func InitDatabase ¶
InitDatabase takes a connection string URL to pass into the Database
func (*Backend) Close ¶
func (b *Backend) Close()
Close wraps the db close function for easy cleanup
func (*Backend) CreateTokenData ¶
CreateTokenData adds token data to the database
func (*Backend) GetTokenDataByUserID ¶
GetTokenDataByUserID gets token data by the UserID
func (*Backend) UpdateTokenData ¶
UpdateTokenData updates token data in DB
type Database ¶
type Database interface { TokenDataInterface }
Database interface describes the persistence functionality of the application
type ErrDatabaseGeneral ¶
type ErrDatabaseGeneral string
ErrDatabaseGeneral is a generic error wrapper for unexplained errors
func (ErrDatabaseGeneral) Error ¶
func (edg ErrDatabaseGeneral) Error() string
Click to show internal directories.
Click to hide internal directories.