Documentation ¶
Index ¶
- Constants
- Variables
- func CheckRelatedFile(file string) (string, bool, bool)
- func ParseYarnLock(content []byte) (map[string]Package, error)
- func Scan(data interface{}) interface{}
- type Contributors
- type Dependency
- type LockDependency
- type Metadata
- type Package
- type PackageLock
- type PnpmLockfile
- type Repository
- type YarnPackage
Constants ¶
View Source
const Type string = "npm"
Variables ¶
View Source
var (
Manifests = []string{"package.json", "package-lock.json", ".package.json", ".package-lock.json", "yarn.lock", "pnpm-lock.yaml"}
)
Functions ¶
Types ¶
type Contributors ¶
type Contributors struct { Name string `json:"name" mapstruct:"name"` Username string `json:"email" mapstruct:"username"` URL string `json:"url" mapstruct:"url"` }
Contributors - PackageJSON contributors
type Dependency ¶
type LockDependency ¶
type LockDependency struct { Version string `json:"version"` Resolved string `json:"resolved"` Integrity string `json:"integrity"` Requires map[string]string }
LockDependency - PackageLock dependencies
type Metadata ¶
type Metadata struct { Version string `json:"version"` Latest []string `json:"latest"` Contributors interface{} `json:"contributors"` License interface{} `json:"license"` Name string `json:"name"` Homepage string `json:"homepage"` Description string `json:"description"` Dependencies map[string]interface{} `json:"dependencies"` Repository interface{} `json:"repository"` Author interface{} `json:"author"` }
PackageJSON - packages.json model
type PackageLock ¶
type PackageLock struct { Requires bool `json:"requires"` LockfileVersion int `json:"lockfileVersion"` Dependencies map[string]LockDependency }
PackageLock - PackageLock model
type PnpmLockfile ¶
type Repository ¶
type Repository struct { Type string `json:"type" mapstructure:"type"` URL string `json:"url" mapstructure:"url"` }
Repository - PackageJSON repository
Click to show internal directories.
Click to hide internal directories.