Documentation
¶
Index ¶
- type APIResponse
- type ErrorResponse
- type Server
- func (s *Server) Auth(c echo.Context) error
- func (s *Server) AuthMiddleware(next echo.HandlerFunc) echo.HandlerFunc
- func (s *Server) CreatePluginPolicy(c echo.Context) error
- func (s *Server) CreateReview(c echo.Context) error
- func (s *Server) DeletePlugin(c echo.Context) error
- func (s *Server) DeletePluginPolicyById(c echo.Context) error
- func (s *Server) ExistVault(c echo.Context) error
- func (s *Server) GetActiveTokens(c echo.Context) error
- func (s *Server) GetAllPluginPolicies(c echo.Context) error
- func (s *Server) GetCategories(c echo.Context) error
- func (s *Server) GetInstalledPlugins(c echo.Context) error
- func (s *Server) GetKeysignResult(c echo.Context) error
- func (s *Server) GetPlugin(c echo.Context) error
- func (s *Server) GetPluginAvgRating(c echo.Context) error
- func (s *Server) GetPluginInstallationsCountByID(c echo.Context) error
- func (s *Server) GetPluginPolicyById(c echo.Context) error
- func (s *Server) GetPluginPolicyTransactionHistory(c echo.Context) error
- func (s *Server) GetPluginRecipeFunctions(c echo.Context) error
- func (s *Server) GetPluginRecipeSpecification(c echo.Context) error
- func (s *Server) GetPluginRecipeSpecificationSuggest(c echo.Context) error
- func (s *Server) GetPlugins(c echo.Context) error
- func (s *Server) GetPricing(c echo.Context) error
- func (s *Server) GetPublicKeyFees(c echo.Context) error
- func (s *Server) GetReviews(c echo.Context) error
- func (s *Server) GetTags(c echo.Context) error
- func (s *Server) GetUserFees(c echo.Context) error
- func (s *Server) GetVault(c echo.Context) error
- func (s *Server) IssueCredit(c echo.Context) error
- func (s *Server) MarkCollected(c echo.Context) error
- func (s *Server) Ping(c echo.Context) error
- func (s *Server) PluginAuthMiddleware(next echo.HandlerFunc) echo.HandlerFunc
- func (s *Server) RefreshToken(c echo.Context) error
- func (s *Server) ReshareVault(c echo.Context) error
- func (s *Server) RevokeAllTokens(c echo.Context) error
- func (s *Server) RevokeToken(c echo.Context) error
- func (s *Server) SignPluginMessages(c echo.Context) error
- func (s *Server) StartServer() error
- func (s *Server) UpdatePluginPolicyById(c echo.Context) error
- func (s *Server) VaultAuthMiddleware(next echo.HandlerFunc) echo.HandlerFunc
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 ErrorResponse ¶
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, asynqClient *asynq.Client, inspector *asynq.Inspector, jwtSecret string, txIndexerService *tx_indexer.Service, ) *Server
NewServer returns a new server.
func (*Server) AuthMiddleware ¶
func (s *Server) AuthMiddleware(next echo.HandlerFunc) echo.HandlerFunc
func (*Server) DeletePlugin ¶
DeletePlugin deletes a plugin and its associated policies and vault
func (*Server) DeletePluginPolicyById ¶
func (*Server) GetActiveTokens ¶
GetActiveTokens returns all active tokens for the authenticated vault
func (*Server) GetKeysignResult ¶
GetKeysignResult is a handler to get the keysign response
func (*Server) GetPluginInstallationsCountByID ¶
func (*Server) GetPluginPolicyTransactionHistory ¶
func (*Server) GetPluginRecipeFunctions ¶
func (*Server) GetPluginRecipeSpecification ¶
func (*Server) GetPluginRecipeSpecificationSuggest ¶
func (*Server) PluginAuthMiddleware ¶
func (s *Server) PluginAuthMiddleware(next echo.HandlerFunc) echo.HandlerFunc
func (*Server) ReshareVault ¶
ReshareVault is a handler to reshare a vault
func (*Server) RevokeAllTokens ¶
RevokeAllTokens revokes all tokens for the authenticated vault
func (*Server) RevokeToken ¶
RevokeToken revokes a specific token
func (*Server) StartServer ¶
func (*Server) UpdatePluginPolicyById ¶
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.
Click to show internal directories.
Click to hide internal directories.