Documentation ¶
Index ¶
Constants ¶
View Source
const TypeProperty = "composer.type"
TypeProperty is the name of the property for Composer package types
Variables ¶
View Source
var ( // ErrMissingComposerFile indicates a missing composer.json file ErrMissingComposerFile = errors.New("composer.json file is missing") // ErrInvalidName indicates an invalid package name ErrInvalidName = errors.New("package name is invalid") // ErrInvalidVersion indicates an invalid package version ErrInvalidVersion = errors.New("package version is invalid") )
Functions ¶
This section is empty.
Types ¶
type Author ¶
type Author struct { Name string `json:"name,omitempty"` Email string `json:"email,omitempty"` Homepage string `json:"homepage,omitempty"` }
Author represents an author
type Licenses ¶
type Licenses []string
Licenses represents the licenses of a Composer package
func (*Licenses) UnmarshalJSON ¶
UnmarshalJSON reads from a string or array
type Metadata ¶
type Metadata struct { Description string `json:"description,omitempty"` Keywords []string `json:"keywords,omitempty"` Homepage string `json:"homepage,omitempty"` License Licenses `json:"license,omitempty"` Authors []Author `json:"authors,omitempty"` Autoload map[string]interface{} `json:"autoload,omitempty"` AutoloadDev map[string]interface{} `json:"autoload-dev,omitempty"` Extra map[string]interface{} `json:"extra,omitempty"` Require map[string]string `json:"require,omitempty"` RequireDev map[string]string `json:"require-dev,omitempty"` Suggest map[string]string `json:"suggest,omitempty"` Provide map[string]string `json:"provide,omitempty"` }
Metadata represents the metadata of a Composer package
type Package ¶
Package represents a Composer package
func ParseComposerFile ¶
ParseComposerFile parses a composer.json file to retrieve the metadata of a Composer package
Click to show internal directories.
Click to hide internal directories.