codec

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2021 License: Apache-2.0 Imports: 2 Imported by: 18

Documentation

Overview

Package codec

@author: xwc1125

Package codec

@author: xwc1125

Package codec

@author: xwc1125

Index

Constants

This section is empty.

Variables

View Source
var DefaultCodec = rlp.NewCodec()

Functions

func RegisterCodec

func RegisterCodec(_codec Codec)

RegisterCodec 注册编解码器

Types

type Codec

type Codec interface {
	Encoder
	Decoder
}

Codec 编解码

func Coder

func Coder() Codec

Coder 获取全局的编解码器

type Decoder

type Decoder interface {
	Decode(data []byte, structPrt interface{}) error
}

Decoder 解码器

type Deserializer

type Deserializer interface {
	Deserialize(d []byte) error
}

Deserializer 反序列化

type Encoder

type Encoder interface {
	Encode(v interface{}) ([]byte, error)
}

Encoder 编码器

type Serializer

type Serializer interface {
	Serialize() ([]byte, error)
}

Serializer 序列化

Directories

Path Synopsis
Package json @author: xwc1125
Package json @author: xwc1125
Package rlp @author: xwc1125 Package rlp implements the RLP serialization format.
Package rlp @author: xwc1125 Package rlp implements the RLP serialization format.

Jump to

Keyboard shortcuts

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