icu

package module
v0.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

README

ICU Cloud Native Buildpack

The ICU CNB provides International Components for Unicode libraries.

Integration

The ICU CNB provides icu as a dependency. Downstream buildpacks, like Dotnet Core Conf CNB can require the icu dependency by generating a Build Plan TOML file that looks like the following:

[[requires]]

  # The name of the ICU dependency is "icu". This value is considered
  # part of the public API for the buildpack and will not change without a plan
  # for deprecation.
  name = "icu"

  # The version of the ICU dependency is not required. In the case it
  # is not specified, the buildpack will provide the newest version, which can
  # be seen in the buildpack.toml file.
  # If you wish to request a specific version, the buildpack supports
  # specifying a semver constraint in the form of "66.*", "66.1.*", or even
  # "66.1.0".
  version = "66.1.0"

  # The ICU CNB supports some non-required metadata options.
  [requires.metadata]

    # Setting the build flag to true will ensure that the ICU
    # depdendency is available on the $PATH for subsequent buildpacks during
    # their build phase. If you are writing a buildpack that needs to run ICU
    # during its build process, this flag should be set to true.
    build = true

    # Setting the launch flag to true will ensure that the ICU dependency is
    # available on the $PATH for the running application. If you are writing an
    # application that needs to run ICU at runtime, this flag should be set to
    # true.
    launch = true

Usage

To package this buildpack for consumption:

$ ./scripts/package.sh

This builds the buildpack's Go source using GOOS=linux by default. You can supply another value as the first argument to package.sh.

buildpack.yml Configurations

The icu buildpack does not support configurations using buildpack.yml.

Documentation

Index

Constants

View Source
const (
	ICULayerName       = "icu"
	ICUDependency      = "icu"
	DependencyCacheKey = "dependency-sha"
)

Variables

This section is empty.

Functions

func Build

func Build(dependencyManager DependencyManager,
	layerArranger LayerArranger,
	sbomGenerator SBOMGenerator,
	clock chronos.Clock,
	logger scribe.Emitter,
) packit.BuildFunc

func Detect

func Detect() packit.DetectFunc

Types

type DependencyManager

type DependencyManager interface {
	Resolve(path, id, version, stack string) (postal.Dependency, error)
	Deliver(dependency postal.Dependency, cnbPath, layerPath, platformPath string) error
	GenerateBillOfMaterials(dependencies ...postal.Dependency) []packit.BOMEntry
}

type ICULayerArranger

type ICULayerArranger struct{}

func NewICULayerArranger

func NewICULayerArranger() ICULayerArranger

func (ICULayerArranger) Arrange

func (a ICULayerArranger) Arrange(path string) error

type LayerArranger

type LayerArranger interface {
	Arrange(path string) error
}

type SBOMGenerator added in v0.2.0

type SBOMGenerator interface {
	GenerateFromDependency(dependency postal.Dependency, dir string) (sbom.SBOM, error)
}

Directories

Path Synopsis
dependency
retrieval Module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL