Util

package
v0.1.5-0...-9a2956c Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareUnixTime

func CompareUnixTime(stime int64, dtime int64) int64

CompareUnixTime : dtime - stime : return second

func Decrypt

func Decrypt(k string, c string) (string, error)

Decrypt : AES256 key, Base64 Decode - cipher text to plain text

func Encrypt

func Encrypt(k string, p string) (string, error)

Encrypt : AES256 key, base64 encode - plain text to cipher text See alternate IV creation from ciphertext below var iv = []byte{35, 46, 57, 24, 85, 35, 24, 74, 87, 35, 88, 98, 66, 32, 14, 05}

func ExistPath

func ExistPath(strPath string) bool

func FileCopy_s

func FileCopy_s(src string, dst string) (int64, error)

/////////////////////////////////////////////////////////////////////// FileCopy_s : file copy with temporary extension ///////////////////////////////////////////////////////////////////////

func GenerateUuid

func GenerateUuid() string

GenerateUuid : CreateUUID string

func GetPath

func GetPath() string

func I32ToString

func I32ToString(i32 int32) string

I32ToString : String to Int64

func I64ToString

func I64ToString(i64 int64) string

I64ToString : String to Int64

func I64UnixTimeTo

func I64UnixTimeTo(i64Time int64) (string, error)

I64UnixTimeTo : Unix Time To String

func Mkdir

func Mkdir(strPath string) error

func ReadFile

func ReadFile(f string)

func Remove

func Remove(strPath string) bool

func Rename

func Rename(strFrom string, strTo string) bool

func SFolder_r

func SFolder_r(fileList *[]string, path string, whiteList []string) error

/////////////////////////////////////////////////////////////////////// SFolder_r : get file list include sub-dir ///////////////////////////////////////////////////////////////////////

func Sha256

func Sha256(plainText string) string

Sha256 : create sha256 hash value

func StringToI32

func StringToI32(str string) (int32, error)

func StringToI64

func StringToI64(str string) (int64, error)

StringToI64 : String to Int64

func StringToINT

func StringToINT(str string) (int, error)

func StringUnixTimeToString

func StringUnixTimeToString(strTime string) (string, error)

StringUnixTimeToString : string Unix Time To String

func Throw

func Throw(e Exception)

Types

type Block

type Block struct {
	Try     func()
	Catch   func(Exception)
	Finally func()
}

func (Block) Do

func (tcf Block) Do()

type Exception

type Exception interface{}

Jump to

Keyboard shortcuts

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