├── .dockerignore ├── .github └── workflows │ └── ci.yaml ├── .gitignore ├── .vscode ├── extensions.json ├── launch.json ├── tasks.json └── vscode_config_extensions.json ├── Dockerfile ├── LICENSE ├── README.md ├── TODO.md ├── app ├── README.md └── app.go ├── caddy ├── README.md ├── caddyfile.go └── module.go ├── cmd └── main.go ├── config.go ├── cue.mod └── module.cue ├── dot.go ├── dot_db.go ├── dot_db_config.go ├── dot_flags.go ├── dot_flush.go ├── dot_fs.go ├── dot_fs_config.go ├── dot_instance.go ├── dot_kv.go ├── dot_nats.go ├── dot_nats_config.go ├── dot_req.go ├── dot_resp.go ├── frontmatter.go ├── funcs.go ├── go.mod ├── go.sum ├── handlers.go ├── instance.go ├── make_tool.cue ├── server.go └── test ├── .gitattributes ├── .gitignore ├── caddy.json ├── config.json ├── data ├── foo.txt ├── hello.txt └── subdir │ └── world.txt ├── migrations ├── manual.1.sql ├── manual.2.sql ├── schema.1.sql ├── schema.10.sql └── schema.2.sql ├── templates ├── assets │ ├── empty.txt │ ├── file.txt │ ├── file.txt.gz │ ├── link.html │ ├── print.css │ ├── reset.css │ ├── reset.css.br │ ├── reset.css.gz │ └── standalone.gz ├── db │ └── index.html ├── favicon.ico ├── flags │ └── index.html ├── fs │ ├── browse │ │ └── {filepath...}.html │ ├── openclose.html │ └── serve.html ├── hello.html ├── index{$}.html ├── nats │ └── index.html ├── ready.html ├── routing │ ├── .hidden.html │ ├── file.html │ ├── index.html │ └── visible.html └── sse │ ├── hotreload.html │ └── test.html └── tests ├── assets.hurl ├── flags.hurl ├── fs.hurl ├── nats.hurl.disabled ├── routing.hurl └── sse.hurl /.dockerignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/.dockerignore -------------------------------------------------------------------------------- /.github/workflows/ci.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/.github/workflows/ci.yaml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/.gitignore -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/.vscode/extensions.json -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/.vscode/launch.json -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/.vscode/tasks.json -------------------------------------------------------------------------------- /.vscode/vscode_config_extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["golang.go"] 3 | } -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/Dockerfile -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/README.md -------------------------------------------------------------------------------- /TODO.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/TODO.md -------------------------------------------------------------------------------- /app/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/app/README.md -------------------------------------------------------------------------------- /app/app.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/app/app.go -------------------------------------------------------------------------------- /caddy/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/caddy/README.md -------------------------------------------------------------------------------- /caddy/caddyfile.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/caddy/caddyfile.go -------------------------------------------------------------------------------- /caddy/module.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/caddy/module.go -------------------------------------------------------------------------------- /cmd/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/cmd/main.go -------------------------------------------------------------------------------- /config.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/config.go -------------------------------------------------------------------------------- /cue.mod/module.cue: -------------------------------------------------------------------------------- 1 | module: "xtemplate.build@v0" 2 | language: { 3 | version: "v0.14.1" 4 | } 5 | -------------------------------------------------------------------------------- /dot.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/dot.go -------------------------------------------------------------------------------- /dot_db.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/dot_db.go -------------------------------------------------------------------------------- /dot_db_config.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/dot_db_config.go -------------------------------------------------------------------------------- /dot_flags.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/dot_flags.go -------------------------------------------------------------------------------- /dot_flush.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/dot_flush.go -------------------------------------------------------------------------------- /dot_fs.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/dot_fs.go -------------------------------------------------------------------------------- /dot_fs_config.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/dot_fs_config.go -------------------------------------------------------------------------------- /dot_instance.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/dot_instance.go -------------------------------------------------------------------------------- /dot_kv.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/dot_kv.go -------------------------------------------------------------------------------- /dot_nats.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/dot_nats.go -------------------------------------------------------------------------------- /dot_nats_config.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/dot_nats_config.go -------------------------------------------------------------------------------- /dot_req.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/dot_req.go -------------------------------------------------------------------------------- /dot_resp.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/dot_resp.go -------------------------------------------------------------------------------- /frontmatter.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/frontmatter.go -------------------------------------------------------------------------------- /funcs.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/funcs.go -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/go.mod -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/go.sum -------------------------------------------------------------------------------- /handlers.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/handlers.go -------------------------------------------------------------------------------- /instance.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/instance.go -------------------------------------------------------------------------------- /make_tool.cue: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/make_tool.cue -------------------------------------------------------------------------------- /server.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/server.go -------------------------------------------------------------------------------- /test/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | -------------------------------------------------------------------------------- /test/.gitignore: -------------------------------------------------------------------------------- 1 | report 2 | *.log 3 | *.sqlite 4 | temp-* 5 | -------------------------------------------------------------------------------- /test/caddy.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/test/caddy.json -------------------------------------------------------------------------------- /test/config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/test/config.json -------------------------------------------------------------------------------- /test/data/foo.txt: -------------------------------------------------------------------------------- 1 | bar -------------------------------------------------------------------------------- /test/data/hello.txt: -------------------------------------------------------------------------------- 1 | world -------------------------------------------------------------------------------- /test/data/subdir/world.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/migrations/manual.1.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE manual(id); 2 | -------------------------------------------------------------------------------- /test/migrations/manual.2.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE manual; 2 | -------------------------------------------------------------------------------- /test/migrations/schema.1.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE test(data); 2 | 3 | PRAGMA user_version = 1; 4 | -------------------------------------------------------------------------------- /test/migrations/schema.10.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX idx_test; 2 | 3 | PRAGMA user_version = 10; 4 | -------------------------------------------------------------------------------- /test/migrations/schema.2.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/test/migrations/schema.2.sql -------------------------------------------------------------------------------- /test/templates/assets/empty.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/templates/assets/file.txt: -------------------------------------------------------------------------------- 1 | testing -------------------------------------------------------------------------------- /test/templates/assets/file.txt.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/test/templates/assets/file.txt.gz -------------------------------------------------------------------------------- /test/templates/assets/link.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/test/templates/assets/link.html -------------------------------------------------------------------------------- /test/templates/assets/print.css: -------------------------------------------------------------------------------- 1 | /* hello css */ 2 | -------------------------------------------------------------------------------- /test/templates/assets/reset.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/test/templates/assets/reset.css -------------------------------------------------------------------------------- /test/templates/assets/reset.css.br: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/test/templates/assets/reset.css.br -------------------------------------------------------------------------------- /test/templates/assets/reset.css.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/test/templates/assets/reset.css.gz -------------------------------------------------------------------------------- /test/templates/assets/standalone.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/test/templates/assets/standalone.gz -------------------------------------------------------------------------------- /test/templates/db/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/test/templates/db/index.html -------------------------------------------------------------------------------- /test/templates/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/test/templates/favicon.ico -------------------------------------------------------------------------------- /test/templates/flags/index.html: -------------------------------------------------------------------------------- 1 | 2 |

