codec

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 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 Codecor added in v1.0.3

func Codecor() Codec

Codecor 获取全局的编解码器

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
Package json
rlp
Package rlp
Package rlp
internal/rlpstruct
Package rlpstruct implements struct processing for RLP encoding/decoding.
Package rlpstruct implements struct processing for RLP encoding/decoding.
rlpgen command

Jump to

Keyboard shortcuts

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