infodata

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2020 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more 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

func UpsertInfoData

func UpsertInfoData(resourceDataList *gardencorev1alpha1helper.GardenerResourceDataList, name string, data InfoData) error

UpsertInfoData updates or inserts an InfoData object into the GardenerResourceDataList

Types

type InfoData

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

InfoData is an interface

func GetInfoData

func GetInfoData(resourceDataList gardencorev1alpha1helper.GardenerResourceDataList, name string) (InfoData, error)

GetInfoData retrieves the go representation of an object from the GardenerResourceDataList

func Unmarshal

Unmarshal unmarshals a GardenerResourceData into its respective Go struct representation

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 GetUnmarshaller

func GetUnmarshaller(typeName TypeVersion) Unmarshaller

GetUnmarshaller returns an Unmarshaller for the given typeName.

Jump to

Keyboard shortcuts

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