Documentation ¶
Index ¶
- Constants
- func NewCocoaPods() *cocoapods
- func NewHackage() *hackage
- func NewHex() *hex
- func NewPub() *pub
- type CPAN
- type Cargo
- type CondaIngestor
- type CondaParser
- type CondaRepository
- type Drupal
- type Elm
- type Go
- type Ingestor
- type MavenIngestor
- type MavenParser
- type MavenRepository
- type NPM
- type NPMChangeDoc
- type Namer
- type Nuget
- type Packagist
- type PyPiRss
- type PyPiXmlRpc
- type PyPiXmlRpcResponse
- type RubyGems
- type StreamingIngestor
- type TTLer
Constants ¶
const NPMRegistryDatabase = "registry"
const NPMRegistryHostname = "https://replicate.npmjs.com"
const RetryDelaySeconds = 5
const UserAgent = "LibrariesIngestify/1.0 (support@khulnasoft.com)"
Variables ¶
This section is empty.
Functions ¶
func NewCocoaPods ¶
func NewCocoaPods() *cocoapods
func NewHackage ¶
func NewHackage() *hackage
Types ¶
type CondaIngestor ¶
type CondaIngestor struct { LatestRun time.Time Repository CondaRepository }
func NewConda ¶
func NewConda(repository CondaRepository) *CondaIngestor
func (*CondaIngestor) GetParser ¶
func (ingestor *CondaIngestor) GetParser() *CondaParser
func (*CondaIngestor) Ingest ¶
func (ingestor *CondaIngestor) Ingest() []data.PackageVersion
func (*CondaIngestor) Name ¶
func (ingestor *CondaIngestor) Name() string
func (*CondaIngestor) Schedule ¶
func (ingestor *CondaIngestor) Schedule() string
type CondaParser ¶
func NewCondaParser ¶
func NewCondaParser(url string, platform string) *CondaParser
func (*CondaParser) GetPackages ¶
func (parser *CondaParser) GetPackages(lastRun time.Time) ([]data.PackageVersion, error)
type CondaRepository ¶
type CondaRepository string
const ( CondaForge CondaRepository = "conda_forge" CondaMain CondaRepository = "conda_main" )
type Ingestor ¶
type Ingestor interface { Schedule() string Ingest() []data.PackageVersion }
Regular ingestors provide an API we can poll for changes. This polling is done on a regular schedule.
type MavenIngestor ¶
type MavenIngestor struct { LatestRun time.Time Repository MavenRepository }
func NewMaven ¶
func NewMaven(repository MavenRepository) *MavenIngestor
func (*MavenIngestor) GetParser ¶
func (ingestor *MavenIngestor) GetParser() *MavenParser
func (*MavenIngestor) Ingest ¶
func (ingestor *MavenIngestor) Ingest() []data.PackageVersion
func (*MavenIngestor) Name ¶
func (ingestor *MavenIngestor) Name() string
func (*MavenIngestor) Schedule ¶
func (ingestor *MavenIngestor) Schedule() string
func (*MavenIngestor) TTL ¶
func (ingestor *MavenIngestor) TTL() time.Duration
type MavenParser ¶
func NewMavenParser ¶
func NewMavenParser(url string, platform string) *MavenParser
func (*MavenParser) GetPackages ¶
func (parser *MavenParser) GetPackages() ([]data.PackageVersion, error)
type MavenRepository ¶
type MavenRepository string
const ( MavenCentral MavenRepository = "maven_mavencentral" GoogleMaven MavenRepository = "maven_google" )
type NPM ¶
type NPM struct {
// contains filtered or unexported fields
}
func (*NPM) Ingest ¶
func (ingestor *NPM) Ingest(results chan data.PackageVersion)
*
- NPM package updates are ingested from a continuous reading of a remote
- CouchDB database at replicate.npmjs.com. CouchDB databases provide a Changes
- feed that provide the changes since the last set of changes were published:
- https://docs.couchbase.com/sync-gateway/current/changes-feed.html *
- We connect to the CouchDB database and continually read for the next set
- of changes to the database. Once we receive changes, we take the found releases
- and add them to the processing queue. If no changes are available, we
- reconnect to the database in a number of seconds and try again. *
- Since this is based on detecting changes to the NPM database, it may be
- possible for a client to miss out on changes for some reason. Libraries only
- processes individual NPM versions delivered by ingestify, rather than reprocessing
- the whole package, so in that case, Libraries may not know about that version
- onless something triggers a full package resync on Libraries.
type NPMChangeDoc ¶
type NPMChangeDoc struct { ID string `json:"_id"` Rev string `json:"_rev,omitempty"` Name string `json:"name"` DistTags struct { Latest string `json:"latest"` } `json:"dist-tags"` Time map[string]string `json:"time"` }
See https://github.com/npm/registry-follower-tutorial#moar-data-please
type Packagist ¶
func NewPackagist ¶
func NewPackagist() *Packagist
func (*Packagist) Ingest ¶
func (ingestor *Packagist) Ingest() []data.PackageVersion
type PyPiRss ¶
func NewPyPiRss ¶
func NewPyPiRss() *PyPiRss
func (*PyPiRss) Ingest ¶
func (ingestor *PyPiRss) Ingest() []data.PackageVersion
type PyPiXmlRpc ¶
func NewPyPiXmlRpc ¶
func NewPyPiXmlRpc() *PyPiXmlRpc
func (*PyPiXmlRpc) Ingest ¶
func (ingestor *PyPiXmlRpc) Ingest() []data.PackageVersion
Retrieve a list of [name, version, timestamp, action] since the given since. All since timestamps are UTC values. The argument is a UTC integer seconds since the epoch (e.g., the timestamp method to a datetime.datetime object). calls "changelog(since, with_ids=False)" RPC
func (*PyPiXmlRpc) Name ¶
func (ingestor *PyPiXmlRpc) Name() string
func (*PyPiXmlRpc) Schedule ¶
func (ingestor *PyPiXmlRpc) Schedule() string
type PyPiXmlRpcResponse ¶
type PyPiXmlRpcResponse struct { Name string Version string Timestamp int64 Action string Serial int64 }
Structured storage for the tuple returned by the xmlrpc client
func (*PyPiXmlRpcResponse) GetPackageVersion ¶
func (response *PyPiXmlRpcResponse) GetPackageVersion() data.PackageVersion
Get the PackageVersion struct for this response
func (*PyPiXmlRpcResponse) IsIngestionAction ¶
func (response *PyPiXmlRpcResponse) IsIngestionAction() bool
Return trhe if this response is an ingestable action
type RubyGems ¶
func NewRubyGems ¶
func NewRubyGems() *RubyGems
func (*RubyGems) Ingest ¶
func (ingestor *RubyGems) Ingest() []data.PackageVersion
type StreamingIngestor ¶
type StreamingIngestor interface {
Ingest(chan data.PackageVersion)
}
Streaming Ingestors continually pull new release information from a persistent source. NPM is an example of this, as it provides a CouchDB API endpoint from which we can continually pull new package data.