abstract const class fanr::Repo
sys::Obj fanr::Repo
Repo models a database of pod versions See docFanr.
- find
-
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.
- makeForUri
-
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
-
Ping the repo and return summary props. Standard props include:
fanr.type
: qname of Repo implementation classfanr.version
: version string offanr
pod being used
- publish
-
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.
- query
-
abstract PodSpec[] query(Str query, Int numVersions := 1)
Find pod versions which match query. The
numVersions
specifies 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. - read
-
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.
- toStr
-
override Str toStr()
- uri
-
abstract Uri uri()
URI for this Repo