-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds platform path to build and detect context
- moves types referenced in build and detect contexts into their own files to make it a bit easier to find them when navigating the repo - adds new postal.Service.Deliver method that allows the user to pass in a platform path location. The existing postal.Service.Install method reuses Deliver with a hardcoded platform path of /platform and is marked as deprecated
- Loading branch information
Showing
15 changed files
with
579 additions
and
265 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package packit | ||
|
||
// BOMEntry contains a bill of materials entry. | ||
type BOMEntry struct { | ||
// Name represents the name of the entry. | ||
Name string `toml:"name"` | ||
|
||
// Metadata is the metadata of the entry. Optional. | ||
Metadata map[string]interface{} `toml:"metadata,omitempty"` | ||
} | ||
|
||
// UnmetEntry contains the name of an unmet dependency from the build process | ||
type UnmetEntry struct { | ||
// Name represents the name of the entry. | ||
Name string `toml:"name"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package packit | ||
|
||
// BuildMetadata represents the build metadata details persisted in the | ||
// build.toml file according to the buildpack lifecycle specification: | ||
// https://github.com/buildpacks/spec/blob/main/buildpack.md#buildtoml-toml. | ||
type BuildMetadata struct { | ||
// BOM is the Bill-of-Material entries containing information about the | ||
// dependencies provided to the build environment. | ||
BOM []BOMEntry `toml:"bom"` | ||
|
||
// Unmet is a list of unmet entries from the build process that it was unable | ||
// to provide. | ||
Unmet []UnmetEntry `toml:"unmet"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package packit | ||
|
||
// BuildPlan is a representation of the Build Plan as specified in the | ||
// specification: | ||
// https://github.com/buildpacks/spec/blob/main/buildpack.md#build-plan-toml. | ||
// The BuildPlan allows buildpacks to indicate what dependencies they provide | ||
// or require. | ||
type BuildPlan struct { | ||
// Provides is a list of BuildPlanProvisions that are provided by this | ||
// buildpack. | ||
Provides []BuildPlanProvision `toml:"provides"` | ||
|
||
// Requires is a list of BuildPlanRequirements that are required by this | ||
// buildpack. | ||
Requires []BuildPlanRequirement `toml:"requires"` | ||
|
||
// Or is a list of additional BuildPlans that may be selected by the | ||
// lifecycle | ||
Or []BuildPlan `toml:"or,omitempty"` | ||
} | ||
|
||
// BuildPlanProvision is a representation of a dependency that can be provided | ||
// by a buildpack. | ||
type BuildPlanProvision struct { | ||
// Name is the identifier whereby buildpacks can coordinate that a dependency | ||
// is provided or required. | ||
Name string `toml:"name"` | ||
} | ||
|
||
type BuildPlanRequirement struct { | ||
// Name is the identifier whereby buildpacks can coordinate that a dependency | ||
// is provided or required. | ||
Name string `toml:"name"` | ||
|
||
// Metadata is an unspecified field allowing buildpacks to communicate extra | ||
// details about their requirement. Examples of this type of metadata might | ||
// include details about what source was used to decide the version | ||
// constraint for a requirement. | ||
Metadata interface{} `toml:"metadata"` | ||
} |
Oops, something went wrong.