Documentation
¶
Index ¶
- type AIModelInstallation
- type AgentStrategyInstallation
- type Endpoint
- type InstallTask
- type InstallTaskPluginStatus
- type InstallTaskStatus
- type Model
- type Plugin
- type PluginDeclaration
- type PluginInstallation
- type PluginInstallationStatus
- type ServerlessRuntime
- type ServerlessRuntimeType
- type TenantStorage
- type ToolInstallation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AIModelInstallation ¶
type AIModelInstallation struct {
Model
Provider string `json:"provider" gorm:"column:provider;size:127;index;not null"`
TenantID string `json:"tenant_id" gorm:"column:tenant_id;type:uuid;index;not null"`
PluginUniqueIdentifier string `json:"plugin_unique_identifier" gorm:"index;size:255"`
PluginID string `json:"plugin_id" gorm:"index;size:255"`
}
type AgentStrategyInstallation ¶
type AgentStrategyInstallation struct {
Model
TenantID string `json:"tenant_id" gorm:"column:tenant_id;type:uuid;index;not null"`
Provider string `json:"provider" gorm:"column:provider;size:127;index;not null"`
PluginUniqueIdentifier string `json:"plugin_unique_identifier" gorm:"index;size:255"`
PluginID string `json:"plugin_id" gorm:"index;size:255"`
}
type Endpoint ¶
type Endpoint struct {
Model
Name string `json:"name" gorm:"size:127;column:name;default:'default'"`
HookID string `json:"hook_id" gorm:"unique;size:127;column:hook_id"`
TenantID string `json:"tenant_id" gorm:"index;size:64;column:tenant_id"`
UserID string `json:"user_id" gorm:"index;size:64;column:user_id"`
PluginID string `json:"plugin_id" gorm:"index;size:64;column:plugin_id"`
ExpiredAt time.Time `json:"expired_at" gorm:"column:expired_at"`
Enabled bool `json:"enabled" gorm:"column:enabled"`
Settings map[string]any `json:"settings" gorm:"column:settings;serializer:json"`
Declaration *plugin_entities.EndpointProviderDeclaration `json:"declaration" gorm:"-"` // not stored in db
}
HookID is a pointer to plugin id and tenant id, using it to identify the endpoint plugin
type InstallTask ¶
type InstallTask struct {
Model
Status InstallTaskStatus `json:"status" gorm:"not null"`
TenantID string `json:"tenant_id" gorm:"type:uuid;not null"`
TotalPlugins int `json:"total_plugins" gorm:"not null"`
CompletedPlugins int `json:"completed_plugins" gorm:"not null"`
Plugins []InstallTaskPluginStatus `json:"plugins" gorm:"serializer:json"`
}
type InstallTaskPluginStatus ¶
type InstallTaskPluginStatus struct {
PluginUniqueIdentifier plugin_entities.PluginUniqueIdentifier `json:"plugin_unique_identifier"`
Labels plugin_entities.I18nObject `json:"labels"`
Icon string `json:"icon"`
PluginID string `json:"plugin_id"`
Status InstallTaskStatus `json:"status"`
Message string `json:"message"`
}
type InstallTaskStatus ¶
type InstallTaskStatus string
const ( InstallTaskStatusPending InstallTaskStatus = "pending" InstallTaskStatusRunning InstallTaskStatus = "running" InstallTaskStatusSuccess InstallTaskStatus = "success" InstallTaskStatusFailed InstallTaskStatus = "failed" )
type Plugin ¶
type Plugin struct {
Model
// PluginUniqueIdentifier is a unique identifier for the plugin, it contains version and checksum
PluginUniqueIdentifier string `json:"plugin_unique_identifier" gorm:"index;size:255"`
// PluginID is the id of the plugin, only plugin name is considered
PluginID string `json:"id" gorm:"index;size:255"`
Refers int `json:"refers" gorm:"default:0"`
InstallType plugin_entities.PluginRuntimeType `json:"install_type" gorm:"size:127;index"`
ManifestType manifest_entities.DifyManifestType `json:"manifest_type" gorm:"size:127"`
RemoteDeclaration plugin_entities.PluginDeclaration `json:"remote_declaration" gorm:"serializer:json;type:text;size:65535"` // enabled when plugin is remote
}
type PluginDeclaration ¶
type PluginDeclaration struct {
Model
PluginUniqueIdentifier string `json:"plugin_unique_identifier" gorm:"size:255;unique"`
PluginID string `json:"plugin_id" gorm:"size:255;index"`
Declaration plugin_entities.PluginDeclaration `json:"declaration" gorm:"serializer:json;type:text;size:65535"`
}
type PluginInstallation ¶
type PluginInstallation struct {
Model
TenantID string `json:"tenant_id" gorm:"index;type:uuid;"`
PluginID string `json:"plugin_id" gorm:"index;size:255"`
PluginUniqueIdentifier string `json:"plugin_unique_identifier" gorm:"index;size:255"`
RuntimeType string `json:"runtime_type" gorm:"size:127"`
EndpointsSetups int `json:"endpoints_setups"`
EndpointsActive int `json:"endpoints_active"`
Source string `json:"source" gorm:"column:source;size:63"`
Meta map[string]any `json:"meta" gorm:"column:meta;serializer:json"`
}
type PluginInstallationStatus ¶
type PluginInstallationStatus string
type ServerlessRuntime ¶
type ServerlessRuntime struct {
Model
PluginUniqueIdentifier string `json:"plugin_unique_identifier" gorm:"size:255;unique"`
FunctionURL string `json:"function_url" gorm:"size:255"`
FunctionName string `json:"function_name" gorm:"size:127"`
Type ServerlessRuntimeType `json:"type" gorm:"size:127"`
Checksum string `json:"checksum" gorm:"size:127;index"`
}
type ServerlessRuntimeType ¶
type ServerlessRuntimeType string
const (
SERVERLESS_RUNTIME_TYPE_SERVERLESS ServerlessRuntimeType = "serverless"
)
type TenantStorage ¶
type ToolInstallation ¶
type ToolInstallation struct {
Model
TenantID string `json:"tenant_id" gorm:"column:tenant_id;type:uuid;index;not null"`
Provider string `json:"provider" gorm:"column:provider;size:127;index;not null"`
PluginUniqueIdentifier string `json:"plugin_unique_identifier" gorm:"index;size:255"`
PluginID string `json:"plugin_id" gorm:"index;size:255"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.