Documentation ¶
Index ¶
- Constants
- func CheckLabelVersion(v string) bool
- func IsASCII(s string) bool
- func IsIdentity(s string) bool
- func ValidateIdentity(fldPath *field.Path, id Identity) field.ErrorList
- func ValidateLabels(fldPath *field.Path, labels Labels) field.ErrorList
- func ValidateRelation(fldPath *field.Path, relation ResourceRelation) *field.Error
- type ArtefactDigest
- type ArtefactDigests
- type DigestSpec
- type Identity
- func (i Identity) Copy() Identity
- func (in Identity) DeepCopy() Identity
- func (in Identity) DeepCopyInto(out *Identity)
- func (i Identity) Digest() []byte
- func (i Identity) Equals(o Identity) bool
- func (i Identity) Get(name string) string
- func (i Identity) Match(obj map[string]string) (bool, error)
- func (i Identity) Remove(name string) bool
- func (i *Identity) Set(name, value string)
- func (i Identity) String() string
- type Label
- type LabelOption
- type Labels
- func (l *Labels) AsMap() map[string]interface{}
- func (l Labels) Copy() Labels
- func (in Labels) DeepCopy() Labels
- func (in Labels) DeepCopyInto(out *Labels)
- func (l Labels) Get(name string) ([]byte, bool)
- func (l Labels) GetValue(name string, dest interface{}) (bool, error)
- func (l *Labels) Remove(name string) bool
- func (l *Labels) Set(name string, value interface{}, opts ...LabelOption) error
- type Metadata
- type NestedComponentDigests
- func (d *NestedComponentDigests) Copy() *NestedComponentDigests
- func (in *NestedComponentDigests) DeepCopy() *NestedComponentDigests
- func (in *NestedComponentDigests) DeepCopyInto(out *NestedComponentDigests)
- func (d *NestedComponentDigests) Lookup(name, version string, extra Identity) *ArtefactDigest
- func (d *NestedComponentDigests) String() string
- type NestedDigests
- type ObjectMeta
- type Provider
- type ProviderName
- type ResourceReference
- type ResourceRelation
- type Signature
- type SignatureSpec
- type Signatures
- type StringMap
- type Timestamp
- func (t *Timestamp) Add(d time.Duration) Timestamp
- func (in *Timestamp) DeepCopy() *Timestamp
- func (in *Timestamp) DeepCopyInto(out *Timestamp)
- func (t *Timestamp) Equal(o Timestamp) bool
- func (t Timestamp) MarshalJSON() ([]byte, error)
- func (t *Timestamp) Time() time.Time
- func (t *Timestamp) UTC() Timestamp
- func (t *Timestamp) UnmarshalJSON(data []byte) error
- type TypeMeta
Constants ¶
const ( // ExcludeFromSignature used in digest field for normalisationAlgorithm (in combination with NoDigest for hashAlgorithm and value) // to indicate the resource content should not be part of the signature. ExcludeFromSignature = "EXCLUDE-FROM-SIGNATURE" // NoDigest used in digest field for hashAlgorithm and value (in combination with ExcludeFromSignature for normalisationAlgorithm) // to indicate the resource content should not be part of the signature. NoDigest = "NO-DIGEST" )
const ( SystemIdentityName = "name" SystemIdentityVersion = "version" )
const ( GROUP = "ocm.software" KIND = "ComponentVersion" )
const IdentityKeyValidationErrMsg string = "" /* 147-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func CheckLabelVersion ¶
func IsIdentity ¶
func ValidateIdentity ¶
ValidateIdentity validates the identity of object.
func ValidateLabels ¶
ValidateLabels validates a list of labels.
func ValidateRelation ¶
func ValidateRelation(fldPath *field.Path, relation ResourceRelation) *field.Error
Types ¶
type ArtefactDigest ¶
type ArtefactDigest struct { Name string `json:"name"` Version string `json:"version"` ExtraIdentity Identity `json:"extraIdentity,omitempty"` Digest DigestSpec `json:"digest"` }
ArtefactDigest defines artefact digest information. +k8s:deepcopy-gen=true +k8s:openapi-gen=true
func (*ArtefactDigest) Copy ¶
func (d *ArtefactDigest) Copy() *ArtefactDigest
func (*ArtefactDigest) DeepCopy ¶
func (in *ArtefactDigest) DeepCopy() *ArtefactDigest
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArtefactDigest.
func (*ArtefactDigest) DeepCopyInto ¶
func (in *ArtefactDigest) DeepCopyInto(out *ArtefactDigest)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ArtefactDigest) String ¶
func (d *ArtefactDigest) String() string
type ArtefactDigests ¶
type ArtefactDigests []ArtefactDigest
ArtefactDigests defines a list of artefact digest information. +k8s:deepcopy-gen=true +k8s:openapi-gen=true
func (ArtefactDigests) DeepCopy ¶
func (in ArtefactDigests) DeepCopy() ArtefactDigests
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArtefactDigests.
func (ArtefactDigests) DeepCopyInto ¶
func (in ArtefactDigests) DeepCopyInto(out *ArtefactDigests)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ArtefactDigests) Lookup ¶
func (d ArtefactDigests) Lookup(name, version string, extra Identity) *ArtefactDigest
func (ArtefactDigests) Match ¶
func (d ArtefactDigests) Match(o ArtefactDigests) bool
type DigestSpec ¶
type DigestSpec struct { HashAlgorithm string `json:"hashAlgorithm"` NormalisationAlgorithm string `json:"normalisationAlgorithm"` Value string `json:"value"` }
DigestSpec defines a digest. +k8s:deepcopy-gen=true +k8s:openapi-gen=true
func NewExcludeFromSignatureDigest ¶
func NewExcludeFromSignatureDigest() *DigestSpec
NewExcludeFromSignatureDigest returns the special digest notation to indicate the resource content should not be part of the signature.
func (*DigestSpec) Copy ¶
func (d *DigestSpec) Copy() *DigestSpec
Copy provides a copy of the digest spec.
func (*DigestSpec) DeepCopy ¶
func (in *DigestSpec) DeepCopy() *DigestSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DigestSpec.
func (*DigestSpec) DeepCopyInto ¶
func (in *DigestSpec) DeepCopyInto(out *DigestSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DigestSpec) String ¶
func (d *DigestSpec) String() string
type Identity ¶
Identity describes the identity of an object. Only ascii characters are allowed +k8s:deepcopy-gen=true +k8s:openapi-gen=true
func NewIdentity ¶
NewIdentity return a simple name identity.
func (Identity) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Identity.
func (Identity) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Label ¶
type Label struct { // Name is the unique name of the label. Name string `json:"name"` // Value is the json/yaml data of the label // +kubebuilder:pruning:PreserveUnknownFields // +kubebuilder:validation:Schemaless Value json.RawMessage `json:"value"` // Version is the optional specification version of the attribute value Version string `json:"version,omitempty"` // Signing describes whether the label should be included into the signature Signing bool `json:"signing,omitempty"` }
Label is a label that can be set on objects. +k8s:deepcopy-gen=true +k8s:openapi-gen=true
type LabelOption ¶
func WithSigning ¶
func WithSigning(b ...bool) LabelOption
func WithVersion ¶
func WithVersion(v string) LabelOption
type Labels ¶
type Labels []Label
Labels describe a list of labels +k8s:deepcopy-gen=true +k8s:openapi-gen=true
func (Labels) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Labels.
func (Labels) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Metadata ¶
type Metadata struct { // Version is the schema version of the component descriptor. Version string `json:"schemaVersion"` }
Metadata defines the metadata of the component descriptor. +k8s:deepcopy-gen=true +k8s:openapi-gen=true
func (*Metadata) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Metadata.
func (*Metadata) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NestedComponentDigests ¶
type NestedComponentDigests struct { Name string `json:"name"` Version string `json:"version"` Digest *DigestSpec `json:"digest,omitempty"` Resources ArtefactDigests `json:"resourceDigests,omitempty"` }
NestedComponentDigests defines nested components. +k8s:deepcopy-gen=true +k8s:openapi-gen=true
func (*NestedComponentDigests) Copy ¶
func (d *NestedComponentDigests) Copy() *NestedComponentDigests
func (*NestedComponentDigests) DeepCopy ¶
func (in *NestedComponentDigests) DeepCopy() *NestedComponentDigests
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NestedComponentDigests.
func (*NestedComponentDigests) DeepCopyInto ¶
func (in *NestedComponentDigests) DeepCopyInto(out *NestedComponentDigests)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NestedComponentDigests) Lookup ¶
func (d *NestedComponentDigests) Lookup(name, version string, extra Identity) *ArtefactDigest
func (*NestedComponentDigests) String ¶
func (d *NestedComponentDigests) String() string
type NestedDigests ¶
type NestedDigests []NestedComponentDigests
NestedDigests defines a list of nested components. +k8s:deepcopy-gen=true +k8s:openapi-gen=true
func (NestedDigests) Copy ¶
func (d NestedDigests) Copy() NestedDigests
func (NestedDigests) DeepCopy ¶
func (in NestedDigests) DeepCopy() NestedDigests
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NestedDigests.
func (NestedDigests) DeepCopyInto ¶
func (in NestedDigests) DeepCopyInto(out *NestedDigests)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (NestedDigests) Lookup ¶
func (d NestedDigests) Lookup(name, version string) *NestedComponentDigests
func (NestedDigests) String ¶
func (d NestedDigests) String() string
type ObjectMeta ¶
type ObjectMeta struct { // Name is the name of the component. Name string `json:"name"` // Version is the version of the component. Version string `json:"version"` // Labels describe additional properties of the component version Labels Labels `json:"labels,omitempty"` // Provider described the component provider Provider Provider `json:"provider"` // CreationTime is the creation time of component version // +optional CreationTime *Timestamp `json:"creationTime,omitempty"` }
ObjectMeta defines the metadata of the component descriptor.
func (*ObjectMeta) Copy ¶
func (o *ObjectMeta) Copy() *ObjectMeta
GetName returns the name of the object.
func (ObjectMeta) GetLabels ¶
func (o ObjectMeta) GetLabels() Labels
GetLabels returns the label of the object.
func (ObjectMeta) GetName ¶
func (o ObjectMeta) GetName() string
GetName returns the name of the object.
func (ObjectMeta) GetVersion ¶
func (o ObjectMeta) GetVersion() string
GetVersion returns the version of the object.
func (*ObjectMeta) SetLabels ¶
func (o *ObjectMeta) SetLabels(labels []Label)
SetLabels sets the labels of the object.
func (*ObjectMeta) SetName ¶
func (o *ObjectMeta) SetName(name string)
SetName sets the name of the object.
func (*ObjectMeta) SetVersion ¶
func (o *ObjectMeta) SetVersion(version string)
SetVersion sets the version of the object.
type Provider ¶
type Provider struct { Name ProviderName `json:"name"` // Labels describe additional properties of provider Labels Labels `json:"labels,omitempty"` }
Provider describes the provider information of a component version.
func (Provider) GetName ¶
func (o Provider) GetName() ProviderName
GetName returns the name of the provider.
func (*Provider) SetName ¶
func (o *Provider) SetName(name ProviderName)
SetName sets the name of the provider.
type ProviderName ¶
type ProviderName string
ProviderName describes the provider type of component in the origin's context. Defines whether the component is created by a third party or internally. +k8s:deepcopy-gen=true +k8s:openapi-gen=true
type ResourceReference ¶
type ResourceReference struct { Resource Identity `json:"resource,omitempty"` ReferencePath []Identity `json:"referencePath,omitempty"` }
ResourceReference describes re resource identity relative to an (aggregation) component version.
func NewNestedResourceRef ¶
func NewNestedResourceRef(id Identity, path []Identity) ResourceReference
func NewResourceRef ¶
func NewResourceRef(id Identity) ResourceReference
func (*ResourceReference) String ¶
func (r *ResourceReference) String() string
type ResourceRelation ¶
type ResourceRelation string
ResourceRelation describes the type of a resource. Defines whether the component is created by a third party or internally. +k8s:deepcopy-gen=true +k8s:openapi-gen=true
const ( // LocalRelation defines a internal relation // which describes a internally maintained resource in the origin's context. LocalRelation ResourceRelation = "local" // ExternalRelation defines a external relation // which describes a resource maintained by a third party vendor in the origin's context. ExternalRelation ResourceRelation = "external" )
type Signature ¶
type Signature struct { Name string `json:"name"` Digest DigestSpec `json:"digest"` Signature SignatureSpec `json:"signature"` }
Signature defines a digest and corresponding signature, identifiable by name. +k8s:deepcopy-gen=true +k8s:openapi-gen=true
func (*Signature) ConvertToSigning ¶
ConvertToSigning converts a cd signature to a signing signature.
func (*Signature) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Signature.
func (*Signature) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SignatureSpec ¶
type SignatureSpec struct { Algorithm string `json:"algorithm"` Value string `json:"value"` MediaType string `json:"mediaType"` Issuer string `json:"issuer,omitempty"` }
SignatureSpec defines a signature. +k8s:deepcopy-gen=true +k8s:openapi-gen=true
func (*SignatureSpec) DeepCopy ¶
func (in *SignatureSpec) DeepCopy() *SignatureSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SignatureSpec.
func (*SignatureSpec) DeepCopyInto ¶
func (in *SignatureSpec) DeepCopyInto(out *SignatureSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Signatures ¶
type Signatures []Signature
Signatures is a list of signatures.
func (Signatures) Copy ¶
func (s Signatures) Copy() Signatures
func (Signatures) Get ¶
func (s Signatures) Get(i int) *Signature
func (Signatures) Len ¶
func (s Signatures) Len() int
type Timestamp ¶
type Timestamp struct {
// contains filtered or unexported fields
}
Timestamp is time rounded to seconds. +k8s:deepcopy-gen=true
func NewTimestamp ¶
func NewTimestamp() Timestamp
func NewTimestampFor ¶
func NewTimestampP ¶
func NewTimestampP() *Timestamp
func (*Timestamp) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Timestamp.
func (*Timestamp) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (Timestamp) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface. The time is a quoted string in RFC 3339 format, with sub-second precision added if present.