rest

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package rest contains the REST handler implementations for the six standard Document operations (list, get, create, update, delete, submit).

See PRD §14.2 for the endpoint specification. Implemented in Phase 6.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler serves REST operations for Documents per PRD §14.2.

func NewHandler

func NewHandler(engine *document.Engine) *Handler

NewHandler constructs a new REST Handler.

func (*Handler) Create

func (h *Handler) Create(w http.ResponseWriter, r *http.Request)

Create handles POST /api/v1/document/{doctype}

func (*Handler) Delete

func (h *Handler) Delete(w http.ResponseWriter, r *http.Request)

Delete handles DELETE /api/v1/document/{doctype}/{id}

func (*Handler) List

func (h *Handler) List(w http.ResponseWriter, r *http.Request)

List handles GET /api/v1/document/{doctype}

func (*Handler) Read

func (h *Handler) Read(w http.ResponseWriter, r *http.Request)

Read handles GET /api/v1/document/{doctype}/{id}

func (*Handler) Update

func (h *Handler) Update(w http.ResponseWriter, r *http.Request)

Update handles PATCH /api/v1/document/{doctype}/{id}

Jump to

Keyboard shortcuts

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