|
@@ -8,13 +8,13 @@ import (
|
|
|
type Plugin struct {
|
|
|
Model
|
|
|
// PluginUniqueIdentifier is a unique identifier for the plugin, it contains version and checksum
|
|
|
- PluginUniqueIdentifier string `json:"plugin_unique_identifier" orm:"index;size:127"`
|
|
|
+ PluginUniqueIdentifier string `json:"plugin_unique_identifier" gorm:"index;size:127"`
|
|
|
// PluginID is the id of the plugin, only plugin name is considered
|
|
|
- PluginID string `json:"id" orm:"index;size:127"`
|
|
|
- Refers int `json:"refers" orm:"default:0"`
|
|
|
- InstallType plugin_entities.PluginRuntimeType `json:"install_type" orm:"size:127;index"`
|
|
|
- ManifestType plugin_entities.DifyManifestType `json:"manifest_type" orm:"size:127"`
|
|
|
- Declaration string `json:"declaration" orm:"type:text;size:65535"`
|
|
|
+ PluginID string `json:"id" gorm:"index;size:127"`
|
|
|
+ Refers int `json:"refers" gorm:"default:0"`
|
|
|
+ InstallType plugin_entities.PluginRuntimeType `json:"install_type" gorm:"size:127;index"`
|
|
|
+ ManifestType plugin_entities.DifyManifestType `json:"manifest_type" gorm:"size:127"`
|
|
|
+ Declaration string `json:"declaration" gorm:"type:text;size:65535"`
|
|
|
}
|
|
|
|
|
|
func (p *Plugin) GetDeclaration() (*plugin_entities.PluginDeclaration, error) {
|
|
@@ -34,12 +34,12 @@ const (
|
|
|
|
|
|
type ServerlessRuntime struct {
|
|
|
Model
|
|
|
- PluginUniqueIdentifier string `json:"plugin_unique_identifier" orm:"index;size:127"`
|
|
|
- FunctionURL string `json:"function_url" orm:"size:255"`
|
|
|
- FunctionName string `json:"function_name" orm:"size:127"`
|
|
|
- Type ServerlessRuntimeType `json:"type" orm:"size:127"`
|
|
|
- Declaration string `json:"declaration" orm:"type:text;size:65535"`
|
|
|
- Checksum string `json:"checksum" orm:"size:127"`
|
|
|
+ PluginUniqueIdentifier string `json:"plugin_unique_identifier" gorm:"size:127;unique"`
|
|
|
+ FunctionURL string `json:"function_url" gorm:"size:255"`
|
|
|
+ FunctionName string `json:"function_name" gorm:"size:127"`
|
|
|
+ Type ServerlessRuntimeType `json:"type" gorm:"size:127"`
|
|
|
+ Declaration string `json:"declaration" gorm:"type:text;size:65535"`
|
|
|
+ Checksum string `json:"checksum" gorm:"size:127;index"`
|
|
|
}
|
|
|
|
|
|
func (p *ServerlessRuntime) GetDeclaration() (*plugin_entities.PluginDeclaration, error) {
|