webtyp.com/deploy is the deployment contract shared by all webtyp applications and providers. It declares what a project needs and orchestrates how a CI and a target work together to fulfill those needs. It contains only types, interfaces, the reader of a project's declaration, and the generic orchestration over those interfaces.
It does not contain any provider implementations (like Cloudflare or GitHub). Implementations import deploy, and webtyp.com/app composes them.
Plan: The deployment specification.Deployment: APlancombined with the tools (Target,CI,Localdestination) that carry it out.Target: Where the project runs (e.g., a Cloudflare Worker).CI: The platform that runs the deployment (e.g., GitHub Actions).Destination: An interface representing places that receive secrets (Runtime, CI, Local keyring).Missing: Items (secrets or configuration) that are required but absent.
Projects declare their deployment by placing a config/deploy.go file with the following exact format:
//go:build deploy
package config
import (
"webtyp.com/deploy"
"webtyp.com/github"
"webtyp.com/goflare"
)
func Deploy() deploy.Plan {
return deploy.Plan{
Name: "misitio",
Domain: "misitio.velty.cl",
Target: goflare.Worker,
CI: github.Actions,
Databases: []deploy.Database{{Binding: "DB", Name: "velty-misitio-db"}},
Buckets: []deploy.Bucket{{Binding: "ASSETS", Name: "velty-misitio-assets"}},
Vars: []deploy.Var{{Key: "IAM_BASE_URL", Value: "https://iam.velty.cl"}},
}
}The Deployment struct exposes the following orchestration methods:
Check: Validates the plan and queries theCI,Target, and all specified places (Runtime, CI, Local) for missing secrets. Returns a list ofMissingitems.Provision: Automatically creates any missingRandomsecrets and delivers them to their required destinations. AsksTargetandCIto provision themselves.Rotate: Regenerates and overwrites allRandomsecrets across all destinations, and returns a list ofFixInputmissing items for anyTypedsecrets.Release: Verifies the deployment is ready viaCheck, and triggers the CI deploy job.Status: Returns the current status of the CI deployment run.
deploy.LocalMissing(plan, local) is a function, not a method: it returns only the ToLocal items of Check and never calls a Target or CI, so the local development server can wait for its secrets without reaching any provider.
Important: Tool implementations MUST import deploy; this package will never import an implementation.