httpapi

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrIndexNotReady = errors.New("index not ready; call /api/v1/index/refresh or restart with successful startup indexing")

Functions

This section is empty.

Types

type HTTPError

type HTTPError struct {
	Status  int
	Code    string
	Message string
	Details any
}

func NewHTTPError

func NewHTTPError(status int, code, message string, details any) *HTTPError

func (*HTTPError) Error

func (e *HTTPError) Error() string

type IndexManager

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

func NewIndexManager

func NewIndexManager(rootOverride string) *IndexManager

func (*IndexManager) Refresh

func (m *IndexManager) Refresh(ctx context.Context) (IndexSnapshot, error)

func (*IndexManager) Snapshot

func (m *IndexManager) Snapshot() IndexSnapshot

func (*IndexManager) WithWorkspace

func (m *IndexManager) WithWorkspace(fn func(ws *workspace.Workspace) error) error

type IndexSnapshot

type IndexSnapshot struct {
	Workspace   *workspace.Workspace
	IndexedAt   time.Time
	DocsIndexed int
}

type Server

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

func NewServer

func NewServer(mgr *IndexManager, opts ServerOptions) *Server

func (*Server) Handler

func (s *Server) Handler() http.Handler

type ServerOptions

type ServerOptions struct {
	CORSOrigin string
}

Jump to

Keyboard shortcuts

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