with-rest

command
v1.0.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: MIT Imports: 3 Imported by: 0

README

with-rest Feature Demo

reference/with-rest is a non-canonical feature demo.

It shows how to add x/rest resource controllers to a service that still starts from Plumego's canonical application shape.

x/rest remains experimental until beta promotion evidence is complete. Use this demo as wiring guidance, not as a compatibility claim.

What It Demonstrates

  • normal explicit handlers and x/rest resource controllers in the same app
  • in-memory repository implementation with no external database
  • visible route registration through core.App
  • standard contract.WriteResponse for app-local handlers

Routes

  • GET /api/hello
  • GET /api/users
  • GET /api/users/:id
  • POST /api/users

Run

go run ./reference/with-rest

Documentation

Overview

Example: with-rest

This demo adds x/rest resource controllers to a service that keeps the standard Plumego bootstrap and explicit route registration style.

Directories

Path Synopsis
internal
app
Package app wires together the application dependencies and manages the server lifecycle.
Package app wires together the application dependencies and manages the server lifecycle.
config
Package config loads the with-rest demo configuration.
Package config loads the with-rest demo configuration.
domain/user
Package user contains the User domain model and its in-memory repository.
Package user contains the User domain model and its in-memory repository.

Jump to

Keyboard shortcuts

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