sampleapp

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 45 Imported by: 0

Documentation

Overview

Package sampleapp serves the sample project the local app's tour shows when the person has no data of their own yet. It is a small, invented project (example/notes): a git clone with a few pull requests and their reviews, agent sessions with their transcripts and decisions, and the features they belong to. Nothing in it comes from the person or anyone else.

The project is written into its own directory the first time it is asked for, through the same stores the daemon keeps, and served by the same handlers, so it shows whatever the app shows. GitHub and the model are never reached: GitHub's answers are fixed, and every request that would change something is refused with a marked answer the app turns into a short notice.

Index

Constants

View Source
const Refused = "refused"

Refused marks the answer to a request the sample project refuses, in its X-Baum-Sample header.

Variables

This section is empty.

Functions

This section is empty.

Types

type Workspace

type Workspace struct {
	// Dir is where the project is written, emptied first; Close removes it.
	Dir string
	// Own serves the person's own API. The tour's state is theirs, so its
	// requests go there.
	Own http.Handler
	// contains filtered or unexported fields
}

Workspace serves the sample project's API. Its zero value is not usable; set Dir and Own.

func (*Workspace) Close

func (w *Workspace) Close()

Close releases the project's stores and removes its directory.

func (*Workspace) ServeHTTP

func (w *Workspace) ServeHTTP(rw http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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