php

package
v0.0.19-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2025 License: AGPL-3.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Follow

func Follow(db *bun.DB, db_config *bun.DB) error

Follow updates all PHP packages already in the database

func ImportList

func ImportList(db *bun.DB, topPackages []string) error

ImportList imports a list of PHP packages from Packagist

func ImportListWithBatching

func ImportListWithBatching(db *bun.DB, topPackages []string) error

ImportListWithBatching imports a list of PHP packages using batch processing for improved performance

func ImportTopPackages

func ImportTopPackages(db *bun.DB, db_config *bun.DB) error

ImportTopPackages imports top PHP packages from a predefined list

func NormalizeDependencies

func NormalizeDependencies(deps interface{}) map[string]string

NormalizeDependencies converts various dependency formats to a consistent map[string]string

func NormalizeFunding

func NormalizeFunding(funding interface{}) interface{}

NormalizeFunding converts various funding formats to a consistent structure

func UpdatePackage

func UpdatePackage(db *bun.DB, name string) error

UpdatePackage updates a PHP package in the database

func UpdatePackagesBatch

func UpdatePackagesBatch(db *bun.DB, packageNames []string) error

UpdatePackagesBatch updates multiple PHP packages in a single optimized batch operation

Types

type List

type List struct {
	PackageNames []string `json:"packageNames"`
}

type PackagistAuthor

type PackagistAuthor struct {
	Name     string `json:"name"`
	Email    string `json:"email"`
	Homepage string `json:"homepage"`
	Role     string `json:"role"`
}

type PackagistDist

type PackagistDist struct {
	Type      string `json:"type"`
	Url       string `json:"url"`
	Reference string `json:"reference"`
	Shasum    string `json:"shasum"`
}

type PackagistFunding

type PackagistFunding struct {
	Type string `json:"type"`
	Url  string `json:"url"`
}

type PackagistPackage

type PackagistPackage struct {
	Package PackagistPackageDetails `json:"package"`
}

PackagistPackage represents a package from Packagist API

type PackagistPackageDetails

type PackagistPackageDetails struct {
	Name        string                          `json:"name"`
	Description string                          `json:"description"`
	Time        string                          `json:"time"`
	Type        string                          `json:"type"`
	Keywords    []string                        `json:"keywords"`
	Homepage    string                          `json:"homepage"`
	Repository  string                          `json:"repository"`
	Versions    map[string]PackagistVersionInfo `json:"versions"`
}

type PackagistSearchItem

type PackagistSearchItem struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Url         string `json:"url"`
	Repository  string `json:"repository"`
	Downloads   int    `json:"downloads"`
	Favers      int    `json:"favers"`
}

type PackagistSearchResult

type PackagistSearchResult struct {
	Results []PackagistSearchItem `json:"results"`
	Total   int                   `json:"total"`
	Next    string                `json:"next"`
}

PackagistSearchResult represents search results from Packagist

type PackagistSource

type PackagistSource struct {
	Type      string `json:"type"`
	Url       string `json:"url"`
	Reference string `json:"reference"`
}

type PackagistVersionInfo

type PackagistVersionInfo struct {
	Name               string            `json:"name"`
	Version            string            `json:"version"`
	VersionNormalized  string            `json:"version_normalized"`
	Source             PackagistSource   `json:"source"`
	Dist               PackagistDist     `json:"dist"`
	Require            interface{}       `json:"require"`     // Can be map[string]string or string
	RequireDev         interface{}       `json:"require-dev"` // Can be map[string]string or string
	Suggest            interface{}       `json:"suggest"`     // Can be map[string]string or string
	Provide            interface{}       `json:"provide"`     // Can be map[string]string or string
	Replace            interface{}       `json:"replace"`     // Can be map[string]string or string
	Conflict           interface{}       `json:"conflict"`    // Can be map[string]string or string
	Time               string            `json:"time"`
	Type               string            `json:"type"`
	Extra              interface{}       `json:"extra"` // Can be string or map
	InstallationSource string            `json:"installation-source"`
	Autoload           interface{}       `json:"autoload"` // Can be map or string
	NotificationUrl    string            `json:"notification-url"`
	License            interface{}       `json:"license"` // Can be string or []string
	Authors            []PackagistAuthor `json:"authors"`
	Description        string            `json:"description"`
	Keywords           []string          `json:"keywords"`
	Homepage           string            `json:"homepage"`
	Support            interface{}       `json:"support"` // Can be map or string
	Funding            interface{}       `json:"funding"` // Can be string or []PackagistFunding
}

Jump to

Keyboard shortcuts

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