Documentation ¶
Index ¶
- Constants
- Variables
- func CheckSum(data []byte) uint16
- func CopyFile(dstName, srcName string) (int64, error)
- func FindNearestIP(source []net.IP, target net.IP) net.IP
- func GetAllIPv4Address() ([]net.IP, error)
- func GetJSONResponse(c echo.Context, err error, data interface{}) error
- func GetStoreDir(rootDir string) (string, error)
- func Hexdump(title string, data []byte)
- func Int16ToUint16(i int16) uint16
- func IsKigaOverlayIP(ip net.IP) bool
- func MoveFile(fileName string, rootDir string) (string, error)
- func ParseDateTimeString(str string, include bool) (int64, error)
- func StoreFile(srcFile multipart.File, rootDir string, fileName string) (string, error)
- func Str2byte(s string) []byte
- func Uint16ToBytes(n uint16) []byte
- func Uint32ToBytes(i uint32) []byte
- func Unzip(fileBuffer []byte, destDir string) error
- func UnzipBuffer(fileBuffer []byte, fileMap map[string][]byte) error
- func Zip(srcFile string, destZip string) error
- type Response
- type ResponseStatus
- type ResponseV2
- type ResponseWithoutData
Constants ¶
View Source
const ( //ResponseStatusOK coresponse status ResponseStatusOK = "OK" //ResponseStatusError response status ResponseStatusError = "Error" )
Variables ¶
View Source
var MbTable = []uint16{}/* 256 elements not displayed */
MbTable ...
Functions ¶
func FindNearestIP ¶
FindNearestIP find the nearest ip
func GetAllIPv4Address ¶
GetAllIPv4Address get all IP v4 address
func GetJSONResponse ¶
GetJSONResponse get json response
func IsKigaOverlayIP ¶
IsKigaOverlayIP check if ip is in the kiga overlay network
func ParseDateTimeString ¶
ParseDateTimeString "Parse date and time string 2020-05-05 => unix nano
func UnzipBuffer ¶
UnzipBuffer Decompress
Types ¶
type Response ¶
type Response struct { Status ResponseStatus `json:"status" swagger:"required"` ErrStr string `json:"err,omitempty"` Data interface{} `json:"data,omitempty"` }
Response -
type ResponseV2 ¶
type ResponseV2 struct { Code int `json:"code" swagger:"required"` Msg string `json:"msg,omitempty"` Data interface{} `json:"data,omitempty"` }
ResponseV2 HTTP response , v2 version
type ResponseWithoutData ¶
type ResponseWithoutData struct { Status ResponseStatus `json:"status" swagger:"required"` ErrStr string `json:"err,omitempty"` }
ResponseWithoutData response without data
Click to show internal directories.
Click to hide internal directories.