routingslip

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: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KIND_ENTRY        = "routing slip entry"
	KIND_ENTRY_TYPE   = "routing slip entry type"
	KIND_ROUTING_SLIP = "routing slip"
)
View Source
const NAME = "routing-slips"

Variables

This section is empty.

Functions

func EntryUsage

func EntryUsage(scheme EntryTypeScheme, cli bool) string

func Set

func SetSlip

func SetSlip(cv cpi.ComponentVersionAccess, slip *RoutingSlip) error

Types

type Context

type Context = internal.Context

type ContextProvider

type ContextProvider = ocm.ContextProvider

type Entry

type Entry = internal.Entry

func CreateEntry

func CreateEntry(t runtime.VersionedTypedObject) (Entry, error)

type EntryTypeScheme

type EntryTypeScheme = internal.EntryTypeScheme

func DefaultEntryTypeScheme

func DefaultEntryTypeScheme() EntryTypeScheme

func For

type GenericEntry

type GenericEntry = internal.GenericEntry

func NewGenericEntry

func NewGenericEntry(typ string, data interface{}) (*GenericEntry, error)

func NewGenericEntryWith

func NewGenericEntryWith(typ string, attrs ...interface{}) (*GenericEntry, error)

func ToGenericEntry

func ToGenericEntry(e Entry) (*GenericEntry, error)

type HistoryEntries

type HistoryEntries = []HistoryEntry

type HistoryEntry

type HistoryEntry struct {
	Payload   *GenericEntry         `json:"payload"`
	Timestamp metav1.Timestamp      `json:"timestamp"`
	Parent    *digest.Digest        `json:"parent,omitempty"`
	Links     []Link                `json:"links,omitempty"`
	Digest    digest.Digest         `json:"digest"`
	Signature *metav1.SignatureSpec `json:"signature,omitempty"`
}

func AddEntry

func AddEntry(cv cpi.ComponentVersionAccess, name string, algo string, e Entry, links []Link, parent ...digest.Digest) (*HistoryEntry, error)

func (*HistoryEntry) CalculateDigest

func (e *HistoryEntry) CalculateDigest() (digest.Digest, error)

func (*HistoryEntry) Normalize

func (e *HistoryEntry) Normalize() ([]byte, error)

type LabelValue

type LabelValue map[string]HistoryEntries

func (LabelValue) Get

func (l LabelValue) Get(name string) (*RoutingSlip, error)

func (LabelValue) Has

func (l LabelValue) Has(name string) bool

func (LabelValue) Leaves

func (l LabelValue) Leaves() []Link

func (LabelValue) Query

func (l LabelValue) Query(name string) (*RoutingSlip, error)

func (LabelValue) Set

func (l LabelValue) Set(slip *RoutingSlip)
type Link struct {
	Name   string        `json:"name"`
	Digest digest.Digest `json:"digest"`
}

func (Link) Compare

func (l Link) Compare(o Link) int

type RoutingSlip

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

func GetSlip

func GetSlip(cv cpi.ComponentVersionAccess, name string) (*RoutingSlip, error)

func NewRoutingSlip

func NewRoutingSlip(name string, acc LabelValue) (*RoutingSlip, error)

func (*RoutingSlip) Add

func (s *RoutingSlip) Add(ctx Context, name string, algo string, e Entry, links []Link, parent ...digest.Digest) (*HistoryEntry, error)

func (*RoutingSlip) Entries

func (s *RoutingSlip) Entries() HistoryEntries

func (*RoutingSlip) Get

func (s *RoutingSlip) Get(i int) *HistoryEntry

func (*RoutingSlip) GetName

func (s *RoutingSlip) GetName() string

func (*RoutingSlip) Index

func (s *RoutingSlip) Index() RoutingSlipIndex

func (*RoutingSlip) Leaves

func (s *RoutingSlip) Leaves() []digest.Digest

func (*RoutingSlip) Len

func (s *RoutingSlip) Len() int

func (*RoutingSlip) Lookup

func (s *RoutingSlip) Lookup(d digest.Digest) *HistoryEntry

func (*RoutingSlip) Verify

func (s *RoutingSlip) Verify(ctx Context, name string, sig bool) error

type RoutingSlipIndex

type RoutingSlipIndex map[digest.Digest]*HistoryEntry

func (RoutingSlipIndex) Leaves

func (s RoutingSlipIndex) Leaves() []digest.Digest

func (RoutingSlipIndex) Verify

func (s RoutingSlipIndex) Verify(ctx Context, name string, issuer *pkix.Name, sig bool, acc SlipAccess) error

type SlipAccess

type SlipAccess interface {
	Get(name string) (*RoutingSlip, error)
}

Directories

Path Synopsis
plugin
Package plugin is an adapter implementation that provides a generic handling of all ValueSets provided by plugins.
Package plugin is an adapter implementation that provides a generic handling of all ValueSets provided by plugins.

Jump to

Keyboard shortcuts

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