Documentation ¶
Index ¶
- Constants
- Variables
- func BoolPointer(b bool) *bool
- func BoolToFloat64(a bool) float64
- func BoolToString(a bool) string
- func CheckStructFieldsEmpty(obj any) error
- func ConvertBytes(bytes float64) string
- func CopyFileByLine(dest, src string) (lineCount int64, err error)
- func DayStartTime(t time.Time) time.Time
- func EnsurePathExists(dirname string) error
- func FormatMysqlDumpTime(t *time.Time) string
- func GeneratePassword() string
- func JoinFlagName(prefix, key string) string
- func MakePassword(input string) (string, error)
- func NextDayStartTime(t time.Time) time.Time
- func RandomRune(n int, kind string) []rune
- func RoundTo(n float64, decimals uint32) float64
- func StrOrDef(s string, def string) string
- func TimeZeroToNull(t *time.Time) *time.Time
- func ToUint(id string) uint
- func UintToStr(i *uint) string
- func ValidPassword(input string) error
- func ValidatePassword(password string, hashedPassword string) error
- func WaitGroupWithTimeout(wg *sync.WaitGroup, timeout time.Duration) bool
- type DesEncryptor
Constants ¶
View Source
const ( RuneKindNum = "num" RuneKindLower = "lower" RuneKindUpper = "upper" RuneKindChar = "char" )
View Source
const ( BYTE = 1 << (10 * iota) KILOBYTE MEGABYTE GIGABYTE TERABYTE PETABYTE EXABYTE )
Variables ¶
Functions ¶
func BoolPointer ¶ added in v1.22.2
BoolPointer converts bool to *bool
func BoolToFloat64 ¶
func BoolToString ¶
func CheckStructFieldsEmpty ¶ added in v1.23.0
CheckStructFieldsEmpty check all struct fileds not empty. Now only check string and int.
func CopyFileByLine ¶
func EnsurePathExists ¶
func FormatMysqlDumpTime ¶
func GeneratePassword ¶
func GeneratePassword() string
func JoinFlagName ¶
func MakePassword ¶
func RandomRune ¶
func ValidPassword ¶
func ValidatePassword ¶
Types ¶
type DesEncryptor ¶
type DesEncryptor struct {
Key []byte
}
func (*DesEncryptor) DecryptBase64 ¶
func (e *DesEncryptor) DecryptBase64(input string) (string, error)
func (*DesEncryptor) EncryptBase64 ¶
func (e *DesEncryptor) EncryptBase64(input string) (string, error)
func (*DesEncryptor) Padding ¶
func (e *DesEncryptor) Padding(cipherText []byte, blockSize int) []byte
func (*DesEncryptor) UnPadding ¶
func (e *DesEncryptor) UnPadding(data []byte) []byte
Directories ¶
Path | Synopsis |
---|---|
* OCI Distribution Specification Client * * For more information visit below URL * https://github.com/opencontainers/distribution-spec/blob/main/spec.md#endpoints *
|
* OCI Distribution Specification Client * * For more information visit below URL * https://github.com/opencontainers/distribution-spec/blob/main/spec.md#endpoints * |
httputil
|
|
Click to show internal directories.
Click to hide internal directories.