Documentation ¶
Index ¶
- Variables
- func AddQueryParamsToRequest(r *http.Request, params map[string]string)
- func CamelToSnakeCase(str string) string
- func ComparePassAndHash(passHash []byte, plainPassword string) bool
- func CompareSameType[T comparable](received T, expected T) error
- func EqualError(received error, expected error) error
- func EqualTest(received any, expected any) error
- func Hash256(content []byte) (string, error)
- func HashPass(plainPassword string) (string, error)
- func NullFloat64ToUnsafeFloat(nullFloat64 sql.NullFloat64) *float64
- func NullInt64ToUnsafeUint(nullInt64 sql.NullInt64) *uint64
- func NullStringToUnsafe(nullStr sql.NullString) *string
- func NullTimeToUnsafe(nullTime sql.NullTime) *time.Time
- func ParseStringFromRequest(r *http.Request, paramName string) string
- func ParseUint64FromRequest(r *http.Request, paramName string) (uint64, error)
- func SimplifyPath(path string) string
- func SnakeToCamelCase(str string) string
- func StructToMap(data interface{}) map[string]interface{}
- func UnsafeFloat64ToNullFloat(unsafeFloat64 *float64) sql.NullFloat64
- func UnsafeStringToNull(str *string) sql.NullString
- func UnsafeTimeToNull(time *time.Time) sql.NullTime
- func UnsafeUint64ToNullInt(unsafeInt64 *uint64) sql.NullInt64
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrHash256 = myerrors.NewErrorInternal("Ошибка хеширования")
View Source
var MessageErrWrongNumberParam = "Получили некорректный числовой параметр. " +
"Он должен быть целым"
Functions ¶
func AddQueryParamsToRequest ¶
func CamelToSnakeCase ¶
func ComparePassAndHash ¶
func CompareSameType ¶
func CompareSameType[T comparable](received T, expected T) error
func EqualError ¶
func NullFloat64ToUnsafeFloat ¶
func NullFloat64ToUnsafeFloat(nullFloat64 sql.NullFloat64) *float64
func NullInt64ToUnsafeUint ¶
func NullStringToUnsafe ¶
func NullStringToUnsafe(nullStr sql.NullString) *string
func ParseUint64FromRequest ¶
func SimplifyPath ¶
func SnakeToCamelCase ¶
func StructToMap ¶
func StructToMap(data interface{}) map[string]interface{}
func UnsafeFloat64ToNullFloat ¶
func UnsafeFloat64ToNullFloat(unsafeFloat64 *float64) sql.NullFloat64
func UnsafeStringToNull ¶
func UnsafeStringToNull(str *string) sql.NullString
func UnsafeUint64ToNullInt ¶
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.