Documentation
¶
Index ¶
- type SpecLoaderService
- func (s *SpecLoaderService) ActivateSpec(id int) error
- func (s *SpecLoaderService) CreateSpecFromContent(name, endpointPath, specContent, fileFormat string, apiKeyToken *string) error
- func (s *SpecLoaderService) DeactivateSpec(id int) error
- func (s *SpecLoaderService) DeleteSpec(id int) error
- func (s *SpecLoaderService) GetActiveSpecs() ([]*models.OpenAPISpec, error)
- func (s *SpecLoaderService) GetAllSpecs() ([]*models.OpenAPISpec, error)
- func (s *SpecLoaderService) ImportSpecFromFile(filePath, name, endpointPath string) error
- func (s *SpecLoaderService) ImportSpecFromFileWithToken(filePath, name, endpointPath string, apiKeyToken *string) error
- func (s *SpecLoaderService) LoadFromDatabase() ([]openapi2mcp.OpenAPIOperation, []*openapi3.T, error)
- func (s *SpecLoaderService) LoadSpecByEndpoint(endpointPath string) ([]openapi2mcp.OpenAPIOperation, *openapi3.T, error)
- func (s *SpecLoaderService) LoadSpecByName(name string) ([]openapi2mcp.OpenAPIOperation, *openapi3.T, error)
- func (s *SpecLoaderService) UpdateApiKeyToken(id int, apiKeyToken *string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SpecLoaderService ¶
type SpecLoaderService struct {
// contains filtered or unexported fields
}
SpecLoaderService handles loading OpenAPI specs from database or files
func NewSpecLoaderService ¶
func NewSpecLoaderService(db *sql.DB) *SpecLoaderService
NewSpecLoaderService creates a new spec loader service
func (*SpecLoaderService) ActivateSpec ¶
func (s *SpecLoaderService) ActivateSpec(id int) error
ActivateSpec activates a spec by ID
func (*SpecLoaderService) CreateSpecFromContent ¶
func (s *SpecLoaderService) CreateSpecFromContent(name, endpointPath, specContent, fileFormat string, apiKeyToken *string) error
CreateSpecFromContent creates a new spec directly from content
func (*SpecLoaderService) DeactivateSpec ¶
func (s *SpecLoaderService) DeactivateSpec(id int) error
DeactivateSpec deactivates a spec by ID
func (*SpecLoaderService) DeleteSpec ¶
func (s *SpecLoaderService) DeleteSpec(id int) error
DeleteSpec deletes a spec by ID
func (*SpecLoaderService) GetActiveSpecs ¶
func (s *SpecLoaderService) GetActiveSpecs() ([]*models.OpenAPISpec, error)
GetActiveSpecs returns all active specs from the database
func (*SpecLoaderService) GetAllSpecs ¶
func (s *SpecLoaderService) GetAllSpecs() ([]*models.OpenAPISpec, error)
GetAllSpecs returns all specs from the database
func (*SpecLoaderService) ImportSpecFromFile ¶
func (s *SpecLoaderService) ImportSpecFromFile(filePath, name, endpointPath string) error
ImportSpecFromFile imports a spec from a file into the database
func (*SpecLoaderService) ImportSpecFromFileWithToken ¶
func (s *SpecLoaderService) ImportSpecFromFileWithToken(filePath, name, endpointPath string, apiKeyToken *string) error
ImportSpecFromFileWithToken imports a spec from a file into the database with an API key token
func (*SpecLoaderService) LoadFromDatabase ¶
func (s *SpecLoaderService) LoadFromDatabase() ([]openapi2mcp.OpenAPIOperation, []*openapi3.T, error)
LoadFromDatabase loads all active OpenAPI specs from the database
func (*SpecLoaderService) LoadSpecByEndpoint ¶
func (s *SpecLoaderService) LoadSpecByEndpoint(endpointPath string) ([]openapi2mcp.OpenAPIOperation, *openapi3.T, error)
LoadSpecByEndpoint loads a specific spec by endpoint path from the database
func (*SpecLoaderService) LoadSpecByName ¶
func (s *SpecLoaderService) LoadSpecByName(name string) ([]openapi2mcp.OpenAPIOperation, *openapi3.T, error)
LoadSpecByName loads a specific spec by name from the database
func (*SpecLoaderService) UpdateApiKeyToken ¶
func (s *SpecLoaderService) UpdateApiKeyToken(id int, apiKeyToken *string) error
UpdateApiKeyToken updates the API key token for a spec by ID