tool

package
v1.0.0-bate1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: LGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeData

func DecodeData(data []byte, i interface{}) error

func DecodeDataByType

func DecodeDataByType(data []byte, t reflect.Type) (interface{}, error)

func EncodeData

func EncodeData(data interface{}) ([]byte, error)

func EncodeDataByType

func EncodeDataByType(typeValue reflect.Value) ([]byte, error)

func GetOutBoundIP

func GetOutBoundIP() (ip string, err error)

GetOutBoundIP 获取本地出口网卡的本地ip地址

Types

type MsgpackCodec

type MsgpackCodec struct{}

MsgpackCodec uses messagepack marshaler and unmarshaler.

func (MsgpackCodec) Decode

func (c MsgpackCodec) Decode(data []byte, i interface{}) error

Decode decodes an object from slice of bytes.

func (MsgpackCodec) Encode

func (c MsgpackCodec) Encode(i interface{}) ([]byte, error)

Encode encodes an object into slice of bytes.

Jump to

Keyboard shortcuts

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