Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SortVersions ¶
Types ¶
type IdentityConverter ¶
type IdentityConverter[O Object] struct{}
func (IdentityConverter[O]) ConvertFrom ¶
func (c IdentityConverter[O]) ConvertFrom(o O) (Object, error)
func (IdentityConverter[O]) ConvertTo ¶
func (c IdentityConverter[O]) ConvertTo(o Object) (O, error)
type KnownTypes ¶
type Object ¶
type Object = runtime.VersionedTypedObject
type ObjectDecoder ¶
type ObjectDecoder[O Object] interface { Decode(data []byte, unmarshaler runtime.Unmarshaler) (O, error) }
ObjectDecoder is able to provide an effective typed object for some serilaized form. The technical deserialization is done by an Unmarshaler.
type ObjectEncoder ¶
ObjectEncoder is able to provide a versioned representation of an effective Object.
type Scheme ¶
type Scheme[O Object, T Type[O]] interface { RegisterKind(kind Kind) RegisterType(name string, otype T) error GetType(name string) T GetKind(kind string) Kind Decode(data []byte, unmarshaler runtime.Unmarshaler) (O, error) Encode(obj O, marshaler runtime.Marshaler) ([]byte, error) KnownTypes() KnownTypes[O, T] KnownKinds() []string KnownVersions(kind string) []string }
type Type ¶
type Type[O Object] interface { ObjectDecoder[O] ObjectEncoder[O] }
func NewIdentityType ¶
type VersionCache ¶
type VersionCache map[string]*semver.Version
func (VersionCache) Get ¶
func (c VersionCache) Get(v string) (*semver.Version, error)
Click to show internal directories.
Click to hide internal directories.