Documentation
¶
Index ¶
- Variables
- func AesDecrypt(crypted, key []byte) ([]byte, error)
- func AesEncrypt(origData, key []byte) ([]byte, error)
- func BoolPtr(f bool) *bool
- func BytesToUInt64(buf []byte) uint64
- func DecodeInt(str string) (int64, error)
- func EncodeInt(num int64) (string, error)
- func GenerateUUID() uuid.UUID
- func GenerateUUIDBytes() []byte
- func GenerateUUIDShort11() string
- func GenerateUUIDShort22() string
- func GenerateUUIDString() string
- func GetConversationId(fromId, targetId string, channelType int32) string
- func HashStr(str string) uint32
- func HmacSha1(key []byte, data string) []byte
- func HmacSha256(key []byte, data string) []byte
- func HttpDo(method, url string, header map[string]string, body string) (string, int, error)
- func HttpDoBytes(method, url string, header map[string]string, body string) ([]byte, int, error)
- func HttpDoBytesWithTimeout(method, url string, header map[string]string, body string, ...) ([]byte, int, error)
- func Int2String(val int64) string
- func IntPtr(i int) *int
- func JsonMarshal(obj interface{}) ([]byte, error)
- func JsonUnMarshal(bytes []byte, obj interface{}) error
- func MapToStruct[T any](m map[string]interface{}) T
- func MaskEmail(email string) string
- func MaskPhone(phone string) string
- func PKCS7Padding(ciphertext []byte, blockSize int) []byte
- func PKCS7UnPadding(origData []byte) []byte
- func ParseFloat(val string) (float64, error)
- func ParseInt(value string) (int, error)
- func ParseInt64(value string) (int64, error)
- func PbMarshal(obj proto.Message) ([]byte, error)
- func PbUnMarshal(bytes []byte, typeScope proto.Message) error
- func RandInt(n int) int
- func RandIntn(i int) int
- func RandStr(n int) string
- func SHA1(s string) string
- func ShortCut(str string) string
- func ShortMd5(str string) string
- func String2Int64(str string) (int64, error)
- func ToInt(str string) int
- func ToJson(val interface{}) string
- func UUID2ShortString(uuid uuid.UUID) string
- func UUIDStringByBytes(bytes []byte) (string, error)
- type HttpStream
- type N3d
- type SegmentatedLocks
Constants ¶
This section is empty.
Variables ¶
View Source
var DIGITS64 []byte = []byte("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_")
Functions ¶
func BytesToUInt64 ¶
func GenerateUUID ¶
func GenerateUUIDBytes ¶
func GenerateUUIDBytes() []byte
func GenerateUUIDShort11 ¶
func GenerateUUIDShort11() string
func GenerateUUIDShort22 ¶
func GenerateUUIDShort22() string
func GenerateUUIDString ¶
func GenerateUUIDString() string
func GetConversationId ¶
func HmacSha256 ¶
func HttpDoBytes ¶
func HttpDoBytesWithTimeout ¶
func Int2String ¶
func JsonMarshal ¶
func JsonUnMarshal ¶
func MapToStruct ¶
func PKCS7Padding ¶
func PKCS7UnPadding ¶
func ParseFloat ¶
func ParseInt64 ¶
func String2Int64 ¶
func UUID2ShortString ¶
func UUIDStringByBytes ¶
Types ¶
type HttpStream ¶
type HttpStream struct {
// contains filtered or unexported fields
}
func CreateStream ¶
func (*HttpStream) Close ¶
func (stream *HttpStream) Close()
func (*HttpStream) Receive ¶
func (stream *HttpStream) Receive() (string, error)
type SegmentatedLocks ¶
type SegmentatedLocks struct {
// contains filtered or unexported fields
}
func NewSegmentatedLocks ¶
func NewSegmentatedLocks(num int) *SegmentatedLocks
Click to show internal directories.
Click to hide internal directories.