Documentation ¶
Index ¶
- Variables
- func ChunkSlice[T any](slice []T, chunkSize int) (chunks [][]T)
- func ConvertErrMsg[R any](errF any) ([]*R, error)
- func FileMove(src string, dst string, perm os.FileMode, file ...string)
- func GenerateSignature(key string, second ...int64) (signature string)
- func GetTimebaseUnix(seconds int64) int64
- func IsRFC3339(field validator.FieldLevel) bool
- func RandString(length int) string
- func RandStringLower(length int) string
- func RandStringUpper(length int) string
- func RandStringWithCharset(length int, charset string) string
- func RandomHex(n int) string
- func RandomHexUpper(n int) string
- func Substring(text string, indexs ...int) string
- func VerifySignature(key string, signature string, second ...int64) bool
- type CustomValidator
- type ErrField
Constants ¶
This section is empty.
Variables ¶
View Source
var Slice slice
Functions ¶
func ChunkSlice ¶ added in v1.1.0
func ConvertErrMsg ¶ added in v1.0.2
func GenerateSignature ¶ added in v1.0.2
func GetTimebaseUnix ¶ added in v1.0.2
func RandString ¶
func RandStringLower ¶
func RandStringUpper ¶
func RandStringWithCharset ¶
func RandomHexUpper ¶
Types ¶
type CustomValidator ¶ added in v1.0.2
type CustomValidator struct { Validate *validator.Validate Translator ut.Translator }
func NewValidator ¶ added in v1.0.2
func NewValidator() *CustomValidator
func (*CustomValidator) GetErrMsg ¶ added in v1.0.2
func (cv *CustomValidator) GetErrMsg(err error) string
func (*CustomValidator) GetErrMsgField ¶ added in v1.0.2
func (cv *CustomValidator) GetErrMsgField(err error) (errF []ErrField)
func (*CustomValidator) SetTranslation ¶ added in v1.0.2
func (cv *CustomValidator) SetTranslation(locale string) *CustomValidator
Source Files ¶
Click to show internal directories.
Click to hide internal directories.