backend

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterEventHandlers

func RegisterEventHandlers(bus events.Bus, serviceInterface Service, logger log.Logger)

RegisterEventHandlers registers the necessary event handlers for the backend service. It performs a type assertion to access the unexported handler methods.

Types

type Service

type Service interface {
	// MCP Server Management
	AddMCPServer(name, url string) (*models.MCPServer, error)
	ListMCPServers() ([]models.MCPServer, error)
	GetMCPServer(id int64) (*models.MCPServer, error)
	RemoveMCPServer(id int64) error
	UpdateMCPServerStatus(id int64, state models.ConnectionState, errStr *string) error
	UpdateMCPServer(id int64, name, url string) (*models.MCPServer, error)

	// Tool Management
	ProcessFetchedTools(serverID int64, fetchedTools []models.FetchedTool) (added int, updated int, err error)
}

Service defines the interface for backend operations. This interface abstracts the data storage and business logic.

func NewService

func NewService(db database.DBInterface, bus events.Bus, logger log.Logger) Service

NewService creates a new backend service instance.

Directories

Path Synopsis
Package database provides database interactions using sqlx.
Package database provides database interactions using sqlx.
Package models defines the data structures used by the agent-browser application.
Package models defines the data structures used by the agent-browser application.

Jump to

Keyboard shortcuts

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