lite

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultPath

func DefaultPath() string

Types

type Handler

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

Handler serves lite control-plane API at /api/control/v1/* It mimics the Next.js control-plane but backed by file.

func NewHandler

func NewHandler(store *Store) *Handler

func (*Handler) Accounts

func (h *Handler) Accounts() []map[string]interface{}

func (*Handler) Models

func (h *Handler) Models() []map[string]interface{}

func (*Handler) Providers

func (h *Handler) Providers() []map[string]interface{}

func (*Handler) ServeHTTP

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

func (*Handler) VirtualKeys

func (h *Handler) VirtualKeys() []map[string]interface{}

type Store

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

Store is a file-backed lite control-plane for single-binary mode. It holds the declarative config and persists to JSON file. When DATABASE_URL is not set, gateway uses this instead of Postgres.

func New

func New(path string) (*Store, error)

func (*Store) Config

func (s *Store) Config() config.Config

func (*Store) OnUpdate

func (s *Store) OnUpdate(fn func(*config.Snapshot))

func (*Store) Overview

func (s *Store) Overview() map[string]interface{}

For dashboard API: return overview-like data derived from snapshot

func (*Store) Snapshot

func (s *Store) Snapshot() *config.Snapshot

func (*Store) Update

func (s *Store) Update(fn func(*config.Config) error) error

Jump to

Keyboard shortcuts

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