Documentation
¶
Index ¶
- Variables
- type Attribute
- type AttributeGroup
- type AttributeGroups
- type AttributeList
- type AttributeModel
- type CreateAttributeGroup
- type CreateAttributeReq
- type CustomAttributeFieldColumnsReq
- type DeleteAttributeGroupReq
- type DeleteAttributeReq
- type Handler
- func (h *Handler) CreateAttribute(ctx *gin.Context, req CreateAttributeReq) (ginx.Result, error)
- func (h *Handler) CreateAttributeGroup(ctx *gin.Context, req CreateAttributeGroup) (ginx.Result, error)
- func (h *Handler) CustomAttributeFieldColumns(ctx *gin.Context, req CustomAttributeFieldColumnsReq) (ginx.Result, error)
- func (h *Handler) DeleteAttribute(ctx *gin.Context, req DeleteAttributeReq) (ginx.Result, error)
- func (h *Handler) DeleteAttributeGroup(ctx *gin.Context, req DeleteAttributeGroupReq) (ginx.Result, error)
- func (h *Handler) ListAttributeField(ctx *gin.Context, req ListAttributeReq) (ginx.Result, error)
- func (h *Handler) ListAttributeGroup(ctx *gin.Context, req ListAttributeGroupReq) (ginx.Result, error)
- func (h *Handler) ListAttributeGroupByIds(ctx *gin.Context, req ListAttributeGroupByIdsReq) (ginx.Result, error)
- func (h *Handler) ListAttributes(ctx *gin.Context, req ListAttributeReq) (ginx.Result, error)
- func (h *Handler) PrivateRoutes(server *gin.Engine)
- func (h *Handler) RenameAttributeGroup(ctx *gin.Context, req RenameAttributeGroupReq) (ginx.Result, error)
- func (h *Handler) Sort(ctx *gin.Context, req SortAttributeReq) (ginx.Result, error)
- func (h *Handler) SortAttributeGroup(ctx *gin.Context, req SortAttributeGroupReq) (ginx.Result, error)
- func (h *Handler) UpdateAttribute(ctx *gin.Context, req UpdateAttributeReq) (ginx.Result, error)
- type ListAttributeGroupByIdsReq
- type ListAttributeGroupReq
- type ListAttributeReq
- type RenameAttributeGroupReq
- type RetrieveAttributeFieldList
- type RetrieveAttributeFieldsList
- type RetrieveAttributeList
- type SortAttributeGroupReq
- type SortAttributeReq
- type UpdateAttributeReq
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrConcurrentUpdate = ginx.Result{
Code: 40901,
Msg: "数据已被其他用户修改,请刷新后重试",
}
)
Functions ¶
This section is empty.
Types ¶
type Attribute ¶
type Attribute struct {
ID int64 `json:"id"`
GroupId int64 `json:"group_id"`
ModelUid string `json:"model_uid"`
FieldUid string `json:"field_uid"`
FieldName string `json:"field_name"`
FieldType string `json:"field_type"`
Required bool `json:"required"`
Secure bool `json:"secure"`
Link bool `json:"link"`
Display bool `json:"display"`
Option interface{} `json:"option"`
Index int64 `json:"index"`
SortKey int64 `json:"sort_key"`
Builtin bool `json:"builtin"`
}
type AttributeGroup ¶
type AttributeGroups ¶
type AttributeList ¶
type AttributeModel ¶
type CreateAttributeGroup ¶
type CreateAttributeReq ¶
type CreateAttributeReq struct {
GroupId int64 `json:"group_id" binding:"required,gt=0"`
FieldUid string `json:"field_uid" binding:"required"`
ModelUid string `json:"model_uid" binding:"required"`
FieldName string `json:"field_name" binding:"required"`
FieldType string `json:"field_type" binding:"required"`
Secure bool `json:"secure"`
Required bool `json:"required"`
Link bool `json:"link"`
Option interface{} `json:"option"`
Index int64 `json:"index"`
SortKey int64 `json:"sort_key"`
}
type CustomAttributeFieldColumnsReq ¶
type CustomAttributeFieldColumnsReq struct {
ModelUid string `json:"model_uid"`
CustomFieldName []string `json:"custom_field_name"`
}
CustomAttributeFieldColumnsReq 排序并展示数据
type DeleteAttributeGroupReq ¶
type DeleteAttributeGroupReq struct {
ID int64 `json:"id"`
}
type DeleteAttributeReq ¶
type DeleteAttributeReq struct {
Id int64 `json:"id"`
}
type Handler ¶
type Handler struct {
capability.IRegistry
// contains filtered or unexported fields
}
func NewHandler ¶
func NewHandler(svc service.Service, modelSvc modelservice.Service) *Handler
func (*Handler) CreateAttribute ¶
func (*Handler) CreateAttributeGroup ¶
func (*Handler) CustomAttributeFieldColumns ¶
func (*Handler) DeleteAttribute ¶
func (*Handler) DeleteAttributeGroup ¶
func (*Handler) ListAttributeField ¶
func (*Handler) ListAttributeGroup ¶
func (*Handler) ListAttributeGroupByIds ¶
func (*Handler) ListAttributes ¶
func (*Handler) PrivateRoutes ¶
PrivateRoutes 注册属性管理模块需要中心化登录及权限判定(由 EIAM SDK 统一拦截承载)的私有路由
func (*Handler) RenameAttributeGroup ¶
func (*Handler) SortAttributeGroup ¶
func (h *Handler) SortAttributeGroup(ctx *gin.Context, req SortAttributeGroupReq) (ginx.Result, error)
SortAttributeGroup 属性组拖拽排序
func (*Handler) UpdateAttribute ¶
type ListAttributeGroupByIdsReq ¶
type ListAttributeGroupByIdsReq struct {
Ids []int64 `json:"ids"`
}
type ListAttributeGroupReq ¶
type ListAttributeGroupReq struct {
ModelUid string `json:"model_uid"`
}
type ListAttributeReq ¶
type ListAttributeReq struct {
ModelUid string `json:"model_uid"`
}
type RenameAttributeGroupReq ¶
type RetrieveAttributeFieldsList ¶
type RetrieveAttributeFieldsList struct {
}
type RetrieveAttributeList ¶
type RetrieveAttributeList struct {
Model AttributeModel `json:"model"`
Groups []AttributeGroup `json:"groups"`
Fields []Attribute `json:"fields"`
}
type SortAttributeGroupReq ¶
type SortAttributeGroupReq struct {
ID int64 `json:"id"` // 被拖拽的属性组 ID
TargetPosition int64 `json:"target_position"` // 目标位置 (0-based,前端列表顺序)
}
SortAttributeGroupReq 属性组拖拽排序请求
type SortAttributeReq ¶
type SortAttributeReq struct {
ID int64 `json:"id"` // 被拖拽的属性 ID
TargetGroupID int64 `json:"target_group_id"` // 目标分组 ID
TargetPosition int64 `json:"target_position"` // 目标位置 (0-based,前端列表顺序)
}
SortAttributeReq 拖拽排序请求
type UpdateAttributeReq ¶
type UpdateAttributeReq struct {
Id int64 `json:"id"`
FieldName string `json:"field_name"`
FieldType string `json:"field_type"`
Secure bool `json:"secure"`
Required bool `json:"required"`
Link bool `json:"link"`
Option interface{} `json:"option"`
Index int64 `json:"index"`
SortKey int64 `json:"sort_key"`
}
Click to show internal directories.
Click to hide internal directories.