Documentation ¶
Overview ¶
Package runtime contains the structs and definitions consumed by Preflight at runtime.
Index ¶
- Variables
- func PyxisHostLookup(pyxisEnv, hostOverride string) string
- func ScorecardImage(ctx context.Context, userProvidedScorecardImage string) string
- type AssetData
- type Config
- type OpenshiftClusterVersion
- type ReadOnlyConfig
- func (ro *ReadOnlyConfig) Artifacts() string
- func (ro *ReadOnlyConfig) CSVTimeout() time.Duration
- func (ro *ReadOnlyConfig) CertificationProjectID() string
- func (ro *ReadOnlyConfig) Channel() string
- func (ro *ReadOnlyConfig) DockerConfig() string
- func (ro *ReadOnlyConfig) Image() string
- func (ro *ReadOnlyConfig) IndexImage() string
- func (ro *ReadOnlyConfig) Insecure() bool
- func (ro *ReadOnlyConfig) IsBundle() bool
- func (ro *ReadOnlyConfig) IsScratch() bool
- func (ro *ReadOnlyConfig) Kubeconfig() string
- func (ro *ReadOnlyConfig) LogFile() string
- func (ro *ReadOnlyConfig) Namespace() string
- func (ro *ReadOnlyConfig) Platform() string
- func (ro *ReadOnlyConfig) Policy() policy.Policy
- func (ro *ReadOnlyConfig) PyxisAPIToken() string
- func (ro *ReadOnlyConfig) PyxisHost() string
- func (ro *ReadOnlyConfig) ResponseFormat() string
- func (ro *ReadOnlyConfig) ScorecardImage() string
- func (ro *ReadOnlyConfig) ScorecardWaitTime() string
- func (ro *ReadOnlyConfig) ServiceAccount() string
- func (ro *ReadOnlyConfig) Submit() bool
- func (ro *ReadOnlyConfig) WriteJUnit() bool
- type ResultWriterFile
Constants ¶
This section is empty.
Variables ¶
var ( DefaultCSVTimeout = 180 * time.Second DefaultSubscriptionTimeout = 180 * time.Second DefaultScorecardWaitTime = "240" )
Functions ¶
func PyxisHostLookup ¶
Types ¶
type AssetData ¶
type AssetData struct {
Images []string `json:"images"`
}
Assets is the publicly accessible representation of Preflight's used assets. This struct will be serialized to JSON and presented to the end-user when requested.
type Config ¶
type Config struct { Image string Policy policy.Policy ResponseFormat string Bundle bool Scratch bool LogFile string Artifacts string WriteJUnit bool // Container-Specific Fields CertificationProjectID string PyxisHost string PyxisAPIToken string DockerConfig string Submit bool Platform string Insecure bool Offline bool ManifestListDigest string // Operator-Specific Fields Namespace string ServiceAccount string ScorecardImage string ScorecardWaitTime string Channel string IndexImage string Kubeconfig string CSVTimeout time.Duration SubscriptionTimeout time.Duration }
Config contains configuration details for running preflight.
func NewConfigFrom ¶
NewConfigFrom will return a runtime.Config based on the stored inputs in the provided viper.Viper. Note that shared configuration should be set in this function, and not in policy-specific functions. Defaults, should also be set after this function has been called.
func (*Config) CraneDockerConfig ¶
This is to satisfy the CraneConfig interface
func (*Config) CraneInsecure ¶
func (*Config) CranePlatform ¶
func (*Config) ReadOnly ¶
func (c *Config) ReadOnly() *ReadOnlyConfig
ReadOnly returns an uneditably configuration.
type OpenshiftClusterVersion ¶
func UnknownOpenshiftClusterVersion ¶
func UnknownOpenshiftClusterVersion() OpenshiftClusterVersion
type ReadOnlyConfig ¶
type ReadOnlyConfig struct {
// contains filtered or unexported fields
}
ReadOnlyConfig is a Config that cannot be modified. It implements certification.Configurable.
func (*ReadOnlyConfig) Artifacts ¶
func (ro *ReadOnlyConfig) Artifacts() string
func (*ReadOnlyConfig) CSVTimeout ¶
func (ro *ReadOnlyConfig) CSVTimeout() time.Duration
func (*ReadOnlyConfig) CertificationProjectID ¶
func (ro *ReadOnlyConfig) CertificationProjectID() string
func (*ReadOnlyConfig) Channel ¶
func (ro *ReadOnlyConfig) Channel() string
func (*ReadOnlyConfig) DockerConfig ¶
func (ro *ReadOnlyConfig) DockerConfig() string
func (*ReadOnlyConfig) Image ¶
func (ro *ReadOnlyConfig) Image() string
func (*ReadOnlyConfig) IndexImage ¶
func (ro *ReadOnlyConfig) IndexImage() string
func (*ReadOnlyConfig) Insecure ¶
func (ro *ReadOnlyConfig) Insecure() bool
func (*ReadOnlyConfig) IsBundle ¶
func (ro *ReadOnlyConfig) IsBundle() bool
func (*ReadOnlyConfig) IsScratch ¶
func (ro *ReadOnlyConfig) IsScratch() bool
func (*ReadOnlyConfig) Kubeconfig ¶
func (ro *ReadOnlyConfig) Kubeconfig() string
func (*ReadOnlyConfig) LogFile ¶
func (ro *ReadOnlyConfig) LogFile() string
func (*ReadOnlyConfig) Namespace ¶
func (ro *ReadOnlyConfig) Namespace() string
func (*ReadOnlyConfig) Platform ¶
func (ro *ReadOnlyConfig) Platform() string
func (*ReadOnlyConfig) Policy ¶
func (ro *ReadOnlyConfig) Policy() policy.Policy
func (*ReadOnlyConfig) PyxisAPIToken ¶
func (ro *ReadOnlyConfig) PyxisAPIToken() string
func (*ReadOnlyConfig) PyxisHost ¶
func (ro *ReadOnlyConfig) PyxisHost() string
func (*ReadOnlyConfig) ResponseFormat ¶
func (ro *ReadOnlyConfig) ResponseFormat() string
func (*ReadOnlyConfig) ScorecardImage ¶
func (ro *ReadOnlyConfig) ScorecardImage() string
func (*ReadOnlyConfig) ScorecardWaitTime ¶
func (ro *ReadOnlyConfig) ScorecardWaitTime() string
func (*ReadOnlyConfig) ServiceAccount ¶
func (ro *ReadOnlyConfig) ServiceAccount() string
func (*ReadOnlyConfig) Submit ¶
func (ro *ReadOnlyConfig) Submit() bool
func (*ReadOnlyConfig) WriteJUnit ¶
func (ro *ReadOnlyConfig) WriteJUnit() bool
type ResultWriterFile ¶
type ResultWriterFile struct {
// contains filtered or unexported fields
}
ResultWriterFile implements a ResultWriter for use at preflight runtime.
func (*ResultWriterFile) Close ¶
func (f *ResultWriterFile) Close() error
func (*ResultWriterFile) OpenFile ¶
func (f *ResultWriterFile) OpenFile(name string) (io.WriteCloser, error)
OpenFile will open the expected file for writing.