utils

package
v0.0.0-...-0acbec0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ERR_INVALID_PARAMETER = &Error{Code: 6001, Description: "invalid parameter"} // 6001-invalid parameter
	ERR_UNIMPLEMENTATION  = &Error{Code: 7001, Description: "unimplementation"}  // 7001-unimplementation
	ERR_UNKNOWN           = &Error{Code: 9999, Description: "unknown"}           // 9999-unknown
)

Functions

func AesDecrypt

func AesDecrypt(data []byte, key []byte) ([]byte, error)

AesDecrypt 解密

func AesEncrypt

func AesEncrypt(data []byte, key []byte) ([]byte, error)

AesEncrypt 加密

func BoolFunc2Bool

func BoolFunc2Bool(fc func() bool) bool

func BoolFunc2Int

func BoolFunc2Int(fc func() bool, trueInt, falseInt int) int

func BoolFunc2OneZero

func BoolFunc2OneZero(fc func() bool) int

func BoolFunc2Str

func BoolFunc2Str(fc func() bool, trueStr, falseStr string) string

func NowFmtYMDHMS

func NowFmtYMDHMS() string

func StringIsNullOrEmpty

func StringIsNullOrEmpty(str string) bool

func StringsEqual

func StringsEqual(str1, str2 string) bool

func StringsHasNullOrEmpty

func StringsHasNullOrEmpty(args ...string) bool

Types

type Error

type Error struct {
	Code        int
	Description string
}

func (*Error) Error

func (err *Error) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL