Documentation ¶
Index ¶
- Constants
- func ByteIndexOf(source []byte, targetByte []byte) int
- func BytesToInt(b []byte, start int, length int) int
- func BytesToString(val []byte) string
- func CopyOfRange(src []byte, srcOffset int, size int) ([]byte, error)
- func DeSerialization(source []byte, dst interface{}) error
- func Decryption(source []byte, iv []byte, key []byte) ([]byte, error)
- func DecryptionForString(source string, iv string, key string) (string, error)
- func Encryption(data []byte, iv []byte, key []byte) ([]byte, error)
- func EncryptionToString(data string, iv string, key string) (string, error)
- func Get(reqUrl string, param interface{}) (*http.Response, error)
- func IntToBytes(n int, length int) []byte
- func Match(source string, reg string) bool
- func ParseStruct(jsonString string, result interface{}) error
- func RequestBody(reqUrl string, method string, header map[string]string, reqBody io.Reader) (*http.Response, error)
- func Serialization(data interface{}) ([]byte, error)
- func StrToBytes(val string) []byte
- func SubBytes(source []byte, startIndex int, endIndex int) ([]byte, error)
- func ToJSONString(stc interface{}) (string, error)
- func ToString(value interface{}) string
- type SnowFlake
Constants ¶
View Source
const ( MaxWorkId = -1 ^ (-1 << numWorkerBits) MaxSequence = -1 ^ (-1 << numSequenceBits) )
Variables ¶
This section is empty.
Functions ¶
func ByteIndexOf ¶
ByteIndexOf Find the coordinates of the corresponding data from byte[]
func CopyOfRange ¶
CopyOfRange Copy the data of the specified range in the array
func DeSerialization ¶
DeSerialization Deserialize source to dst
func Decryption ¶
Decryption Decrypt source to dst
func DecryptionForString ¶
DecryptionForString Decrypt source to dst
func Encryption ¶
Encryption Encrypt data to []byte
func EncryptionToString ¶
EncryptionToString Encrypt data to string
func ParseStruct ¶
ParseStruct Json string to struct
func RequestBody ¶
func RequestBody(reqUrl string, method string, header map[string]string, reqBody io.Reader) (*http.Response, error)
RequestBody Initiating a request with body parameters
func Serialization ¶
Serialization Serialize data to []byte
func ToJSONString ¶
ToJSONString Structs to json strings
Types ¶
Click to show internal directories.
Click to hide internal directories.