Documentation ¶
Index ¶
- func DownloadPackageFile(ctx *context.Context)
- func EnumeratePackages(ctx *context.Context)
- func PackageMetadata(ctx *context.Context)
- func SearchPackages(ctx *context.Context)
- func ServiceIndex(ctx *context.Context)
- func UploadPackage(ctx *context.Context)
- type Dist
- type PackageMetadataResponse
- type PackageVersionMetadata
- type SearchResult
- type SearchResultResponse
- type ServiceIndexResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadPackageFile ¶
DownloadPackageFile serves the content of a package
func EnumeratePackages ¶
EnumeratePackages lists all package names https://packagist.org/apidoc#list-packages
func PackageMetadata ¶
PackageMetadata returns the metadata for a single package https://packagist.org/apidoc#get-package-data
func SearchPackages ¶
SearchPackages searches packages, only "q" is supported https://packagist.org/apidoc#search-packages
func ServiceIndex ¶
ServiceIndex displays registry endpoints
Types ¶
type Dist ¶
type Dist struct { Type string `json:"type"` URL string `json:"url"` Checksum string `json:"shasum"` }
Dist contains package download information
type PackageMetadataResponse ¶
type PackageMetadataResponse struct { Minified string `json:"minified"` Packages map[string][]*PackageVersionMetadata `json:"packages"` }
PackageMetadataResponse contains packages metadata
type PackageVersionMetadata ¶
type PackageVersionMetadata struct { *composer_module.Metadata Name string `json:"name"` Version string `json:"version"` Type string `json:"type"` Created time.Time `json:"time"` Dist Dist `json:"dist"` }
PackageVersionMetadata contains package metadata
type SearchResult ¶
type SearchResult struct { Name string `json:"name"` Description string `json:"description"` Downloads int64 `json:"downloads"` }
SearchResult contains a search result
type SearchResultResponse ¶
type SearchResultResponse struct { Total int64 `json:"total"` Results []*SearchResult `json:"results"` NextLink string `json:"next,omitempty"` }
SearchResultResponse contains search results
type ServiceIndexResponse ¶
type ServiceIndexResponse struct { SearchTemplate string `json:"search"` MetadataTemplate string `json:"metadata-url"` PackageList string `json:"list"` }
ServiceIndexResponse contains registry endpoints