composer

package
v1.18.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2023 License: MIT Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadPackageFile

func DownloadPackageFile(ctx *context.Context)

DownloadPackageFile serves the content of a package

func EnumeratePackages

func EnumeratePackages(ctx *context.Context)

EnumeratePackages lists all package names https://packagist.org/apidoc#list-packages

func PackageMetadata

func PackageMetadata(ctx *context.Context)

PackageMetadata returns the metadata for a single package https://packagist.org/apidoc#get-package-data

func SearchPackages

func SearchPackages(ctx *context.Context)

SearchPackages searches packages, only "q" is supported https://packagist.org/apidoc#search-packages

func ServiceIndex

func ServiceIndex(ctx *context.Context)

ServiceIndex displays registry endpoints

func UploadPackage

func UploadPackage(ctx *context.Context)

UploadPackage creates a new package

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL