encoder

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IEncoder

type IEncoder interface {
	// Encode takes an object and returns encoded bytes or error
	Encode(obj interface{}) ([]byte, error)
	// Decode takes an object and bytes to store decoded data in object, returns error if fails
	Decode(data []byte, v interface{}) error
}

IEncoder has the responsibility to consistently encode/ decode objects for backwards compatibility

type V2 added in v1.6.0

type V2 struct {
}

V2 encoder

func New added in v1.6.0

func New() *V2

New return v2 struct

func (*V2) Decode added in v1.6.0

func (l *V2) Decode(data []byte, v interface{}) error

Decode to ssz format

func (*V2) Encode added in v1.6.0

func (l *V2) Encode(obj interface{}) ([]byte, error)

Encode to ssz format

Jump to

Keyboard shortcuts

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