codec

package
v0.0.0-...-3cc3ff2 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Constructor

type Constructor interface {
	Name() string
	New(resource string, specs *specs.ParameterMap) (Manager, error)
}

Constructor is capable of constructing new codec managers for the given resource and specs

type Constructors

type Constructors map[string]Constructor

Constructors represent a collection of codec constructors

func (Constructors) Get

func (collection Constructors) Get(key string) Constructor

Get attempts to fetch a codec constructor from the collection matching the given key

type Manager

type Manager interface {
	Name() string
	Property() *specs.Property
	Marshal(references.Store) (io.Reader, error)
	Unmarshal(io.Reader, references.Store) error
}

Manager represents a marshal/unmarshal codec for a given caller

Directories

Path Synopsis
Package metadata allows for the definition of metadata such as headers
Package metadata allows for the definition of metadata such as headers

Jump to

Keyboard shortcuts

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