Skip to content

Commit b9838f5

Browse files
committed
feat(vanity): add go/cache + go/core/docs go-import
Resolve the two module paths cmd/core needs from tags: - dappco.re/go/cache -> github.com/dappcore/go-cache (go/ subdir) - dappco.re/go/core/docs -> github.com/dappcore/docs (go/ subdir) Each page's head meta overrides the umbrella dappco.re/go default, so go-get resolves them to their own repos instead of the go monorepo. Co-Authored-By: Virgil <virgil@lethean.io>
1 parent b504c88 commit b9838f5

3 files changed

Lines changed: 87 additions & 0 deletions

File tree

astro.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ export default defineConfig({
8585
{ label: 'ansible', slug: 'go/ansible' },
8686
{ label: 'api', slug: 'go/api' },
8787
{ label: 'build', slug: 'go/build' },
88+
{ label: 'cache', slug: 'go/cache' },
8889
{ label: 'cgo', slug: 'go/cgo' },
8990
{ label: 'cli', slug: 'go/cli' },
9091
{ label: 'config', slug: 'go/config' },

src/content/docs/go/cache.mdx

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
title: cache
3+
description: Storage-agnostic JSON cache backed by any io.Medium.
4+
head:
5+
- tag: meta
6+
attrs:
7+
name: go-import
8+
content: 'dappco.re/go/cache git https://github.com/dappcore/go-cache.git go'
9+
- tag: meta
10+
attrs:
11+
name: go-source
12+
content: 'dappco.re/go/cache https://github.com/dappcore/go-cache https://github.com/dappcore/go-cache/tree/main/go{/dir} https://github.com/dappcore/go-cache/blob/main/go{/dir}/{file}#L{line}'
13+
---
14+
15+
A storage-agnostic, JSON-based cache backed by any [`go/io`](/go/io/)
16+
`Medium` — local disk, in-memory, or a sandboxed root — so the same cache
17+
code runs against real storage in production and an ephemeral mock in tests.
18+
19+
## Install
20+
21+
```sh
22+
go get dappco.re/go/cache@latest
23+
```
24+
25+
## Import
26+
27+
```go
28+
import "dappco.re/go/cache"
29+
```
30+
31+
## Construct
32+
33+
Build a cache over any `io.Medium`:
34+
35+
```go
36+
r := cache.NewCacheStorage(medium, "cache")
37+
if !r.OK { return r }
38+
```
39+
40+
Or register it as a `core/go` service on a `*core.Core`:
41+
42+
```go
43+
if r := cache.NewService(cfg)(c); !r.OK { return r }
44+
```
45+
46+
## Sibling packages
47+
48+
- [`go/io`](/go/io/) — the `Medium` contract the cache is backed by
49+
- [`go/store`](/go/store/) — KV + workspace persistence
50+
51+
## Source
52+
53+
[`github.com/dappcore/go-cache`](https://github.com/dappcore/go-cache) — full source, issues, and releases.

src/content/docs/go/core/docs.mdx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
title: core/docs
3+
description: Documentation catalog, ingest, search, and render engine.
4+
head:
5+
- tag: meta
6+
attrs:
7+
name: go-import
8+
content: 'dappco.re/go/core/docs git https://github.com/dappcore/docs.git go'
9+
- tag: meta
10+
attrs:
11+
name: go-source
12+
content: 'dappco.re/go/core/docs https://github.com/dappcore/docs https://github.com/dappcore/docs/tree/main/go{/dir} https://github.com/dappcore/docs/blob/main/go{/dir}/{file}#L{line}'
13+
---
14+
15+
The documentation engine behind the Core help system — catalog, ingest,
16+
parse, render, and full-text search over the framework's package docs.
17+
The `pkg/help` subpackage is what the `core` CLI embeds to serve `core help`.
18+
19+
## Install
20+
21+
```sh
22+
go get dappco.re/go/core/docs@latest
23+
```
24+
25+
## Import
26+
27+
```go
28+
import "dappco.re/go/core/docs/pkg/help"
29+
```
30+
31+
## Source
32+
33+
[`github.com/dappcore/docs`](https://github.com/dappcore/docs) — full source, issues, and releases.

0 commit comments

Comments
 (0)