Documentation ¶
Index ¶
- Constants
- type Artifact
- func (a *Artifact) Dependencies(recursive bool, ignore *map[strfmt.UUID]struct{}) Artifacts
- func (a *Artifact) Licenses() []string
- func (a *Artifact) Name() string
- func (a *Artifact) NameAndVersion() string
- func (a *Artifact) Revision() int
- func (a *Artifact) RuntimeDependencies(recursive bool, ignore *map[strfmt.UUID]struct{}) Artifacts
- func (a *Artifact) SetDownload(uri string, checksum string)
- func (a *Artifact) Version() string
- type ArtifactChange
- type ArtifactChangeset
- type ArtifactIDMap
- type ArtifactNameMap
- type ArtifactRelation
- type Artifacts
- func (as Artifacts) Dependencies(recursive bool, ignore *map[strfmt.UUID]struct{}) Artifacts
- func (a Artifacts) Filter(filters ...FilterArtifact) Artifacts
- func (a Artifacts) Ingredients() Ingredients
- func (as Artifacts) RuntimeDependencies(recursive bool, ignore *map[strfmt.UUID]struct{}) Artifacts
- func (a Artifacts) ToIDMap() ArtifactIDMap
- func (a Artifacts) ToIDSlice() []strfmt.UUID
- func (a Artifacts) ToNameMap() ArtifactNameMap
- type BuildPlan
- func (b *BuildPlan) Artifacts(filters ...FilterArtifact) Artifacts
- func (b *BuildPlan) DiffArtifacts(oldBp *BuildPlan, requestedOnly bool) ArtifactChangeset
- func (b *BuildPlan) Engine() types.BuildEngine
- func (b *BuildPlan) Ingredients(filters ...filterIngredient) Ingredients
- func (b *BuildPlan) IsBuildInProgress() bool
- func (b *BuildPlan) IsBuildReady() bool
- func (b *BuildPlan) LegacyRecipeID() strfmt.UUID
- func (b *BuildPlan) Marshal() ([]byte, error)
- func (b *BuildPlan) Platforms() []strfmt.UUID
- func (b *BuildPlan) RequestedArtifacts() Artifacts
- func (b *BuildPlan) RequestedIngredients() Ingredients
- func (b *BuildPlan) Requirements() Requirements
- type ChangeType
- type FilterArtifact
- func FilterArtifactIDs(ids ...strfmt.UUID) FilterArtifact
- func FilterBuildtimeArtifacts() FilterArtifact
- func FilterFailedArtifacts() FilterArtifact
- func FilterNotBuild() FilterArtifact
- func FilterPlatformArtifacts(platformID strfmt.UUID) FilterArtifact
- func FilterRuntimeArtifacts() FilterArtifact
- func FilterStateArtifacts() FilterArtifact
- func FilterSuccessfulArtifacts() FilterArtifact
- type FilterOutIngredients
- type Ingredient
- type IngredientIDMap
- type IngredientNameMap
- type Ingredients
- type Relation
- type Requirement
- type Requirements
Constants ¶
const NamespaceInternal = "internal"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Artifact ¶
type Artifact struct { ArtifactID strfmt.UUID DisplayName string MimeType string URL string LogURL string Errors []string Checksum string Status string Ingredients []*Ingredient `json:"-"` // While most artifacts only have a single ingredient, some artifacts such as installers can have multiple. IsRuntimeDependency bool IsBuildtimeDependency bool // contains filtered or unexported fields }
Artifact represents a downloadable artifact. This artifact may or may not be installable by the State Tool.
func (*Artifact) Dependencies ¶
Dependencies returns ALL dependencies that an artifact has, this covers runtime and build time dependencies. It does not cover test dependencies as we have no use for them in the state tool.
func (*Artifact) Name ¶
Name returns the name of the ingredient for this artifact, if it only has exactly one ingredient associated. Otherwise it returns the DisplayName, which is less reliable and consistent.
func (*Artifact) NameAndVersion ¶
func (*Artifact) Revision ¶
Revision returns the name of the ingredient for this artifact, if it only has exactly one ingredient associated. Otherwise it returns an empty version.
func (*Artifact) RuntimeDependencies ¶
func (*Artifact) SetDownload ¶
SetDownload is used to update the URL and checksum of an artifact. This allows us to keep using the same artifact type, while also facilitating dressing up in-progress artifacts with their download info later on
type ArtifactChange ¶
type ArtifactChange struct { ChangeType ChangeType Artifact *Artifact Old *Artifact // Old is only set when ChangeType=ArtifactUpdated }
func (ArtifactChange) VersionsChanged ¶
func (a ArtifactChange) VersionsChanged() bool
type ArtifactChangeset ¶
type ArtifactChangeset []ArtifactChange
func (ArtifactChangeset) Filter ¶
func (a ArtifactChangeset) Filter(t ...ChangeType) ArtifactChangeset
type ArtifactIDMap ¶
type ArtifactNameMap ¶
type ArtifactRelation ¶
type Artifacts ¶
type Artifacts []*Artifact
func (Artifacts) Dependencies ¶
Dependencies returns ALL dependencies that an artifact has, this covers runtime and build time dependencies. It does not cover test dependencies as we have no use for them in the state tool.
func (Artifacts) Filter ¶
func (a Artifacts) Filter(filters ...FilterArtifact) Artifacts
func (Artifacts) Ingredients ¶
func (a Artifacts) Ingredients() Ingredients
func (Artifacts) RuntimeDependencies ¶
func (Artifacts) ToIDMap ¶
func (a Artifacts) ToIDMap() ArtifactIDMap
func (Artifacts) ToNameMap ¶
func (a Artifacts) ToNameMap() ArtifactNameMap
type BuildPlan ¶
type BuildPlan struct {
// contains filtered or unexported fields
}
func (*BuildPlan) Artifacts ¶
func (b *BuildPlan) Artifacts(filters ...FilterArtifact) Artifacts
func (*BuildPlan) DiffArtifacts ¶
func (b *BuildPlan) DiffArtifacts(oldBp *BuildPlan, requestedOnly bool) ArtifactChangeset
func (*BuildPlan) Engine ¶
func (b *BuildPlan) Engine() types.BuildEngine
func (*BuildPlan) Ingredients ¶
func (b *BuildPlan) Ingredients(filters ...filterIngredient) Ingredients
func (*BuildPlan) IsBuildInProgress ¶
func (*BuildPlan) IsBuildReady ¶
func (*BuildPlan) LegacyRecipeID ¶
LegacyRecipeID extracts the recipe ID from the BuildLogIDs. We do this because if the build is in progress we will need to reciepe ID to initialize the build log streamer. This information will only be populated if the build is an alternate build. This is specified in the build planner queries.
func (*BuildPlan) RequestedArtifacts ¶
RequestedArtifacts returns the resolved requirements of the buildplan as artifacts
func (*BuildPlan) RequestedIngredients ¶
func (b *BuildPlan) RequestedIngredients() Ingredients
RequestedIngredients returns the resolved requirements of the buildplan as ingredients
func (*BuildPlan) Requirements ¶
func (b *BuildPlan) Requirements() Requirements
Requirements returns what the project has defined as the top level requirements (ie. the "order"). This is usually the same as the "ingredients" but it can be different if the project has multiple requirements that are satisfied by the same ingredient. eg. rake is satisfied by ruby.
type ChangeType ¶
type ChangeType int
const ( ArtifactAdded ChangeType = iota ArtifactRemoved ArtifactUpdated )
func (ChangeType) String ¶
func (c ChangeType) String() string
type FilterArtifact ¶
func FilterArtifactIDs ¶
func FilterArtifactIDs(ids ...strfmt.UUID) FilterArtifact
func FilterBuildtimeArtifacts ¶
func FilterBuildtimeArtifacts() FilterArtifact
func FilterFailedArtifacts ¶
func FilterFailedArtifacts() FilterArtifact
func FilterNotBuild ¶
func FilterNotBuild() FilterArtifact
func FilterPlatformArtifacts ¶
func FilterPlatformArtifacts(platformID strfmt.UUID) FilterArtifact
func FilterRuntimeArtifacts ¶
func FilterRuntimeArtifacts() FilterArtifact
func FilterStateArtifacts ¶
func FilterStateArtifacts() FilterArtifact
func FilterSuccessfulArtifacts ¶
func FilterSuccessfulArtifacts() FilterArtifact
type FilterOutIngredients ¶
type FilterOutIngredients struct {
Ingredients IngredientIDMap
}
func (FilterOutIngredients) Filter ¶
func (f FilterOutIngredients) Filter(i *Ingredient) bool
type Ingredient ¶
type Ingredient struct { *raw.IngredientSource IsBuildtimeDependency bool IsRuntimeDependency bool Artifacts Artifacts // contains filtered or unexported fields }
func (*Ingredient) RuntimeDependencies ¶
func (i *Ingredient) RuntimeDependencies(recursive bool) Ingredients
type IngredientIDMap ¶
type IngredientIDMap map[strfmt.UUID]*Ingredient
type IngredientNameMap ¶
type IngredientNameMap map[string]*Ingredient
type Ingredients ¶
type Ingredients []*Ingredient
func (Ingredients) CommonRuntimeDependencies ¶
func (i Ingredients) CommonRuntimeDependencies() Ingredients
CommonRuntimeDependencies returns the set of runtime dependencies that are common between all ingredients. For example, given a set of python ingredients this will return at the very least the python language ingredient.
func (Ingredients) Filter ¶
func (i Ingredients) Filter(filters ...filterIngredient) Ingredients
func (Ingredients) ToIDMap ¶
func (i Ingredients) ToIDMap() IngredientIDMap
func (Ingredients) ToNameMap ¶
func (i Ingredients) ToNameMap() IngredientNameMap
type Requirement ¶
type Requirement struct { *types.Requirement // Requirements are not ingredients, because multiple requirements can be satisfied by the same ingredient, // for example `rake` is satisfied by `ruby`. Ingredient *Ingredient }
type Requirements ¶
type Requirements []*Requirement