Documentation
¶
Overview ¶
Package oci implements all the interactions with remote registry.
Index ¶
Constants ¶
const ( // FalcoRulesfileConfigMediaType is the MediaType for rule's config layer. FalcoRulesfileConfigMediaType = "application/vnd.cncf.falco.rulesfile.config.v1+json" // FalcoRulesfileLayerMediaType is the MediaType for rules. FalcoRulesfileLayerMediaType = "application/vnd.cncf.falco.rulesfile.layer.v1+tar.gz" // FalcoPluginConfigMediaType is the MediaType for plugin's config layer. FalcoPluginConfigMediaType = "application/vnd.cncf.falco.plugin.config.v1+json" // FalcoPluginLayerMediaType is the MediaType for plugins. FalcoPluginLayerMediaType = "application/vnd.cncf.falco.plugin.layer.v1+tar.gz" // DefaultRegistry is the default container registry to use. DefaultRegistry = "ghcr.io" // DefaultTag is the default tag reference to be used when none is provided. DefaultTag = "latest" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArtifactConfig ¶
type ArtifactConfig struct {
Dependencies []ArtifactDependency `json:"dependencies,omitempty"`
}
ArtifactConfig is the struct stored in the config layer of rulesfile and plugin artifacts. Each type fills only the fields of interest.
func (*ArtifactConfig) ParseDependencies ¶
func (rc *ArtifactConfig) ParseDependencies(dependencies ...string) error
ParseDependencies parses artifact dependencies in the format "name:version|alt1:version1|..." and set them in the config.
func (*ArtifactConfig) SetDepedency ¶
func (rc *ArtifactConfig) SetDepedency(name, version string) int
SetDepedency stores an artifact dependency in the config.
Return the insertion position.
type ArtifactDependency ¶
type ArtifactDependency struct { Name string `json:"name"` Version string `json:"version"` Alternatives []dependency `json:"alternatives,omitempty"` }
ArtifactDependency represents the artifact's depedendency to be stored in the config.
func (*ArtifactDependency) SetAlternative ¶
func (a *ArtifactDependency) SetAlternative(name, version string)
SetAlternative sets an alternative dependency for an artifact dependency.
type ArtifactType ¶
type ArtifactType string
ArtifactType represents a rules file or a plugin. Used to select the right mediaType when interacting with the registry.
const ( // Rulesfile represents a rules file artifact. Rulesfile ArtifactType = "rulesfile" // Plugin represents a plugin artifact. Plugin ArtifactType = "plugin" )
func (*ArtifactType) String ¶
func (e *ArtifactType) String() string
String returns a string representation of ArtifactType.
func (*ArtifactType) Type ¶
func (e *ArtifactType) Type() string
Type returns a string representing this type.
type RegistryResult ¶
type RegistryResult struct { Digest string Config ArtifactConfig Type ArtifactType Filename string }
RegistryResult represents a generic result that is generated when interacting with a remote OCI registry.
Directories
¶
Path | Synopsis |
---|---|
Package authn implements the logic for authentication with OCI registries.
|
Package authn implements the logic for authentication with OCI registries. |
Package puller implements the logic for pull operations.
|
Package puller implements the logic for pull operations. |
Package pusher implements the logic for push operations.
|
Package pusher implements the logic for push operations. |