Documentation
¶
Index ¶
- Constants
- func Clone(src interface{}) interface{}
- func CopyReader(reader io.Reader, writers ...io.Writer) error
- func DeepCopy(src, dst interface{}) error
- func MarshalBson(v interface{}) ([]byte, error)
- func MarshalCbor(v interface{}) ([]byte, error)
- func MarshalJSON(v interface{}) ([]byte, error)
- func MarshalMsgPack(v interface{}) ([]byte, error)
- func MarshalProto(v interface{}) ([]byte, error)
- func MarshalToString(codec Codec, v interface{}) (string, error)
- func MarshalToml(v interface{}) ([]byte, error)
- func MarshalYAML(v interface{}) ([]byte, error)
- func RegisterCodec(codec Codec)
- func UnmarshalBson(data []byte, v interface{}) error
- func UnmarshalCbor(data []byte, v interface{}) error
- func UnmarshalFromString(codec Codec, data string, v interface{}) error
- func UnmarshalJSON(data []byte, v interface{}) error
- func UnmarshalMsgPack(data []byte, v interface{}) error
- func UnmarshalProto(data []byte, v interface{}) error
- func UnmarshalToml(data []byte, v interface{}) error
- func UnmarshalYAML(data []byte, v interface{}) error
- type Codec
Constants ¶
View Source
const ( // MIME类型 MIMEJSON = "application/json" MIMEHTML = "text/html" MIMEXML = "application/xml" MIMEXML2 = "text/xml" MIMEPlain = "text/plain" MIMEPOSTForm = "application/x-www-form-urlencoded" MIMEMultipartPOSTForm = "multipart/form-data" MIMEPROTOBUF = "application/x-protobuf" MIMEYAML = "application/x-yaml" MIMEYAML2 = "text/yaml" MIMETOML = "application/toml" MIMETOML2 = "text/toml" MIMEMSGPACK = "application/msgpack" MIMEMSGPACK2 = "application/x-msgpack" MIMECBOR = "application/cbor" MIMECBOR2 = "application/x-cbor" MIMEBSON = "application/bson" )
常见的内容类型常量
Variables ¶
This section is empty.
Functions ¶
func CopyReader ¶
CopyReader 将reader内容复制到多个writers
func MarshalMsgPack ¶
MarshalMsgPack 将对象序列化为MessagePack字节数组
func MarshalToString ¶
MarshalToString 将对象序列化为字符串
func UnmarshalBson ¶
UnmarshalBson 将BSON字节数组反序列化为对象
func UnmarshalCbor ¶
UnmarshalCbor 将CBOR字节数组反序列化为对象
func UnmarshalFromString ¶
UnmarshalFromString 从字符串反序列化对象
func UnmarshalJSON ¶
UnmarshalJSON 将JSON字节数组反序列化为对象
func UnmarshalMsgPack ¶
UnmarshalMsgPack 将MessagePack字节数组反序列化为对象
func UnmarshalProto ¶
UnmarshalProto 将Proto字节数组反序列化为对象
func UnmarshalToml ¶
UnmarshalToml 将TOML字节数组反序列化为对象
func UnmarshalYAML ¶
UnmarshalYAML 将YAML字节数组反序列化为对象
Types ¶
Click to show internal directories.
Click to hide internal directories.