Documentation
¶
Index ¶
Constants ¶
View Source
const ( StoreRelPath = ".raven/docs" ManifestFilename = "manifest.json" DocsIndexFilename = "index.yaml" DefaultSourceBase = "https://codeload.github.com/aidanlsb/raven/tar.gz" DefaultSourceRef = "main" )
Variables ¶
View Source
var ErrDocsNotFetched = errors.New("docs are not fetched for this vault")
Functions ¶
Types ¶
type FetchOptions ¶
type FetchOptions struct {
VaultPath string
SourceBaseURL string
Ref string
CLIVersion string
HTTPClient *http.Client
Now func() time.Time
}
FetchOptions controls docs sync behavior.
type FetchResult ¶
FetchResult summarizes a docs sync.
func Fetch ¶
func Fetch(opts FetchOptions) (*FetchResult, error)
Fetch downloads and installs docs into .raven/docs for the given vault.
type Manifest ¶
type Manifest struct {
SchemaVersion int `json:"schema_version"`
SourceBaseURL string `json:"source_base_url"`
Ref string `json:"ref"`
ArchiveURL string `json:"archive_url"`
FetchedAt string `json:"fetched_at"`
CLIVersion string `json:"cli_version,omitempty"`
}
Manifest records the source and timing of the last docs sync.
func ReadManifest ¶
ReadManifest returns the docs manifest if present.
Click to show internal directories.
Click to hide internal directories.