Documentation
¶
Overview ¶
Package templates writes commented starter files for realms and databases into CONFIG_DIR (`backd template`).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct {
Path string // relative to CONFIG_DIR, slash-separated
Created bool // false: it already existed and was left unchanged
}
File reports what happened to one file.
func Database ¶
Database creates <realm>/<database>/ under configDir; the realm must already exist. With sample, it adds the blog sample collection.
func Function ¶
Function creates the function <name> in <realm>/<database>/_functions, with the project's deno.json if it has none; the database must exist.
func Project ¶
Project creates a new, self-contained config repository at dir (which must not already exist): a realm with the sample database and collection, a sample function with tests, the Dockerfiles and compose stack (MongoDB, backd, the executor and egress) for local development, and the CI workflow from the docs' "Deploying config" guide — so "develop locally → CI → promote a tag" works from the first commit.