github.com/noqcks/syft@v0.0.0-20230920222752-a9e2c4e288e5/syft/pkg/php_composer_json_metadata.go (about)

     1  package pkg
     2  
     3  // PhpComposerJSONMetadata represents information found from composer v1/v2 "installed.json" files as well as composer.lock files
     4  type PhpComposerJSONMetadata struct {
     5  	Name            string                       `json:"name"`
     6  	Version         string                       `json:"version"`
     7  	Source          PhpComposerExternalReference `json:"source"`
     8  	Dist            PhpComposerExternalReference `json:"dist"`
     9  	Require         map[string]string            `json:"require,omitempty"`
    10  	Provide         map[string]string            `json:"provide,omitempty"`
    11  	RequireDev      map[string]string            `json:"require-dev,omitempty"`
    12  	Suggest         map[string]string            `json:"suggest,omitempty"`
    13  	License         []string                     `json:"license,omitempty"`
    14  	Type            string                       `json:"type,omitempty"`
    15  	NotificationURL string                       `json:"notification-url,omitempty"`
    16  	Bin             []string                     `json:"bin,omitempty"`
    17  	Authors         []PhpComposerAuthors         `json:"authors,omitempty"`
    18  	Description     string                       `json:"description,omitempty"`
    19  	Homepage        string                       `json:"homepage,omitempty"`
    20  	Keywords        []string                     `json:"keywords,omitempty"`
    21  	Time            string                       `json:"time,omitempty"`
    22  }
    23  
    24  type PhpComposerExternalReference struct {
    25  	Type      string `json:"type"`
    26  	URL       string `json:"url"`
    27  	Reference string `json:"reference"`
    28  	Shasum    string `json:"shasum,omitempty"`
    29  }
    30  
    31  type PhpComposerAuthors struct {
    32  	Name     string `json:"name"`
    33  	Email    string `json:"email,omitempty"`
    34  	Homepage string `json:"homepage,omitempty"`
    35  }