Documentation ¶
Index ¶
- Variables
- func DecodeConfig(reader io.Reader, config *Config) error
- func DecodeExtensionConfig(reader io.Reader, extensionConfig *ExtensionConfig) error
- func EncodeConfig(writer io.Writer, config Config) error
- func EncodeExtensionConfig(writer io.Writer, extensionConfig ExtensionConfig) error
- type BuildpackParser
- type Checksum
- type Config
- type ConfigBuildpack
- type ConfigBuildpackLicense
- type ConfigExtension
- type ConfigExtensionLicense
- type ConfigExtensionMetadata
- type ConfigExtensionMetadataConfiguration
- type ConfigExtensionMetadataDependency
- type ConfigMetadata
- type ConfigMetadataDependency
- type ConfigMetadataDependencyConstraint
- type ConfigOrder
- type ConfigOrderGroup
- type ConfigStack
- type ConfigTarget
- type DirectoryDuplicator
- type ExtensionConfig
- type ExtensionParser
- type Transport
- type ValidatedReader
Constants ¶
This section is empty.
Variables ¶
View Source
var ChecksumValidationError = errors.New("validation error: checksum does not match")
Functions ¶
func DecodeExtensionConfig ¶ added in v2.10.0
func DecodeExtensionConfig(reader io.Reader, extensionConfig *ExtensionConfig) error
func EncodeExtensionConfig ¶ added in v2.10.0
func EncodeExtensionConfig(writer io.Writer, extensionConfig ExtensionConfig) error
Types ¶
type BuildpackParser ¶
type BuildpackParser struct{}
func NewBuildpackParser ¶
func NewBuildpackParser() BuildpackParser
type Checksum ¶ added in v2.6.0
type Checksum string
Checksum represents a checksum algorithm and hash pair formatted as algorithm:hash.
func (Checksum) Algorithm ¶ added in v2.6.0
Algorithm returns the algorithm portion of the checksum string. If that portion is missing, it defaults to "sha256".
func (Checksum) Hash ¶ added in v2.6.0
Hash returns the hexidecimal encoded hash portion of the checksum string.
func (Checksum) Match ¶ added in v2.6.0
EqualTo returns true only when the given checksum algorithms and hashes match.
func (Checksum) MatchString ¶ added in v2.6.0
EqualTo returns true only when the given checksum formatted string algorithms and hashes match.
type Config ¶
type Config struct { API string `toml:"api" json:"api,omitempty"` Buildpack ConfigBuildpack `toml:"buildpack" json:"buildpack,omitempty"` Metadata ConfigMetadata `toml:"metadata" json:"metadata,omitempty"` Stacks []ConfigStack `toml:"stacks" json:"stacks,omitempty"` Order []ConfigOrder `toml:"order" json:"order,omitempty"` Targets []ConfigTarget `toml:"targets" json:"targets,omitempty"` }
type ConfigBuildpack ¶
type ConfigBuildpack struct { ID string `toml:"id" json:"id,omitempty"` Name string `toml:"name" json:"name,omitempty"` Version string `toml:"version" json:"version,omitempty"` Homepage string `toml:"homepage,omitempty" json:"homepage,omitempty"` ClearEnv bool `toml:"clear-env,omitempty" json:"clear-env,omitempty"` Description string `toml:"description,omitempty" json:"description,omitempty"` Keywords []string `toml:"keywords,omitempty" json:"keywords,omitempty"` Licenses []ConfigBuildpackLicense `toml:"licenses,omitempty" json:"licenses,omitempty"` SBOMFormats []string `toml:"sbom-formats,omitempty" json:"sbom-formats,omitempty"` }
type ConfigBuildpackLicense ¶
type ConfigExtension ¶ added in v2.10.0
type ConfigExtension struct { ID string `toml:"id" json:"id,omitempty"` Name string `toml:"name" json:"name,omitempty"` Version string `toml:"version" json:"version,omitempty"` Homepage string `toml:"homepage,omitempty" json:"homepage,omitempty"` Description string `toml:"description,omitempty" json:"description,omitempty"` Keywords []string `toml:"keywords,omitempty" json:"keywords,omitempty"` Licenses []ConfigExtensionLicense `toml:"licenses,omitempty" json:"licenses,omitempty"` SBOMFormats []string `toml:"sbom-formats,omitempty" json:"sbom-formats,omitempty"` }
type ConfigExtensionLicense ¶ added in v2.10.0
type ConfigExtensionMetadata ¶ added in v2.10.0
type ConfigExtensionMetadata struct { IncludeFiles []string `toml:"include-files" json:"include-files,omitempty"` PrePackage string `toml:"pre-package" json:"pre-package,omitempty"` DefaultVersions map[string]string `toml:"default-versions" json:"default-versions,omitempty"` Dependencies []ConfigExtensionMetadataDependency `toml:"dependencies" json:"dependencies,omitempty"` Configurations []ConfigExtensionMetadataConfiguration `toml:"configurations" json:"configurations,omitempty"` }
type ConfigExtensionMetadataConfiguration ¶ added in v2.10.0
type ConfigExtensionMetadataConfiguration struct { Default string `toml:"default" json:"default,omitempty"` Launch bool `toml:"launch" json:"launch,omitempty"` Description string `toml:"description" json:"description,omitempty"` Build bool `toml:"build" json:"build,omitempty"` Name string `toml:"name" json:"name,omitempty"` }
type ConfigExtensionMetadataDependency ¶ added in v2.10.0
type ConfigExtensionMetadataDependency struct { Checksum string `toml:"checksum" json:"checksum,omitempty"` ID string `toml:"id" json:"id,omitempty"` Licenses []interface{} `toml:"licenses" json:"licenses,omitempty"` Name string `toml:"name" json:"name,omitempty"` SHA256 string `toml:"sha256" json:"sha256,omitempty"` Source string `toml:"source" json:"source,omitempty"` SourceChecksum string `toml:"source-checksum" json:"source-checksum,omitempty"` SourceSHA256 string `toml:"source_sha256" json:"source_sha256,omitempty"` Stacks []string `toml:"stacks" json:"stacks,omitempty"` URI string `toml:"uri" json:"uri,omitempty"` Version string `toml:"version" json:"version,omitempty"` }
func (ConfigExtensionMetadataDependency) HasStack ¶ added in v2.10.1
func (cd ConfigExtensionMetadataDependency) HasStack(stack string) bool
type ConfigMetadata ¶
type ConfigMetadata struct { IncludeFiles []string `toml:"include-files" json:"include-files,omitempty"` PrePackage string `toml:"pre-package" json:"pre-package,omitempty"` DefaultVersions map[string]string `toml:"default-versions" json:"default-versions,omitempty"` Dependencies []ConfigMetadataDependency `toml:"dependencies" json:"dependencies,omitempty"` DependencyConstraints []ConfigMetadataDependencyConstraint `toml:"dependency-constraints" json:"dependency-constraints,omitempty"` Unstructured map[string]interface{} `toml:"-" json:"-"` }
func (ConfigMetadata) MarshalJSON ¶
func (m ConfigMetadata) MarshalJSON() ([]byte, error)
func (*ConfigMetadata) UnmarshalJSON ¶
func (m *ConfigMetadata) UnmarshalJSON(data []byte) error
type ConfigMetadataDependency ¶
type ConfigMetadataDependency struct { Checksum string `toml:"checksum" json:"checksum,omitempty"` CPE string `toml:"cpe" json:"cpe,omitempty"` PURL string `toml:"purl" json:"purl,omitempty"` DeprecationDate *time.Time `toml:"deprecation_date" json:"deprecation_date,omitempty"` ID string `toml:"id" json:"id,omitempty"` Licenses []interface{} `toml:"licenses" json:"licenses,omitempty"` Name string `toml:"name" json:"name,omitempty"` SHA256 string `toml:"sha256" json:"sha256,omitempty"` Source string `toml:"source" json:"source,omitempty"` SourceChecksum string `toml:"source-checksum" json:"source-checksum,omitempty"` SourceSHA256 string `toml:"source_sha256" json:"source_sha256,omitempty"` Stacks []string `toml:"stacks" json:"stacks,omitempty"` StripComponents int `toml:"strip-components" json:"strip-components,omitempty"` URI string `toml:"uri" json:"uri,omitempty"` Version string `toml:"version" json:"version,omitempty"` }
func (ConfigMetadataDependency) HasStack ¶
func (cd ConfigMetadataDependency) HasStack(stack string) bool
type ConfigOrder ¶
type ConfigOrder struct {
Group []ConfigOrderGroup `toml:"group" json:"group,omitempty"`
}
type ConfigOrderGroup ¶
type ConfigStack ¶
type ConfigTarget ¶ added in v2.16.0
type DirectoryDuplicator ¶
type DirectoryDuplicator struct{}
func NewDirectoryDuplicator ¶
func NewDirectoryDuplicator() DirectoryDuplicator
func (DirectoryDuplicator) Duplicate ¶
func (d DirectoryDuplicator) Duplicate(source, destination string) error
type ExtensionConfig ¶ added in v2.10.0
type ExtensionConfig struct { API string `toml:"api" json:"api,omitempty"` Extension ConfigExtension `toml:"extension" json:"extension,omitempty"` Metadata ConfigExtensionMetadata `toml:"metadata" json:"metadata,omitempty"` }
type ExtensionParser ¶ added in v2.10.0
type ExtensionParser struct{}
func NewExtensionParser ¶ added in v2.10.0
func NewExtensionParser() ExtensionParser
func (ExtensionParser) Parse ¶ added in v2.10.0
func (p ExtensionParser) Parse(path string) (ExtensionConfig, error)
type ValidatedReader ¶
type ValidatedReader struct {
// contains filtered or unexported fields
}
func NewValidatedReader ¶
func NewValidatedReader(reader io.Reader, sum string) ValidatedReader
func (ValidatedReader) Valid ¶
func (vr ValidatedReader) Valid() (bool, error)
Click to show internal directories.
Click to hide internal directories.