Documentation
¶
Index ¶
- Constants
- Variables
- func IsBeforeJava17(candidate string) bool
- func IsBeforeJava18(candidate string) bool
- func IsBeforeJava9(candidate string) bool
- func IsBuildContribution(metadata map[string]interface{}) bool
- func IsLaunchContribution(metadata map[string]interface{}) bool
- func NewManifest(applicationPath string) (*properties.Properties, error)
- func NewManifestFromJAR(jarFilePath string) (*properties.Properties, error)
- type Build
- type BuildOption
- type CertificateLoader
- type Detect
- type DistributionType
- type JDK
- type JKSKeystore
- type JLink
- type JRE
- type JVMVersion
- type JavaSecurityProperties
- type Keystore
- type MavenJAR
- type NIK
- type NativeImage
- type PasswordLessPKCS12Keystore
- type SDKInfo
Constants ¶
View Source
const ( PlanEntryNativeImageBuilder = "native-image-builder" PlanEntryJRE = "jre" PlanEntryJDK = "jdk" )
View Source
const DefaultCertFile = "/etc/ssl/certs/ca-certificates.crt"
Variables ¶
View Source
var Java17, _ = semver.NewVersion("17")
View Source
var Java18, _ = semver.NewVersion("18")
View Source
var Java9, _ = semver.NewVersion("9")
Functions ¶
func IsBeforeJava17 ¶ added in v1.44.3
func IsBeforeJava18 ¶ added in v1.36.1
func IsBeforeJava9 ¶ added in v1.12.0
func IsBuildContribution ¶ added in v1.11.1
func IsLaunchContribution ¶ added in v1.11.1
func NewManifest ¶ added in v1.2.0
func NewManifest(applicationPath string) (*properties.Properties, error)
NewManifest reads the <APP>/META-INF/MANIFEST.MF file if it exists, normalizing it into the standard properties form.
func NewManifestFromJAR ¶ added in v1.36.0
func NewManifestFromJAR(jarFilePath string) (*properties.Properties, error)
NewManifestFromJAR reads the META-INF/MANIFEST.MF from a JAR file if it exists, normalizing it into the standard properties form.
Types ¶
type Build ¶
type Build struct { Logger bard.Logger Result libcnb.BuildResult CertLoader CertificateLoader DependencyCache libpak.DependencyCache Native NativeImage CustomHelpers []string }
func (Build) Build ¶
func (b Build) Build(context libcnb.BuildContext) (libcnb.BuildResult, error)
type BuildOption ¶ added in v1.38.0
func WithCustomHelpers ¶ added in v1.38.0
func WithCustomHelpers(customHelpers []string) BuildOption
func WithNativeImage ¶ added in v1.38.0
func WithNativeImage(nativeImage NativeImage) BuildOption
type CertificateLoader ¶ added in v1.12.0
func NewCertificateLoader ¶ added in v1.24.0
func NewCertificateLoader() CertificateLoader
func (*CertificateLoader) Load ¶ added in v1.12.0
func (c *CertificateLoader) Load(path string, password string) error
func (*CertificateLoader) Metadata ¶ added in v1.24.0
func (c *CertificateLoader) Metadata() (map[string]interface{}, error)
type Detect ¶
type Detect struct{}
func (Detect) Detect ¶
func (d Detect) Detect(context libcnb.DetectContext) (libcnb.DetectResult, error)
type DistributionType ¶ added in v1.12.0
type DistributionType uint8
const ( JDKType DistributionType = iota JREType )
func (DistributionType) String ¶ added in v1.12.0
func (d DistributionType) String() string
type JDK ¶
type JDK struct { CertificateLoader CertificateLoader LayerContributor libpak.DependencyLayerContributor Logger bard.Logger }
func NewJDK ¶
func NewJDK(dependency libpak.BuildpackDependency, cache libpak.DependencyCache, certificateLoader CertificateLoader) (JDK, libcnb.BOMEntry, error)
type JKSKeystore ¶ added in v1.44.0
type JKSKeystore struct {
// contains filtered or unexported fields
}
func NewJKSKeystore ¶ added in v1.44.0
func NewJKSKeystore(location, password string) (*JKSKeystore, error)
func (*JKSKeystore) Add ¶ added in v1.44.0
func (k *JKSKeystore) Add(name string, b *pem.Block) error
func (*JKSKeystore) Len ¶ added in v1.44.0
func (k *JKSKeystore) Len() int
func (*JKSKeystore) Write ¶ added in v1.44.0
func (k *JKSKeystore) Write() error
type JLink ¶ added in v1.38.0
type JLink struct { LayerContributor libpak.LayerContributor Logger bard.Logger ApplicationPath string Executor effect.Executor CertificateLoader CertificateLoader Metadata map[string]interface{} JavaVersion string Args []string UserConfigured bool }
func (JLink) Contribute ¶ added in v1.38.0
type JRE ¶
type JRE struct { ApplicationPath string CertificateLoader CertificateLoader DistributionType DistributionType LayerContributor libpak.DependencyLayerContributor Logger bard.Logger Metadata map[string]interface{} }
func NewJRE ¶
func NewJRE(applicationPath string, dependency libpak.BuildpackDependency, cache libpak.DependencyCache, distributionType DistributionType, certificateLoader CertificateLoader, metadata map[string]interface{}) (JRE, libcnb.BOMEntry, error)
type JVMVersion ¶ added in v1.34.0
func NewJVMVersion ¶ added in v1.37.0
func NewJVMVersion(logger bard.Logger) JVMVersion
func (JVMVersion) GetJVMVersion ¶ added in v1.34.0
func (j JVMVersion) GetJVMVersion(appPath string, cr libpak.ConfigurationResolver, dr libpak.DependencyResolver) (string, error)
type JavaSecurityProperties ¶
type JavaSecurityProperties struct { LayerContributor libpak.LayerContributor Logger bard.Logger }
func NewJavaSecurityProperties ¶
func NewJavaSecurityProperties(info libcnb.BuildpackInfo) JavaSecurityProperties
func (JavaSecurityProperties) Contribute ¶
func (JavaSecurityProperties) Name ¶
func (j JavaSecurityProperties) Name() string
type Keystore ¶ added in v1.44.0
func DetectKeystore ¶ added in v1.44.0
type MavenJAR ¶ added in v1.10.0
type MavenJAR struct { // Name is the name of the JAR, without the version or extension. Name string `toml:"name"` // Version is the version of the JAR, without the name or extension. Version string `toml:"version"` // SHA256 is the SHA256 hash of the JAR. SHA256 string `toml:"sha256"` }
MavenJAR is metadata about a JRE entry that follows Maven naming conventions.
func NewMavenJARListing ¶ added in v1.10.0
NewMavenJARListing generates a listing of all JAR that follow Maven naming convention under the roots.
type NIK ¶ added in v1.38.0
type NIK struct { CertificateLoader CertificateLoader DependencyCache libpak.DependencyCache Executor effect.Executor JDKDependency libpak.BuildpackDependency LayerContributor libpak.LayerContributor Logger bard.Logger NativeDependency *libpak.BuildpackDependency CustomCommand string CustomArgs []string }
func NewNIK ¶ added in v1.38.0
func NewNIK(jdkDependency libpak.BuildpackDependency, nativeDependency *libpak.BuildpackDependency, cache libpak.DependencyCache, certificateLoader CertificateLoader, customCommand string, customArgs []string) (NIK, []libcnb.BOMEntry, error)
func (NIK) Contribute ¶ added in v1.38.0
type NativeImage ¶ added in v1.38.0
type PasswordLessPKCS12Keystore ¶ added in v1.44.0
type PasswordLessPKCS12Keystore struct {
// contains filtered or unexported fields
}
func NewPasswordLessPKCS12Keystore ¶ added in v1.44.0
func NewPasswordLessPKCS12Keystore(location string) (*PasswordLessPKCS12Keystore, error)
func (*PasswordLessPKCS12Keystore) Add ¶ added in v1.44.0
func (k *PasswordLessPKCS12Keystore) Add(name string, b *pem.Block) error
func (*PasswordLessPKCS12Keystore) Len ¶ added in v1.44.0
func (k *PasswordLessPKCS12Keystore) Len() int
func (*PasswordLessPKCS12Keystore) Write ¶ added in v1.44.0
func (k *PasswordLessPKCS12Keystore) Write() error
type SDKInfo ¶ added in v1.37.0
SDKInfo represents the information from each line in the `.sdkmanrc` file
func ReadSDKMANRC ¶ added in v1.37.0
ReadSDKMANRC reads the `.sdkmanrc` format file from path and retuns the list of SDKS in it
Source Files
¶
Click to show internal directories.
Click to hide internal directories.