goseth

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: MIT Imports: 11 Imported by: 7

README

seth

Seth is a Go library that is used for serializing everything from a single root.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildRegistry

func BuildRegistry()

Types

type Deserializer

type Deserializer interface {
	Deserialize(reader io.Reader) (interface{}, error)
}

Deserializer can parse a serialized string back to an object

func MakeDeserializer

func MakeDeserializer() Deserializer

MakeDeserializer creates the default deserializer

type InteractiveSerializer

type InteractiveSerializer interface {
	Serializer
	Reset()
}

InteractiveSerializer can gradually serialize the whole data tree.

func NewInteractiveSerializer

func NewInteractiveSerializer() InteractiveSerializer

NewInteractiveSerializer returns a new InteractiveSerializer

type Serializer

type Serializer interface {
	Serialize(item interface{}, writer io.Writer) error
}

Serializer can serialize anything into a json format

func MakeSerializer

func MakeSerializer() Serializer

MakeSerializer creates a default serializer

type TypeRegistry

type TypeRegistry interface {
	Register(interface{})
	GetType(name string) reflect.Type
}

TypeRegistry keeps track of all the types available in the current application.

The TypeRegistry implementation is following this answer on stackoverflow. https://stackoverflow.com/a/34722791/1709930

func GetTypeRegistry

func GetTypeRegistry() TypeRegistry

GetTypeRegistry get the singleton instance of the TypeRegistry

Directories

Path Synopsis
example command

Jump to

Keyboard shortcuts

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