Documentation ¶
Index ¶
- Constants
- func EntryUsage(scheme EntryTypeScheme, cli bool) string
- func Set(cv cpi.ComponentVersionAccess, label LabelValue) error
- func SetSlip(cv cpi.ComponentVersionAccess, slip *RoutingSlip) error
- type Context
- type ContextProvider
- type Entry
- type EntryTypeScheme
- type GenericEntry
- type HistoryEntries
- type HistoryEntry
- type LabelValue
- type Link
- type RoutingSlip
- func (s *RoutingSlip) Add(ctx Context, name string, algo string, e Entry, links []Link, ...) (*HistoryEntry, error)
- func (s *RoutingSlip) Entries() HistoryEntries
- func (s *RoutingSlip) Get(i int) *HistoryEntry
- func (s *RoutingSlip) GetName() string
- func (s *RoutingSlip) Index() RoutingSlipIndex
- func (s *RoutingSlip) Leaves() []digest.Digest
- func (s *RoutingSlip) Len() int
- func (s *RoutingSlip) Lookup(d digest.Digest) *HistoryEntry
- func (s *RoutingSlip) Verify(ctx Context, name string, sig bool) error
- type RoutingSlipIndex
- type SlipAccess
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 Set(cv cpi.ComponentVersionAccess, label LabelValue) error
func SetSlip ¶
func SetSlip(cv cpi.ComponentVersionAccess, slip *RoutingSlip) error
Types ¶
type ContextProvider ¶
type ContextProvider = ocm.ContextProvider
type Entry ¶
func CreateEntry ¶
func CreateEntry(t runtime.VersionedTypedObject) (Entry, error)
type EntryTypeScheme ¶
type EntryTypeScheme = internal.EntryTypeScheme
func DefaultEntryTypeScheme ¶
func DefaultEntryTypeScheme() EntryTypeScheme
func For ¶
func For(ctx ContextProvider) EntryTypeScheme
type GenericEntry ¶
type GenericEntry = internal.GenericEntry
func AsGenericEntry ¶
func AsGenericEntry(u *runtime.UnstructuredTypedObject) *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 Get ¶
func Get(cv cpi.ComponentVersionAccess) (LabelValue, error)
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 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
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)
}
Click to show internal directories.
Click to hide internal directories.