Documentation
¶
Overview ¶
Package sourceview reduces the source a PtahSchema or a PtahMigration last resolved to what `kubectl ptah` prints: which kind of source it is, where it was read from, and what it resolved to.
Everything comes from the resource's status, which records no credential, so neither does a view. A Git repository URL cannot carry one: the API refuses a URL with user information other than an SSH user name.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type View ¶
type View struct {
Kind Kind `json:"kind"`
// Reference is an OCI artifact with its tag replaced by the digest it
// resolved to, and Digest that digest on its own.
Reference string `json:"reference,omitempty"`
Digest string `json:"digest,omitempty"`
// Verified says an OCI artifact's verification policy accepted it.
Verified bool `json:"verified,omitempty"`
// ConfigMap is the ConfigMap the files were read from, and Snapshot the
// immutable copy every operation reads.
ConfigMap string `json:"configMap,omitempty"`
Snapshot string `json:"snapshot,omitempty"`
// Repository, Ref and Path are what a Git source asked for, and Commit
// what the ref named when it resolved.
Repository string `json:"repository,omitempty"`
Ref *operatorv1alpha1.GitRef `json:"ref,omitempty"`
Path string `json:"path,omitempty"`
Commit string `json:"commit,omitempty"`
// ContentDigest is the digest of a ConfigMap or Git source's selected
// files, the content a plan computed from them is bound to.
ContentDigest string `json:"contentDigest,omitempty"`
// SourcePolicyDigest is the content of the source policy the resolution
// was checked against, when the resource names one.
SourcePolicyDigest string `json:"sourcePolicyDigest,omitempty"`
}
View is one resolved source. The fields of the other kinds stay empty.
func FromMigration ¶
func FromMigration( artifact *operatorv1alpha1.SourceAccessBinding, configMap *operatorv1alpha1.ConfigMapSourceRevision, policy *operatorv1alpha1.SourcePolicyBinding, ) *View
FromMigration is the source a migration last resolved, or nil before the first resolution. A migration's verification is a condition rather than a status field, so an OCI view says nothing about it.
func FromSchema ¶
func FromSchema(status operatorv1alpha1.SchemaSourceStatus) *View
FromSchema is the source a schema last resolved, or nil before the first resolution.