sszgen

package
v0.0.0-...-acb1236 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseTypeDef

func ParseTypeDef(typ *TypeDef, opts ...FieldParserOpt) (gentypes.ValRep, error)

Types

type FieldDef

type FieldDef struct {
	// contains filtered or unexported fields
}

FieldDef represents a field of the intermediate marshaling type.

type FieldParser

type FieldParser struct {
	// contains filtered or unexported fields
}

type FieldParserOpt

type FieldParserOpt func(*FieldParser)

func WithDisableDelegation

func WithDisableDelegation() FieldParserOpt

type GoPathScoper

type GoPathScoper struct {
	// contains filtered or unexported fields
}

func NewGoPathScoper

func NewGoPathScoper(packageName string) (*GoPathScoper, error)

func (*GoPathScoper) Path

func (pp *GoPathScoper) Path() string

func (*GoPathScoper) Scope

func (pp *GoPathScoper) Scope() *types.Scope

func (*GoPathScoper) TypeDefSourceCode

func (pp *GoPathScoper) TypeDefSourceCode(defs []*TypeDef) ([]byte, error)

type PathScoper

type PathScoper interface {
	Path() string
	Scope() *types.Scope
}

type SSZDimension

type SSZDimension struct {
	VectorLength *int
	ListLength   *int
}

func (*SSZDimension) IsList

func (dim *SSZDimension) IsList() bool

func (*SSZDimension) IsVector

func (dim *SSZDimension) IsVector() bool

func (*SSZDimension) ListLen

func (dim *SSZDimension) ListLen() int

func (*SSZDimension) VectorLen

func (dim *SSZDimension) VectorLen() int

type SSZListBounds

type SSZListBounds struct {
	SSZSize []*int
	SSZMax  *int
}

type TagParser

type TagParser struct {
	// contains filtered or unexported fields
}

func (TagParser) GetSSZTags

func (tp TagParser) GetSSZTags() map[string]string

func (*TagParser) Init

func (tp *TagParser) Init(tag string)

type TypeDef

type TypeDef struct {
	Name        string
	PackageName string
	IsStruct    bool
	Fields      []*FieldDef
	// contains filtered or unexported fields
}

TypeDef represents the intermediate struct type used during marshaling. This is the input data to all the Go code templates.

func TypeDefs

func TypeDefs(ps PathScoper, fieldNames ...string) ([]*TypeDef, error)

type VirtualFile

type VirtualFile struct {
	// contains filtered or unexported fields
}

type VirtualPathScoper

type VirtualPathScoper struct {
	// contains filtered or unexported fields
}

func NewVirtualPathScoper

func NewVirtualPathScoper(pkgName string, vfs ...VirtualFile) (*VirtualPathScoper, error)

func (*VirtualPathScoper) Path

func (vps *VirtualPathScoper) Path() string

func (*VirtualPathScoper) Scope

func (vps *VirtualPathScoper) Scope() *types.Scope

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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