Documentation ¶
Index ¶
- func AesDecrypt(decodeStr string, key []byte) ([]byte, error)
- func AesEncrypt(encodeStr string, key []byte) (string, error)
- func Call(method, baseUrl, path string, body io.Reader, headers map[string][]string) ([]byte, int, error)
- func CheckInterfaceMapInterface(i interface{}) (map[string]interface{}, error)
- func CheckMapBool(m map[string]interface{}, key string) (bool, error)
- func CheckMapInt(m map[string]interface{}, key string) (int, error)
- func CheckMapInt32(m map[string]interface{}, key string) (int32, error)
- func CheckMapInt64(m map[string]interface{}, key string) (int64, error)
- func CheckMapInterface(m map[string]interface{}, key string) (map[string]interface{}, error)
- func CheckMapInterfaceSlice(m map[string]interface{}, key string) ([]interface{}, error)
- func CheckMapString(m map[string]interface{}, key string) (string, error)
- func CheckMapUInt16(m map[string]interface{}, key string) (uint16, error)
- func CheckMapUInt32(m map[string]interface{}, key string) (uint32, error)
- func CheckValue(v interface{}, vType string) error
- func Compare(a, b []byte) int
- func DecodeJSON(bytes []byte) (map[string]interface{}, error)
- func DecodeJson(data []byte) (map[string]interface{}, error)
- func DecodeReader(r io.Reader) (map[string]interface{}, error)
- func EncodeJSON(data interface{}) ([]byte, error)
- func EncodeJson(data interface{}) ([]byte, error)
- func GenerateRandomID() string
- func HandlerError(resp http.ResponseWriter, data string, httpCode int, stateCode int)
- func IsFileExists(filename string) bool
- func PKCS5Padding(ciphertext []byte, blockSize int) []byte
- func PKCS5UnPadding(origData []byte) []byte
- func ReadFile(filename string) ([]byte, error)
- func Request(method, baseUrl, path string, body io.Reader) ([]byte, int, error)
- func Response(data []byte, statusCode int, resp http.ResponseWriter)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckInterfaceMapInterface ¶
CheckInterfaceMapInterface check whether the interface is map[string]interface{}
func CheckMapBool ¶
CheckMapBool check whether the map key's value type is bool
func CheckMapInt ¶
CheckMapInt check whether the map key's value type is int
func CheckMapInt32 ¶
CheckMapInt32 check whether the map key's value type is int32
func CheckMapInt64 ¶
CheckMapInt64 check whether the map key's value type is int64
func CheckMapInterface ¶
CheckMapInterface check whether the map key's value type is interface{}
func CheckMapInterfaceSlice ¶
CheckMapInterfaceSlice check whether the map key's value type is []interface{}
func CheckMapString ¶
CheckMapString check whether the map key's value type is string
func CheckMapUInt16 ¶
CheckMapUInt16 check whether the map key's value type is int
func CheckMapUInt32 ¶
CheckMapUInt32 check whether the map key's value type is uint32
func CheckValue ¶
func DecodeJSON ¶
DecodeJSON decode a bytes to Json object
func DecodeJson ¶
func EncodeJSON ¶
EncodeJSON encode object to []byte
func EncodeJson ¶
func HandlerError ¶
func HandlerError(resp http.ResponseWriter, data string, httpCode int, stateCode int)
func IsFileExists ¶
IsFileExists - whether the file exist @filename: file full path name
func PKCS5Padding ¶
func PKCS5UnPadding ¶
Types ¶
This section is empty.