studiohttp

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultMaxBodyBytes = int64(1 << 20)

Variables

This section is empty.

Functions

This section is empty.

Types

type CodeGenerator

type CodeGenerator interface {
	GenerateStudioBuilderCode(ctx context.Context, graph any) (any, error)
}

type Composer added in v0.4.0

type Composer interface {
	ComposeStudioGraph(ctx context.Context, req any) (any, error)
}

Composer runs AI graph composition (ComposeGraphRequest in, ComposeGraphResult out, both passed as any for decoupling).

type Handler

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

func NewHandler

func NewHandler(config HandlerConfig) *Handler

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w nethttp.ResponseWriter, r *nethttp.Request)

type HandlerConfig

type HandlerConfig struct {
	Validate     Validator
	Codegen      CodeGenerator
	YAML         YAMLExporter
	ImportYAML   YAMLImporter
	Run          Runner
	Save         Saver
	Compose      Composer
	Parts        PartsLister
	MaxBodyBytes int64
	// Policy authorizes the mutating endpoints: studio run as run.submit and
	// studio save as admin.configure, mirroring the checkpoint handler.
	// When Policy is nil those endpoints default-deny with 403 auth_required
	// unless InsecureAllowNoAuth explicitly opts out; the pure-transform
	// endpoints (validate/codegen/yaml/import-yaml) stay open.
	Policy security.Policy
	// Audit receives policy-denied records when configured.
	Audit audit.Sink
	// InsecureAllowNoAuth disables the default-deny protection on the
	// mutating endpoints when no Policy is configured. Only set it behind an
	// authenticating reverse proxy or in tests.
	InsecureAllowNoAuth bool
}

type PartsLister added in v0.4.0

type PartsLister interface {
	ListStudioParts() any
}

PartsLister returns the live scenario's composable parts.

type Runner

type Runner interface {
	RunStudioGraph(ctx context.Context, graph any, req any) (any, error)
}

type Saver

type Saver interface {
	SaveStudioGraph(ctx context.Context, graph any) (any, error)
}

type Validator

type Validator interface {
	ValidateStudioGraph(ctx context.Context, graph any) (any, error)
}

type YAMLExporter

type YAMLExporter interface {
	GenerateStudioScenarioYAML(ctx context.Context, graph any) (any, error)
}

type YAMLImporter

type YAMLImporter interface {
	ImportStudioScenarioYAML(ctx context.Context, yaml []byte, layout any) (any, error)
}

Jump to

Keyboard shortcuts

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