elemhdlr

package
v0.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AccessOutput = []string{"ACCESSTYPE", "ACCESSSPEC"}
View Source
var MetaOutput = []string{"NAME", "VERSION", "IDENTITY"}

Sort is a processing chain sorting original objects provided by type handler.

Functions

func Compare

func Compare(a, b interface{}) int

func MapAccessOutput

func MapAccessOutput(e compdesc.AccessSpec) []string

func MapMetaOutput

func MapMetaOutput(e interface{}) []string

func NewTypeHandler

func NewTypeHandler(octx clictx.OCM, oopts *output.Options, repobase ocm.Repository, session ocm.Session, kind string, compspecs []string, elemaccess func(ocm.ComponentVersionAccess) compdesc.ElementAccessor, hopts ...Option) (utils.TypeHandler, error)

Types

type Manifest

type Manifest struct {
	History common.History               `json:"context"`
	Element compdesc.ElementMetaAccessor `json:"element"`
}

type Object

type Object struct {
	History common.History
	Version ocm.ComponentVersionAccess
	Spec    metav1.Identity
	Id      metav1.Identity
	Node    *common.NameVersion
	Element compdesc.ElementMetaAccessor
}

func (*Object) AsManifest

func (o *Object) AsManifest() interface{}

func (*Object) Compare

func (o *Object) Compare(b *Object) int

func (*Object) GetHistory

func (o *Object) GetHistory() common.History

func (*Object) IsNode

func (o *Object) IsNode() *common.NameVersion

func (*Object) IsValid

func (o *Object) IsValid() bool

type Objects

type Objects []*Object

func ObjectSlice

func ObjectSlice(s data.Iterable) Objects

func (Objects) Get

func (this Objects) Get(i int) interface{}

func (Objects) Iterator

func (this Objects) Iterator() data.Iterator

func (Objects) Len

func (this Objects) Len() int

type Option

type Option interface {
	Apply(handler *TypeHandler)
}

func ForceEmpty

func ForceEmpty(b bool) Option

type TypeHandler

type TypeHandler struct {
	// contains filtered or unexported fields
}

func (*TypeHandler) All

func (h *TypeHandler) All() ([]output.Object, error)

func (*TypeHandler) Close

func (h *TypeHandler) Close() error

func (*TypeHandler) Get

func (h *TypeHandler) Get(elemspec utils.ElemSpec) ([]output.Object, error)

Jump to

Keyboard shortcuts

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