a: {{.Flags.Value "a"}} 3 | -------------------------------------------------------------------------------- /test/templates/fs/browse/{filepath...}.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/test/templates/fs/browse/{filepath...}.html -------------------------------------------------------------------------------- /test/templates/fs/openclose.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/test/templates/fs/openclose.html -------------------------------------------------------------------------------- /test/templates/fs/serve.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/test/templates/fs/serve.html -------------------------------------------------------------------------------- /test/templates/hello.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/test/templates/hello.html -------------------------------------------------------------------------------- /test/templates/index{$}.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/test/templates/index{$}.html -------------------------------------------------------------------------------- /test/templates/nats/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/test/templates/nats/index.html -------------------------------------------------------------------------------- /test/templates/ready.html: -------------------------------------------------------------------------------- 1 | OK -------------------------------------------------------------------------------- /test/templates/routing/.hidden.html: -------------------------------------------------------------------------------- 1 |

You can't see me

2 | -------------------------------------------------------------------------------- /test/templates/routing/file.html: -------------------------------------------------------------------------------- 1 | 2 |

hello! 3 | -------------------------------------------------------------------------------- /test/templates/routing/index.html: -------------------------------------------------------------------------------- 1 | 2 | routing 3 | -------------------------------------------------------------------------------- /test/templates/routing/visible.html: -------------------------------------------------------------------------------- 1 | {{template "/routing/.hidden.html". }} 2 | 3 |

And now you can

4 | -------------------------------------------------------------------------------- /test/templates/sse/hotreload.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/test/templates/sse/hotreload.html -------------------------------------------------------------------------------- /test/templates/sse/test.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/test/templates/sse/test.html -------------------------------------------------------------------------------- /test/tests/assets.hurl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/test/tests/assets.hurl -------------------------------------------------------------------------------- /test/tests/flags.hurl: -------------------------------------------------------------------------------- 1 | # get kv 2 | GET http://localhost:8080/flags 3 | 4 | HTTP 200 5 | [Asserts] 6 | body contains "a: 1" 7 | -------------------------------------------------------------------------------- /test/tests/fs.hurl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/test/tests/fs.hurl -------------------------------------------------------------------------------- /test/tests/nats.hurl.disabled: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/test/tests/nats.hurl.disabled -------------------------------------------------------------------------------- /test/tests/routing.hurl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/test/tests/routing.hurl -------------------------------------------------------------------------------- /test/tests/sse.hurl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infogulch/xtemplate/HEAD/test/tests/sse.hurl --------------------------------------------------------------------------------