service

package
v1.11.3 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: MIT Imports: 11 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 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