Documentation ¶
Index ¶
- func EncodeMD5(value string) string
- func GenerateToken(user *models.User) (string, error)
- func Hash(password string) (string, error)
- func LogStart(version string, timeStart time.Time)
- func PasswordMatch(hashed, password string) error
- type Claims
- type ContextKey
- type TxLogger
- func (tx *TxLogger) Exec(query string, args ...interface{}) (sql.Result, error)
- func (tx *TxLogger) Get(dest interface{}, query string, args ...interface{}) error
- func (tx *TxLogger) QueryRowx(query string, dest interface{}, args ...interface{}) error
- func (tx *TxLogger) QueryRowxStruct(query string, dest interface{}, args ...interface{}) error
- func (tx *TxLogger) Select(dest interface{}, query string, args ...interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateToken ¶
GenerateToken generate tokens used for auth
func PasswordMatch ¶
PasswordMatch return and error if match is't invalid
Types ¶
type ContextKey ¶
type ContextKey string
ContextKey type
const ContextKeyTx ContextKey = "tx"
ContextKeyTx key
type TxLogger ¶
TxLogger is sqlx.Tx wrapper with injected logger
func (*TxLogger) Exec ¶
Exec executes a query that doesn't return rows. For example: an INSERT and UPDATE.
func (*TxLogger) Get ¶
Implementation of sqlx.Tx wrap logging
Get within a transaction. Any placeholder parameters are replaced with supplied args. An error is returned if the result set is empty.
func (*TxLogger) QueryRowx ¶
QueryRowx executes a query that return rows. For example: an INSERT and UPDATE.
func (*TxLogger) QueryRowxStruct ¶
QueryRowxStruct executes a query that return rows.
Click to show internal directories.
Click to hide internal directories.