Help us shape the future of Go! Take the 2026 Go Developer Survey

handlers

package
v0.18.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BranchDiffHandler

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

BranchDiffHandler serves raw branch patch diffs.

func NewBranchDiffHandler

func NewBranchDiffHandler(reg *registry.Registry) *BranchDiffHandler

NewBranchDiffHandler creates a handler that resolves the per-request repo from the registry.

func (*BranchDiffHandler) ServeHTTP

func (h *BranchDiffHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP handles GET branch diff endpoint.

type BranchesHandler

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

BranchesHandler serves branch data.

func NewBranchesHandler

func NewBranchesHandler(reg *registry.Registry) *BranchesHandler

NewBranchesHandler creates a handler that resolves the per-request repo from the registry.

func (*BranchesHandler) ServeHTTP

func (h *BranchesHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP handles GET branches endpoints.

type EventsHandler

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

EventsHandler streams server-sent events from the per-repo broadcaster. Each connection is scoped to one repo: subscribers to /repos/A/events only see events broadcast on repo A.

func NewEventsHandler

func NewEventsHandler(reg *registry.Registry) *EventsHandler

NewEventsHandler creates a handler that resolves the per-request repo from the registry and streams from that repo's broadcaster.

func (*EventsHandler) ServeHTTP

func (h *EventsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP handles the SSE connection for one repo.

type RepoHandler

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

RepoHandler serves repository metadata.

func NewRepoHandler

func NewRepoHandler(reg *registry.Registry) *RepoHandler

NewRepoHandler creates a handler that resolves the per-request repo from the registry.

func (*RepoHandler) ServeHTTP

func (h *RepoHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP handles GET repo endpoints.

type ReposListHandler added in v0.18.1

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

ReposListHandler serves GET /api/v1/repos — the unscoped index of repos the server is configured to serve. Clients use this to render a picker before scoping subsequent calls to /api/v1/repos/{repoID}/...

func NewReposListHandler added in v0.18.1

func NewReposListHandler(reg *registry.Registry) *ReposListHandler

NewReposListHandler creates a handler backed by reg.

func (*ReposListHandler) ServeHTTP added in v0.18.1

func (h *ReposListHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP returns one RepoSummary per registry entry, sorted by ID.

type StacksHandler

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

StacksHandler serves stack data.

func NewStacksHandler

func NewStacksHandler(reg *registry.Registry) *StacksHandler

NewStacksHandler creates a handler that resolves the per-request repo from the registry.

func (*StacksHandler) ServeHTTP

func (h *StacksHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP handles GET stacks endpoints.

type SubmitHandler

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

SubmitHandler handles POST requests to submit a stack.

func NewSubmitHandler

func NewSubmitHandler(reg *registry.Registry) *SubmitHandler

NewSubmitHandler creates a handler that resolves the per-request repo from the registry.

func (*SubmitHandler) ServeHTTP

func (h *SubmitHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP handles the submit request.

type ViewAssembler

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

ViewAssembler builds the combined /view payload.

func NewViewAssembler

func NewViewAssembler(eng engine.BranchReader, gh github.Client, remote string) *ViewAssembler

func (*ViewAssembler) Build

type ViewHandler

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

ViewHandler serves the combined view payload for the frontend.

func NewViewHandler

func NewViewHandler(reg *registry.Registry) *ViewHandler

NewViewHandler creates a handler that resolves the per-request repo from the registry. Assembly logic lives in ViewAssembler so this handler stays transport-focused.

func (*ViewHandler) ServeHTTP

func (h *ViewHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP handles GET view endpoints.

Jump to

Keyboard shortcuts

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