syft/syft/pkg/php_composer_json_metadata.go
Alex Goodman d7a51a69dd
Update java generic cataloger (#1329)
* remove centralize pURL generation

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>

* port java cataloger to new generic cataloger pattern

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>

* remove common.GenericCataloger

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>

* update format test fixtures to reflect ID updates

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>

* fix package sort instability for encode-decode-encode cycles

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2022-11-09 14:55:54 +00:00

36 lines
1.7 KiB
Go

package pkg
// PhpComposerJSONMetadata represents information found from composer v1/v2 "installed.json" files as well as composer.lock files
type PhpComposerJSONMetadata struct {
Name string `json:"name"`
Version string `json:"version"`
Source PhpComposerExternalReference `json:"source"`
Dist PhpComposerExternalReference `json:"dist"`
Require map[string]string `json:"require,omitempty"`
Provide map[string]string `json:"provide,omitempty"`
RequireDev map[string]string `json:"require-dev,omitempty"`
Suggest map[string]string `json:"suggest,omitempty"`
Type string `json:"type,omitempty"`
NotificationURL string `json:"notification-url,omitempty"`
Bin []string `json:"bin,omitempty"`
License []string `json:"license,omitempty"`
Authors []PhpComposerAuthors `json:"authors,omitempty"`
Description string `json:"description,omitempty"`
Homepage string `json:"homepage,omitempty"`
Keywords []string `json:"keywords,omitempty"`
Time string `json:"time,omitempty"`
}
type PhpComposerExternalReference struct {
Type string `json:"type"`
URL string `json:"url"`
Reference string `json:"reference"`
Shasum string `json:"shasum,omitempty"`
}
type PhpComposerAuthors struct {
Name string `json:"name"`
Email string `json:"email,omitempty"`
Homepage string `json:"homepage,omitempty"`
}