Documentation
¶
Index ¶
- Constants
- func AesDecrypt(src, key, iv string) (string, error)
- func AesEncrypt(src, key, iv string) (string, error)
- func Base64Decode(in string) []byte
- func Base64Encode(in []byte) string
- func BytesToUint32(buf []byte) uint32
- func BytesToUint64(buf []byte) uint64
- func Compress(data []byte) []byte
- func DeCompress(data []byte) []byte
- func FromJson(jsonStr string, v interface{}) error
- func GenerateRandomNumInRange(min, max int) uint32
- func GenerateRandomStr(inseed []byte) string
- func GetAppBaseDir() string
- func HexDecode(in string) []byte
- func HexEncode(in []byte) string
- func IsDigit(str string) bool
- func IsPathExisting(path string) bool
- func IsPositiveNumber(src string) bool
- func IsValidEmailAddr(email string) bool
- func IsValidStruct(dataStruct interface{}) error
- func LoadConfigurationFromYamlFile(data_dir_from_cli_arg, data_dir_name, cfg_file_name string, out interface{}) (string, error)
- func NewRandomUUID() string
- func NewUUID() string
- func PKCS5Padding(src []byte, blockSize int) []byte
- func PKCS5UnPadding(src []byte) []byte
- func ReadJSONFile(filename string, v interface{}) error
- func RsaDecrypt(src string, privateKey []byte) (string, error)
- func Sha256(indata []byte) string
- func ToJSON(v interface{}) string
- func ToJSONIndent(v interface{}) string
- func Uint32ToBytes(dat uint32) []byte
- func Uint32ToBytesBuffer(buffer []byte, dat uint32)
- func Uint64ToBytes(dat uint64) []byte
Constants ¶
View Source
const ( Length_4 = 4 Length_8 = 8 )
Variables ¶
This section is empty.
Functions ¶
func AesDecrypt ¶
AesDecrypt [in] src : encryped data with base64 encode [out] original data
func AesEncrypt ¶
AesEncrypt [in] src : original data [out] encryped data with base64 encode
func Base64Decode ¶
func Base64Encode ¶
func BytesToUint32 ¶
func BytesToUint64 ¶
func DeCompress ¶
func GenerateRandomStr ¶
func IsPathExisting ¶
func IsPositiveNumber ¶
func IsValidEmailAddr ¶
func IsValidStruct ¶
func IsValidStruct(dataStruct interface{}) error
using validator library to validate a Struct
func LoadConfigurationFromYamlFile ¶
func LoadConfigurationFromYamlFile(data_dir_from_cli_arg, data_dir_name, cfg_file_name string, out interface{}) (string, error)
@data_dir_from_cli_arg: data dir name come from the command line @dir_name: data dir name @cfg_file_name: configuration file name in `dir_name` directory
func NewRandomUUID ¶
func NewRandomUUID() string
func PKCS5Padding ¶
func PKCS5UnPadding ¶
func ReadJSONFile ¶
ReadJSONFile reads a JSON format file into v
func RsaDecrypt ¶
convert base64 encoded string to binary as input base64 encoded string
func ToJSONIndent ¶
func ToJSONIndent(v interface{}) string
ToJSONIndent is a helper method that converts the object to human readable format
func Uint32ToBytes ¶
func Uint32ToBytesBuffer ¶
func Uint64ToBytes ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.