github.com/anchore/syft@v1.38.2/syft/pkg/conan.go (about)

     1  package pkg
     2  
     3  // ConanV1LockEntry represents a single "node" entry from a conan.lock V1 file.
     4  type ConanV1LockEntry struct {
     5  	// Ref is the package reference string in format name/version@user/channel
     6  	Ref string `json:"ref"`
     7  
     8  	// PackageID is a unique package variant identifier computed from settings/options (static hash in Conan 1.x, can have collisions with complex dependency graphs)
     9  	PackageID string `json:"package_id,omitempty"`
    10  
    11  	// Prev is the previous lock entry reference for versioning
    12  	Prev string `json:"prev,omitempty"`
    13  
    14  	// Requires are the runtime package dependencies
    15  	Requires []string `json:"requires,omitempty"`
    16  
    17  	// BuildRequires are the build-time dependencies (e.g. cmake, compilers)
    18  	BuildRequires []string `json:"build_requires,omitempty"`
    19  
    20  	// PythonRequires are the Python dependencies needed for Conan recipes
    21  	PythonRequires []string `json:"py_requires,omitempty"`
    22  
    23  	// Options are package configuration options as key-value pairs (e.g. shared=True, fPIC=True)
    24  	Options KeyValues `json:"options,omitempty"`
    25  
    26  	// Path is the filesystem path to the package in Conan cache
    27  	Path string `json:"path,omitempty"`
    28  
    29  	// Context is the build context information
    30  	Context string `json:"context,omitempty"`
    31  }
    32  
    33  // ConanV2LockEntry represents a single "node" entry from a conan.lock V2 file.
    34  type ConanV2LockEntry struct {
    35  	// Ref is the package reference string in format name/version@user/channel
    36  	Ref string `json:"ref"`
    37  
    38  	// PackageID is a unique package variant identifier (dynamic in Conan 2.0, more accurate than V1)
    39  	PackageID string `json:"packageID,omitempty"`
    40  
    41  	// Username is the Conan user/organization name
    42  	Username string `json:"username,omitempty"`
    43  
    44  	// Channel is the Conan channel name indicating stability/purpose (e.g. stable, testing, experimental)
    45  	Channel string `json:"channel,omitempty"`
    46  
    47  	// RecipeRevision is a git-like revision hash (RREV) of the recipe
    48  	RecipeRevision string `json:"recipeRevision,omitempty"`
    49  
    50  	// PackageRevision is a git-like revision hash of the built binary package
    51  	PackageRevision string `json:"packageRevision,omitempty"`
    52  
    53  	// TimeStamp is when this package was built/locked
    54  	TimeStamp string `json:"timestamp,omitempty"`
    55  }
    56  
    57  // ConanfileEntry represents a single "Requires" entry from a conanfile.txt.
    58  type ConanfileEntry struct {
    59  	// Ref is the package reference string in format name/version@user/channel
    60  	Ref string `mapstructure:"ref" json:"ref"`
    61  }
    62  
    63  // ConaninfoEntry represents a single "full_requires" entry from a conaninfo.txt.
    64  type ConaninfoEntry struct {
    65  	// Ref is the package reference string in format name/version@user/channel
    66  	Ref string `json:"ref"`
    67  
    68  	// PackageID is a unique package variant identifier
    69  	PackageID string `json:"package_id,omitempty"`
    70  }