githubdocs

package
v1.0.24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2026 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package githubdocs serves the built-in "Artel Quick Start" docs tree straight from this repo's own public GitHub remote (docs/public/ on the master branch), so a fresh Artel instance has something real to point an anonymous /docs visitor at before any CouchDB vault has been published. See internal/domain.ReservedGithubDocsSlug and internal/service/v1/public_docs for how this plugs into the existing public-docs surface — this package is self-contained and knows nothing about that wiring.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IdentityVault

func IdentityVault() domain.Vault

IdentityVault returns a synthetic domain.Vault representing the GitHub-backed docs "vault". Only Uuid/Name/Slug/IsPublic are ever read by callers, so every other field is left zero-valued.

Types

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

Resolver serves the docs/public tree of this repo's own GitHub remote in the same shape as the CouchDB-backed public docs path. It lazy-fetches on first use (not in NewResolver) and caches the whole walked tree — files, folders, and content — as one unit for cacheTTL.

func NewResolver

func NewResolver() *Resolver

NewResolver constructs a Resolver ready to serve requests. It does not perform any network calls itself — the first ListFolders/ListNotes/GetNote/ListTags call triggers the initial walk.

func (*Resolver) GetNote

func (r *Resolver) GetNote(ctx context.Context, path string) (couchdb.NoteDoc, error)

func (*Resolver) ListFolders

func (r *Resolver) ListFolders(ctx context.Context) ([]string, error)

func (*Resolver) ListNotes

func (r *Resolver) ListNotes(ctx context.Context) ([]couchdb.NoteEntry, error)

func (*Resolver) ListTags

func (r *Resolver) ListTags(_ context.Context) ([]string, error)

ListTags always returns an empty slice: the plain markdown files served here have no Obsidian-frontmatter tag convention to parse, and the frontend doesn't call this RPC for the docs page today either way.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL