abstract const class fanr::Repo

sys::Obj
  fanr::Repo

Source

Repo models a database of pod versions See docFanr.

find

abstract PodSpec? find(Str podName, Version? version, Bool checked := true)

Source

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)

Source

Find and create Repo implementation for URI based on its scheme. Current schemes supported as "file" and "http".

ping

abstract Str:Str ping()

Source

Ping the repo and return summary props. Standard props include:

  • fanr.type: qname of Repo implementation class
  • fanr.version: version string of fanr pod being used
publish

abstract PodSpec publish(File podFile)

Source

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)

Source

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)

Source

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()

Source

uri

abstract Uri uri()

Source

URI for this Repo