github.com/ouraigua/jenkins-library@v0.0.0-20231028010029-fbeaf2f3aa9b/pkg/cnbutils/project/types/types.go (about)

     1  // Source: https://github.com/buildpacks/pack/blob/main/pkg/project/types/types.go
     2  package types
     3  
     4  import (
     5  	"github.com/buildpacks/lifecycle/api"
     6  )
     7  
     8  type Script struct {
     9  	API    string `toml:"api"`
    10  	Inline string `toml:"inline"`
    11  	Shell  string `toml:"shell"`
    12  }
    13  
    14  type Buildpack struct {
    15  	ID      string `toml:"id"`
    16  	Version string `toml:"version"`
    17  	URI     string `toml:"uri"`
    18  	Script  Script `toml:"script"`
    19  }
    20  
    21  type EnvVar struct {
    22  	Name  string `toml:"name"`
    23  	Value string `toml:"value"`
    24  }
    25  
    26  type Build struct {
    27  	Include    []string    `toml:"include"`
    28  	Exclude    []string    `toml:"exclude"`
    29  	Buildpacks []Buildpack `toml:"buildpacks"`
    30  	Env        []EnvVar    `toml:"env"`
    31  	Builder    string      `toml:"builder"`
    32  	Pre        GroupAddition
    33  	Post       GroupAddition
    34  }
    35  
    36  type Project struct {
    37  	ID        string    `toml:"id"`
    38  	Name      string    `toml:"name"`
    39  	Version   string    `toml:"version"`
    40  	SourceURL string    `toml:"source-url"`
    41  	Licenses  []License `toml:"licenses"`
    42  }
    43  
    44  type License struct {
    45  	Type string `toml:"type"`
    46  	URI  string `toml:"uri"`
    47  }
    48  
    49  type Descriptor struct {
    50  	Project       Project                `toml:"project"`
    51  	Build         Build                  `toml:"build"`
    52  	Metadata      map[string]interface{} `toml:"metadata"`
    53  	SchemaVersion *api.Version
    54  }
    55  
    56  type GroupAddition struct {
    57  	Buildpacks []Buildpack `toml:"group"`
    58  }