endpoints

command
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: MPL-2.0 Imports: 2 Imported by: 0

README

Endpoint Examples Cookbook

This cookbook groups broader native endpoint examples in one generated app. The .gwdk files declare endpoint metadata and forms; src/endpoints/handlers.go owns request behavior, validation, redirects, JSON, and fragments in normal Go.

Run from this directory:

make check
make routes
make build
GOWDK_CSRF_SECRET=development-endpoints-csrf-secret-32b GOWDK_ADDR=127.0.0.1:8093 bin/endpoints

Pages

Page Demonstrates
contact.page.gwdk Contact action redirect plus inline validation fragment response.
settings.page.gwdk Settings save/reset actions returning partial fragments.
api.page.gwdk Session, search, JSON CRUD, and webhook API declarations backed by Go handlers.
fragments.page.gwdk Inline validation, table row, list refresh, modal body, and dashboard card fragments.

Endpoint Inventory

  • Actions: Contact, ValidateContact, SaveSettings, ResetSettings, RefreshInventory, UpdateInventoryRow, OpenModal, and RefreshDashboardCard.
  • APIs: Session, Search, ListItems, CreateItem, UpdateItem, DeleteItem, and DeployWebhook.
  • Standalone fragments: InlineValidation, InventoryRow, InventoryList, ModalBody, and DashboardCard.

Current Limits

  • API handlers own JSON body validation and authentication policy. Generated API declarations do not create typed request structs yet.
  • Action generated validation covers direct literal form constraints; domain validation remains in src/endpoints/handlers.go.
  • Fragment hooks and static fragment bodies are HTML strings today; richer typed fragment render helpers are still planned.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
src

Jump to

Keyboard shortcuts

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