webapi

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package webapi is the EasyLab UI-facing aggregate gateway. It fans out to the EasyLab core (Lab + ops APIs) and (optionally) the embedded agent session backend, presenting a single, UI-friendly surface for the bundled SPA and clients. It is separate from the raw /api/v1 Lab surface so the UI contract can evolve without touching core semantics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	CS *store.CentralStore
	// AgentURL, when set, forwards /sessions|providers|models|presets|config
	// to the embedded agent session backend (easylab-agent SEA). When empty the
	// UI omits chat/session settings.
	AgentURL string
	// Up points back at easylab's own /api/v1 + /v2 so the aggregate surface
	// can fetch real services/catalog/releases (all EasyVCS semantics).
	SelfBase string
	// contains filtered or unexported fields
}

API aggregates the EasyLab resources for the UI.

func (*API) MountAPI

func (a *API) MountAPI(mux *http.ServeMux)

MountAPI registers the aggregate API routes onto mux (specific paths so they take precedence over the raw /api/v1 Lab facade). The SPA is mounted separately via MountSPA.

func (*API) MountSPA

func (a *API) MountSPA(mux *http.ServeMux)

MountSPA serves the embedded SPA at "/" with fallback to index.html.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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