marshaller

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownName = errors.New("unknown type name")
	ErrUnknownType = errors.New("unknown instance type")
)

Functions

func GetNameType

func GetNameType(t interface{}) (string, reflect.Type)

Types

type InstanceWrapper

type InstanceWrapper struct {
	NameType    string
	RawInstance []byte
}

type TypeRegistry

type TypeRegistry struct {
	sync.RWMutex
	sync.Once
	// contains filtered or unexported fields
}

func (*TypeRegistry) LookupType added in v0.0.7

func (registry *TypeRegistry) LookupType(name string) (reflect.Type, bool)

func (*TypeRegistry) NameTypeIsPresent added in v0.0.7

func (registry *TypeRegistry) NameTypeIsPresent(t any) (string, reflect.Type, bool)

func (*TypeRegistry) RegisterInstanceType

func (registry *TypeRegistry) RegisterInstanceType(t interface{})

func (*TypeRegistry) UnwrapInstance

func (registry *TypeRegistry) UnwrapInstance(wrapper *InstanceWrapper) (interface{}, error)

func (*TypeRegistry) WrapInstance

func (registry *TypeRegistry) WrapInstance(t interface{}) (*InstanceWrapper, error)

Jump to

Keyboard shortcuts

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