service

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExportParams

type ExportParams struct {
	ModelUID     string
	Scope        string // "all", "current", "selected"
	ResourceIDs  []int64
	FilterGroups []domain.FilterGroup
	Fields       []string
	FileName     string
}

type IDataIOService

type IDataIOService interface {
	// Import 批量导入资源实例 (Resource)
	// modelUID: 模型唯一标识 (对应 Model.UID)
	// fileData: Excel 文件的字节数据
	Import(ctx context.Context, modelUID string, fileData []byte) (importedCount int, err error)

	// Export 导出资源实例数据 (Resource)
	// req: 导出请求参数
	Export(ctx context.Context, req ExportParams) ([]byte, error)

	// ExportTemplate 导出模板
	// modelUID: 模型唯一标识 (对应 Model.UID)
	ExportTemplate(ctx context.Context, modelUID string) ([]byte, error)
}

IDataIOService 数据交换服务接口 NOTE: 提供基于 Model-Attribute-Resource 架构的数据导入导出功能,支持 Excel 格式

func NewService

func NewService(
	attrSvc attribute.Service,
	resSvc resource.EncryptedSvc,
	modelSvc model.Service,

) IDataIOService

NewService 创建数据交换服务实例

Jump to

Keyboard shortcuts

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