web

package
v1.11.4 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2026 License: MIT Imports: 8 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 ExportFilterCondition

type ExportFilterCondition struct {
	FieldUID string      `json:"field_uid"`
	Operator string      `json:"operator"`
	Value    interface{} `json:"value"`
}

ExportFilterCondition 导出筛选条件

type ExportFilterGroup

type ExportFilterGroup struct {
	Filters []ExportFilterCondition `json:"filters"`
}

ExportFilterGroup 导出筛选条件组 (组内 AND)

type ExportReq

type ExportReq struct {
	ModelUID     string              `json:"model_uid" binding:"required"`
	Scope        ExportScope         `json:"scope" binding:"required"`
	ResourceIDs  []int64             `json:"resource_ids"`  // string or number
	FilterGroups []ExportFilterGroup `json:"filter_groups"` // scope='all' 或 'current' 时可选
	Fields       []string            `json:"fields"`        // 导出字段列表 (可选)
	FileName     string              `json:"file_name"`     // 文件名 (可选)
}

ExportReq 导出数据请求

type ExportScope

type ExportScope string

ExportScope 导出范围枚举

const (
	ExportScopeAll      ExportScope = "all"
	ExportScopeCurrent  ExportScope = "current"
	ExportScopeSelected ExportScope = "selected"
)

func (ExportScope) String

func (s ExportScope) String() string

type ExportTemplateReq

type ExportTemplateReq struct {
	ModelUID string `json:"model_uid" binding:"required"`
}

ExportTemplateReq 导出模板请求

type GenerateUploadURLReq

type GenerateUploadURLReq struct {
	FileName string `json:"file_name" binding:"required"`
}

GenerateUploadURLReq 生成上传 URL 请求

type Handler

type Handler struct {
	capability.IRegistry
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(svc service.IDataIOService, storage storage.IStorage) *Handler

func (*Handler) Export

func (h *Handler) Export(ctx *ginx.Context, req ExportReq) (ginx.Result, error)

Export 导出数据

func (*Handler) ExportTemplate

func (h *Handler) ExportTemplate(ctx *ginx.Context) (ginx.Result, error)

ExportTemplate 导出空白导入模板

func (*Handler) IdentifyRoutes added in v1.11.2

func (h *Handler) IdentifyRoutes(_ *gin.Engine)

func (*Handler) Import

func (h *Handler) Import(ctx *ginx.Context, req ImportReq) (ginx.Result, error)

Import 导入数据

func (*Handler) PrivateRoutes

func (h *Handler) PrivateRoutes(server *gin.Engine)

func (*Handler) PublicRoutes added in v1.11.2

func (h *Handler) PublicRoutes(_ *gin.Engine)

type ImportReq

type ImportReq struct {
	ModelUID string `json:"model_uid" binding:"required"` // 模型 UID
	FileKey  string `json:"file_key" binding:"required"`  // S3 文件 key
}

ImportReq 导入数据请求

type ImportV2Req

type ImportV2Req struct {
	ModelUID string `form:"model_uid" binding:"required"` // 模型 UID
}

ImportV2Req 导入数据请求 V2 (直接上传文件)

Jump to

Keyboard shortcuts

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