Documentation ¶
Index ¶
- func GenerateHashDocument(firstName, lastName, birth_date, gender, countryCode, passportNumber string) string
- func GenerateHashUser(firstName, lastName, gender, birthDate, countryCode string) string
- func GenerateOtp(len int) uint
- func GeneratePassword(password string) string
- func Mask(str string, ts ...int) string
- func RandSeq(n int) string
- func Response(c *fiber.Ctx, responseDetails ...interface{}) error
- func ResponseBadRequest(c *fiber.Ctx, message string) error
- func ResponseErr(c *fiber.Ctx, message string) error
- func ResponseForbidden(c *fiber.Ctx) error
- func ResponseUnauthorized(c *fiber.Ctx) error
- func RoundFloat(v float64) float64
- func StringInArr(a string, list []string) bool
- func ToQrBase64(data string) string
- func ToSnakeCase(str string) string
- func UniqueIntSlice(intSlice []int) []int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateHashDocument ¶
func GenerateHashDocument(firstName, lastName, birth_date, gender, countryCode, passportNumber string) string
Бичиг баримтын хаш-код үүсгэнэ
func GenerateHashUser ¶
Хэрэглэгчийн хаш-код үүсгэнэ
func GeneratePassword ¶
func Response ¶ added in v2.1.2
func Response(c *fiber.Ctx, responseDetails ...interface{}) error
Success буцаагч - httpStatusCode 200
Жишээ1: Response(c) гэж дуудвал {"message": "Амжилттай"}
Жишээ2: Response(c, "Амжилттай бүртгэгдлээ") гэж дуудвал {"message": "Амжилттай бүртгэгдлээ"}
Жишээ3: Response(c, anyJson) гэж дуудвал anyJson буцаана
func ResponseBadRequest ¶ added in v2.1.2
BadRequest хариу буцаагч - httpStatusCode 400
func ResponseErr ¶ added in v2.1.2
InternalServerError хариу буцаагч - httpStatusCode 500
func ResponseForbidden ¶ added in v2.1.2
func ResponseForbidden(c *fiber.Ctx) error
Forbidden хариу буцаагч - httpStatusCode 403 {"message": "Хандах эрхгүй"}
func ResponseUnauthorized ¶ added in v2.1.2
func ResponseUnauthorized(c *fiber.Ctx) error
Unauthorized хариу буцаагч - httpStatusCode 401 {"message": "Токен хугацаа дууссан эсвэл буруу байна"}
func RoundFloat ¶ added in v2.2.0
func StringInArr ¶
func ToQrBase64 ¶
func ToSnakeCase ¶
func UniqueIntSlice ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.