plugin

package
v1.11.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service interface {
	// ImportDefinition 导入外部插件定义。
	ImportDefinition(ctx context.Context, def pluginx.Definition) error

	// GetDefaultDefinition 返回插件默认定义草稿,供前端创建内置默认绑定时使用。
	GetDefaultDefinition(ctx context.Context, pluginID string) (pluginx.Definition, error)

	// SaveBindings 保存某个插件的绑定图;若绑定模型命中内置默认定义,则自动导入对应 Schema。
	SaveBindings(ctx context.Context, req domain.SavePluginBindings) error

	// ToggleBindingStatus 切换单个绑定的启停状态,并返回切换后的状态。
	ToggleBindingStatus(ctx context.Context, uid string) (bool, error)

	// DeleteBinding 删除单个插件绑定。
	DeleteBinding(ctx context.Context, uid string) error

	// ListPlugins 查询插件目录。
	ListPlugins(ctx context.Context) ([]domain.PluginListItem, error)

	// GetPluginDetail 查询插件详情。
	GetPluginDetail(ctx context.Context, uid string) (domain.PluginDetail, error)

	// ListEnums 查询插件管理所需枚举。
	ListEnums(ctx context.Context) (domain.PluginManagementEnums, error)

	// ListResourceActionsBatch 批量查询多个资源可以使用的插件动作。
	ListResourceActionsBatch(ctx context.Context, resourceIDs []int64) ([]pluginx.ResourceActions, error)

	// ResolveAction 解析插件动作需要的 UI 和输入数据。
	ResolveAction(ctx context.Context, req pluginx.ResolveRequest) (pluginx.ResolveResult, error)

	// ResolveActionContext 解析插件动作运行时上下文,供内置后端能力直接复用。
	ResolveActionContext(ctx context.Context, req pluginx.ResolveRequest) (pluginx.ActionContext, error)
}

func NewService

func NewService(
	repo repository.PluginRepository,
	resourceSvc resource.Service,
	relationSvc relation.RelationResourceService,
	modelSvc model.Service,
	modelGroupSvc model.MGService,
	attributeSvc attribute.Service,
	relationTypeSvc relation.RelationTypeService,
	relationModelSvc relation.RelationModelService,
) Service

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL