abstract const class fanr::Repo
Repo models a database of pod versions See docFanr.
abstract PodSpec? find(Str podName, Version? version, Bool checked := true)
Find an exact match for the given pod name and version. If version is null, then find latest version. If not found then return null or throw UnknownPodErr based on checked flag.
static Repo makeForUri(Uri uri, Str? username := null, Str? password := null)
Find and create Repo implementation for URI based on its scheme. Current schemes supported as "file" and "http".
Ping the repo and return summary props. Standard props include:
fanr.type: qname of Repo implementation class
fanr.version: version string of
fanrpod being used
abstract PodSpec publish(File podFile)
Publish the given pod file. If successful return the spec for newly added pod. Throw err if the pod is malformed or already published in the database.
abstract PodSpec query(Str query, Int numVersions := 1)
Find pod versions which match query. The
numVersionsspecifies how many different versions will be matched for a single pod. Multiple pod versions are matched from highest version to lowest version, so a limit of one will always match the current (highest) version.
abstract InStream read(PodSpec pod)
Open an input stream to read the specified pod version. Callers should ensure that the stream is drained and closed as quickly as possible.
override Str toStr()
abstract Uri uri()
URI for this Repo