github.com/paketo-buildpacks/packit@v1.3.2-0.20211206231111-86b75c657449/buildpack_info.go (about)

     1  package packit
     2  
     3  // BuildpackInfo is a representation of the basic information for a buildpack
     4  // provided in its buildpack.toml file as described in the specification:
     5  // https://github.com/buildpacks/spec/blob/main/buildpack.md#buildpacktoml-toml.
     6  type BuildpackInfo struct {
     7  	// ID is the identifier specified in the `buildpack.id` field of the
     8  	// buildpack.toml.
     9  	ID string `toml:"id"`
    10  
    11  	// Name is the identifier specified in the `buildpack.name` field of the
    12  	// buildpack.toml.
    13  	Name string `toml:"name"`
    14  
    15  	// Version is the identifier specified in the `buildpack.version` field of
    16  	// the buildpack.toml.
    17  	Version string `toml:"version"`
    18  
    19  	// Homepage is the identifier specified in the `buildpack.homepage` field of
    20  	// the buildpack.toml.
    21  	Homepage string `toml:"homepage"`
    22  
    23  	// Description is the identifier specified in the `buildpack.description`
    24  	// field of the buildpack.toml.
    25  	Description string `toml:"description"`
    26  
    27  	// Keywords are the identifiers specified in the `buildpack.keywords` field
    28  	// of the buildpack.toml.
    29  	Keywords []string `toml:"keywords"`
    30  
    31  	// Licenses are the list of licenses specified in the `buildpack.licenses`
    32  	// fields of the buildpack.toml.
    33  	Licenses []BuildpackInfoLicense
    34  
    35  	// SBOMFormats is the list of Software Bill of Materials media types that the buildpack
    36  	// produces (e.g. "application/spdx+json").
    37  	SBOMFormats []string `toml:"sbom-formats"`
    38  }
    39  
    40  // BuildpackInfoLicense is a representation of a license specified in the
    41  // buildpack.toml as described in the specification:
    42  // https://github.com/buildpacks/spec/blob/main/buildpack.md#buildpacktoml-toml.
    43  type BuildpackInfoLicense struct {
    44  	// Type is the identifier specified in the `buildpack.licenses.type` field of
    45  	// the buildpack.toml.
    46  	Type string `toml:"type"`
    47  
    48  	// URI is the identifier specified in the `buildpack.licenses.uri` field of
    49  	// the buildpack.toml.
    50  	URI string `toml:"uri"`
    51  }