infodata

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2020 License: Apache-2.0, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(typeversion TypeVersion, unmarshaller Unmarshaller)

Register is used to register new InfoData type versions

Types

type InfoData

type InfoData interface {
	TypeVersion() TypeVersion
	Marshal() ([]byte, error)
}

InfoData is the common interface of all info data object types

func Unmarshal

func Unmarshal(entry *InfoDataEntry) (InfoData, error)

Unmarshal is used to extract the Go representation of an InfoData entry

type InfoDataEntry

type InfoDataEntry struct {
	Name string               `json:"name"`
	Type TypeVersion          `json:"type"`
	Data runtime.RawExtension `json:"data"`
}

InfoDataEntry is the structure an InfoData object is stored in an InfoDataList

type InfoDataList

type InfoDataList []InfoDataEntry

InfoDataList is a store for labeled InfoData objects

func (*InfoDataList) Delete

func (this *InfoDataList) Delete(name string)

Delete deletes an InfoData ovject with the given label from the list

func (*InfoDataList) Get

func (this *InfoDataList) Get(name string) (InfoData, error)

Get returns the InfoData object with a dedicatd label stored in this list

func (*InfoDataList) Set

func (this *InfoDataList) Set(name string, data InfoData) error

Set is used to set an InfoData object for a dedicated label

type TypeVersion

type TypeVersion string

TypeVersion is the potentially versioned type name of an InfoData representation.

type Unmarshaller

type Unmarshaller func(data []byte) (InfoData, error)

Unmarshaller is a factory to create a dedicated InfoData object from a byte stream

func UnmarshalFunc

func UnmarshalFunc(elem InfoData) Unmarshaller

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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