Documentation
¶
Index ¶
- func DropDB() error
- func InitDB() error
- func UpgradeDB(fromVersion string, toVersion string) error
- type MCPServerConfig
- func (c *MCPServerConfig) Delete(params *dao.Params, ids string, queryFuncs ...func(*gorm.DB) *gorm.DB) error
- func (c *MCPServerConfig) GetOne(params *dao.Params, queryFuncs ...func(*gorm.DB) *gorm.DB) (*MCPServerConfig, error)
- func (c *MCPServerConfig) List(params *dao.Params, queryFuncs ...func(*gorm.DB) *gorm.DB) ([]*MCPServerConfig, int64, error)
- func (c *MCPServerConfig) Save(params *dao.Params, queryFuncs ...func(*gorm.DB) *gorm.DB) error
- type MCPTool
- func (c *MCPTool) BatchSave(params *dao.Params, tools []*MCPTool, queryFuncs ...func(*gorm.DB) *gorm.DB) error
- func (c *MCPTool) Delete(params *dao.Params, ids string, queryFuncs ...func(*gorm.DB) *gorm.DB) error
- func (c *MCPTool) GetOne(params *dao.Params, queryFuncs ...func(*gorm.DB) *gorm.DB) (*MCPTool, error)
- func (c *MCPTool) List(params *dao.Params, queryFuncs ...func(*gorm.DB) *gorm.DB) ([]*MCPTool, int64, error)
- func (c *MCPTool) Save(params *dao.Params, queryFuncs ...func(*gorm.DB) *gorm.DB) error
- type MCPToolCallResult
- type MCPToolLog
- func (c *MCPToolLog) Delete(params *dao.Params, ids string, queryFuncs ...func(*gorm.DB) *gorm.DB) error
- func (c *MCPToolLog) GetOne(params *dao.Params, queryFuncs ...func(*gorm.DB) *gorm.DB) (*MCPToolLog, error)
- func (c *MCPToolLog) List(params *dao.Params, queryFuncs ...func(*gorm.DB) *gorm.DB) ([]*MCPToolLog, int64, error)
- func (c *MCPToolLog) Save(params *dao.Params, queryFuncs ...func(*gorm.DB) *gorm.DB) error
- type McpKey
- func (c *McpKey) Delete(params *dao.Params, ids string, queryFuncs ...func(*gorm.DB) *gorm.DB) error
- func (c *McpKey) GetOne(params *dao.Params, queryFuncs ...func(*gorm.DB) *gorm.DB) (*McpKey, error)
- func (c *McpKey) List(params *dao.Params, queryFuncs ...func(*gorm.DB) *gorm.DB) ([]*McpKey, int64, error)
- func (c *McpKey) Save(params *dao.Params, queryFuncs ...func(*gorm.DB) *gorm.DB) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MCPServerConfig ¶
type MCPServerConfig struct {
ID uint `gorm:"primaryKey;autoIncrement" json:"id,omitempty"`
URL string `gorm:"not null" json:"url,omitempty"`
Name string `gorm:"uniqueIndex;not null;type:varchar(255)" json:"name,omitempty"`
Enabled bool `gorm:"default:false" json:"enabled,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty" gorm:"<-:create"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
}
func (*MCPServerConfig) GetOne ¶
func (c *MCPServerConfig) GetOne(params *dao.Params, queryFuncs ...func(*gorm.DB) *gorm.DB) (*MCPServerConfig, error)
type MCPTool ¶
type MCPTool struct {
ID uint `gorm:"primaryKey;autoIncrement" json:"id,omitempty"`
ServerName string `json:"server_name,omitempty"`
Name string `gorm:"uniqueIndex;not null;type:varchar(255)" json:"name,omitempty"`
Description string `gorm:"type:text" json:"description,omitempty"`
InputSchema string `gorm:"type:text" json:"input_schema,omitempty"`
Enabled bool `gorm:"default:true" json:"enabled,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty" gorm:"<-:create"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
}
type MCPToolCallResult ¶
type MCPToolCallResult struct {
ToolName string `json:"tool_name"`
Parameters any `json:"parameters"`
Result string `json:"result"`
Error string `json:"error,omitempty"`
}
MCPToolCallResult 存储工具调用的结果
type MCPToolLog ¶
type MCPToolLog struct {
ID uint `gorm:"primaryKey;autoIncrement" json:"id,omitempty"`
ToolName string `gorm:"index" json:"tool_name,omitempty"`
ServerName string `gorm:"index" json:"server_name,omitempty"`
Parameters string `gorm:"type:text" json:"parameters,omitempty"`
Prompt string `gorm:"type:text" json:"prompt,omitempty"`
Result string `gorm:"type:text" json:"result,omitempty"`
Error string `gorm:"type:text" json:"error,omitempty"`
ExecuteTime int64 `json:"execute_time,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty" gorm:"<-:create"`
CreatedBy string `gorm:"index" json:"created_by,omitempty"`
}
func (*MCPToolLog) GetOne ¶
func (c *MCPToolLog) GetOne(params *dao.Params, queryFuncs ...func(*gorm.DB) *gorm.DB) (*MCPToolLog, error)
type McpKey ¶
type McpKey struct {
ID uint `gorm:"primaryKey;autoIncrement" json:"id,omitempty"`
Username string `gorm:"index;not null" json:"username,omitempty"`
McpKey string `gorm:"type:text" json:"mcp_key,omitempty"`
Description string `json:"description,omitempty"`
Enabled bool `gorm:"default:true" json:"enabled,omitempty"`
Jwt string `gorm:"type:text" json:"jwt"`
LastUsedAt time.Time `json:"last_used_at,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty" gorm:"<-:create"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.