api

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package api provides REST API handlers for the web dashboard

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CoreInterface

type CoreInterface interface {
	ListAgentsJSON() (interface{}, error)
}

CoreInterface defines the interface for core operations

type Handler

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

Handler creates REST API handlers for the web dashboard

func NewHandler

func NewHandler(c CoreInterface, authMW *auth.Middleware) *Handler

NewHandler creates a new API handler

func (*Handler) RegisterRoutes

func (h *Handler) RegisterRoutes(mux *http.ServeMux)

RegisterRoutes registers all API routes

type Response

type Response struct {
	Success bool        `json:"success"`
	Data    interface{} `json:"data,omitempty"`
	Error   string      `json:"error,omitempty"`
}

Response represents a standard API response

Jump to

Keyboard shortcuts

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