common

package
v0.18.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapToCompHandlerOptions

func MapToCompHandlerOptions(opts ...Option) comphdlr.Options

func NewTypeHandler

func NewTypeHandler(octx clictx.OCM, opts *output.Options, repo ocm.Repository, session ocm.Session, compspecs []string, hopts ...Option) (utils.TypeHandler, error)

Types

type ElementFilter

type ElementFilter interface {
	Accept(e routingslip.Entry) bool
}

type Manifest

type Manifest struct {
	Component string `json:"component"`
	Version   string `json:"version"`
	Error     string `json:"error,omitempty"`

	RoutingSlip string                    `json:"routingSlip,omitempty"`
	Entry       *routingslip.HistoryEntry `json:"entry,omitempty"`
}

type Object

type Object struct {
	Component    *comphdlr.Object
	Slip         string
	Error        string
	HistoryEntry *routingslip.HistoryEntry
	Payload      routingslip.Entry
}

func Elem

func Elem(e interface{}) *Object

func (*Object) AsManifest

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

type Objects

type Objects []*Object

type Option

type Option interface {
	ApplyToElemHandler(handler *TypeHandler)
}

func LatestOnly

func LatestOnly(b ...bool) Option

func WithFilter

func WithFilter(fi ElementFilter) Option

func WithTypes

func WithTypes(types []string) Option

func WithVerification

func WithVerification(flag ...bool) Option

func WithVersionConstraints

func WithVersionConstraints(c []*semver.Constraints) Option

type Options

type Options []Option

func OptionsFor

func OptionsFor(o options.OptionSetProvider) Options

func (Options) ApplyToElemHandler

func (o Options) ApplyToElemHandler(handler *TypeHandler)

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)

func (*TypeHandler) SetFilter

func (h *TypeHandler) SetFilter(f ElementFilter)

Jump to

Keyboard shortcuts

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