api

package
v0.1.26 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2026 License: MIT Imports: 57 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIResponse

type APIResponse[T any] struct {
	Data      T             `json:"data,omitempty"`
	Error     ErrorResponse `json:"error"`
	Status    int           `json:"status,omitempty"`
	Timestamp string        `json:"timestamp"`
	Version   string        `json:"version"`
}

func NewErrorResponseWithMessage

func NewErrorResponseWithMessage(message string) APIResponse[interface{}]

func NewSuccessResponse

func NewSuccessResponse[T any](code int, data T) APIResponse[T]

type AvailablePlugin added in v0.1.20

type AvailablePlugin struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	SkillsMD string `json:"skills_md"`
}

AvailablePlugin represents a plugin available for AI agents to interact with.

type AvailablePluginsResponse added in v0.1.20

type AvailablePluginsResponse struct {
	Plugins []AvailablePlugin `json:"plugins"`
}

AvailablePluginsResponse is the response format for the /plugins/available endpoint.

type ErrorResponse

type ErrorResponse struct {
	Message          string `json:"message"`
	DetailedResponse string `json:"details,omitempty"`
}

type Server

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

func NewServer

func NewServer(
	cfg config.VerifierConfig,
	db *postgres.PostgresBackend,
	redis *storage.RedisStorage,
	vaultStorage vault.Storage,
	assetStorage storage.PluginAssetStorage,
	asynqClient *asynq.Client,
	inspector *asynq.Inspector,
	jwtSecret string,
	txIndexerService *tx_indexer.Service,
	httpMetrics *internalMetrics.HTTPMetrics,
) *Server

NewServer returns a new server.

func (*Server) Auth

func (s *Server) Auth(c echo.Context) error

func (*Server) AuthMiddleware

func (s *Server) AuthMiddleware(next echo.HandlerFunc) echo.HandlerFunc

func (*Server) CreatePluginPolicy

func (s *Server) CreatePluginPolicy(c echo.Context) error

func (*Server) CreateReview

func (s *Server) CreateReview(c echo.Context) error

func (*Server) DeletePlugin

func (s *Server) DeletePlugin(c echo.Context) error

DeletePlugin deletes a plugin and its associated policies and vault

func (*Server) DeletePluginPolicyById

func (s *Server) DeletePluginPolicyById(c echo.Context) error

func (*Server) ExistVault

func (s *Server) ExistVault(c echo.Context) error

func (*Server) GetActiveTokens

func (s *Server) GetActiveTokens(c echo.Context) error

GetActiveTokens returns all active tokens for the authenticated vault

func (*Server) GetAllPluginPolicies

func (s *Server) GetAllPluginPolicies(c echo.Context) error

func (*Server) GetAvailablePlugins added in v0.1.20

func (s *Server) GetAvailablePlugins(c echo.Context) error

GetAvailablePlugins returns a list of available plugins with their metadata and skills. This endpoint is public and does not require authentication. It is intended for AI agents to discover plugins and their capabilities. Plugins that fail to respond to skills requests are excluded (considered unavailable).

func (*Server) GetCategories

func (s *Server) GetCategories(c echo.Context) error

func (*Server) GetInstalledPlugins

func (s *Server) GetInstalledPlugins(c echo.Context) error

func (*Server) GetKeysignResult

func (s *Server) GetKeysignResult(c echo.Context) error

GetKeysignResult is a handler to get the keysign response

func (*Server) GetPlugin

func (s *Server) GetPlugin(c echo.Context) error

func (*Server) GetPluginAvgRating

func (s *Server) GetPluginAvgRating(c echo.Context) error

func (*Server) GetPluginBillingSummary added in v0.1.16

func (s *Server) GetPluginBillingSummary(c echo.Context) error

GetPluginBillingSummary returns billing summary for all plugins the user has used

func (*Server) GetPluginFeeHistory added in v0.1.16

func (s *Server) GetPluginFeeHistory(c echo.Context) error

GetPluginFeeHistory returns paginated fee history for a specific plugin

func (*Server) GetPluginInstallationsCountByID

func (s *Server) GetPluginInstallationsCountByID(c echo.Context) error

func (*Server) GetPluginPolicyById

func (s *Server) GetPluginPolicyById(c echo.Context) error

func (*Server) GetPluginPolicyTransactionHistory

func (s *Server) GetPluginPolicyTransactionHistory(c echo.Context) error

func (*Server) GetPluginRecipeFunctions

func (s *Server) GetPluginRecipeFunctions(c echo.Context) error

func (*Server) GetPluginRecipeSpecification

func (s *Server) GetPluginRecipeSpecification(c echo.Context) error

func (*Server) GetPluginRecipeSpecificationSuggest

func (s *Server) GetPluginRecipeSpecificationSuggest(c echo.Context) error

func (*Server) GetPluginSkills added in v0.1.20

func (s *Server) GetPluginSkills(c echo.Context) error

GetPluginSkills returns the skills for a specific plugin. This endpoint is public and does not require authentication. It is intended for AI agents to understand a plugin's capabilities. Returns 404 if the plugin is not found or unavailable.

func (*Server) GetPluginTransactionHistory added in v0.1.16

func (s *Server) GetPluginTransactionHistory(c echo.Context) error

func (*Server) GetPlugins

func (s *Server) GetPlugins(c echo.Context) error

func (*Server) GetPricing

func (s *Server) GetPricing(c echo.Context) error

func (*Server) GetPublicKeyFees

func (s *Server) GetPublicKeyFees(c echo.Context) error

func (*Server) GetReviews

func (s *Server) GetReviews(c echo.Context) error

func (*Server) GetTags

func (s *Server) GetTags(c echo.Context) error

func (*Server) GetUserFees

func (s *Server) GetUserFees(c echo.Context) error

func (*Server) GetVault

func (s *Server) GetVault(c echo.Context) error

func (*Server) IssueCredit

func (s *Server) IssueCredit(c echo.Context) error

func (*Server) MarkCollected

func (s *Server) MarkCollected(c echo.Context) error

func (*Server) Ping

func (s *Server) Ping(c echo.Context) error

func (*Server) PluginAuthMiddleware

func (s *Server) PluginAuthMiddleware(next echo.HandlerFunc) echo.HandlerFunc

func (*Server) RefreshToken

func (s *Server) RefreshToken(c echo.Context) error

func (*Server) ReportPlugin added in v0.1.16

func (s *Server) ReportPlugin(c echo.Context) error

func (*Server) ReshareVault

func (s *Server) ReshareVault(c echo.Context) error

ReshareVault is a handler to reshare a vault

func (*Server) RevokeAllTokens

func (s *Server) RevokeAllTokens(c echo.Context) error

RevokeAllTokens revokes all tokens for the authenticated vault

func (*Server) RevokeToken

func (s *Server) RevokeToken(c echo.Context) error

RevokeToken revokes a specific token

func (*Server) SignPluginMessages

func (s *Server) SignPluginMessages(c echo.Context) error

func (*Server) StartServer

func (s *Server) StartServer() error

func (*Server) UpdatePluginPolicyById

func (s *Server) UpdatePluginPolicyById(c echo.Context) error

func (*Server) VaultAuthMiddleware

func (s *Server) VaultAuthMiddleware(next echo.HandlerFunc) echo.HandlerFunc

VaultAuthMiddleware verifies JWT tokens and ensures users can only access their own vaults.

Jump to

Keyboard shortcuts

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