web

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: MIT Imports: 7 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 Attribute

type Attribute struct {
	ID        int64       `json:"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:"sort_key"`
	Builtin   bool        `json:"builtin"`
}

type AttributeGroup

type AttributeGroup struct {
	GroupName string `json:"group_name"`
	ModelUid  string `json:"model_uid"`
	GroupId   int64  `json:"group_id"`
	Index     int64  `json:"sort_key"`
}

type AttributeGroups

type AttributeGroups struct {
	GroupId    int64   `bson:"_id"`
	Total      int     `bson:"total"`
	Attributes []int64 `bson:"attributes"`
}

type AttributeList

type AttributeList struct {
	GroupId    int64       `json:"group_id"`
	GroupName  string      `json:"group_name"`
	Expanded   bool        `json:"expanded"`
	Index      int64       `json:"sort_key"`
	Total      int         `json:"total"`
	Attributes []Attribute `json:"attributes,omitempty"`
}

type CreateAttributeGroup

type CreateAttributeGroup struct {
	Name     string `json:"group_name"`
	ModelUid string `json:"model_uid"`
}

type CreateAttributeReq

type CreateAttributeReq struct {
	GroupId   int64       `json:"group_id"`
	FieldUid  string      `json:"field_uid"`
	ModelUid  string      `json:"model_uid"`
	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"`
}

type CustomAttributeFieldColumnsReq

type CustomAttributeFieldColumnsReq struct {
	ModelUid        string   `json:"model_uid"`
	CustomFieldName []string `json:"custom_field_name"`
}

CustomAttributeFieldColumnsReq 排序并展示数据

type DeleteAttributeGroupReq added in v1.10.0

type DeleteAttributeGroupReq struct {
	ID int64 `json:"id"`
}

type DeleteAttributeReq

type DeleteAttributeReq struct {
	Id int64 `json:"id"`
}

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(svc service.Service) *Handler

func (*Handler) CreateAttribute

func (h *Handler) CreateAttribute(ctx *gin.Context, req CreateAttributeReq) (ginx.Result, error)

func (*Handler) CreateAttributeGroup

func (h *Handler) CreateAttributeGroup(ctx *gin.Context, req CreateAttributeGroup) (ginx.Result, error)

func (*Handler) CustomAttributeFieldColumns

func (h *Handler) CustomAttributeFieldColumns(ctx *gin.Context, req CustomAttributeFieldColumnsReq) (ginx.Result, error)

func (*Handler) DeleteAttribute

func (h *Handler) DeleteAttribute(ctx *gin.Context, req DeleteAttributeReq) (ginx.Result, error)

func (*Handler) DeleteAttributeGroup added in v1.10.0

func (h *Handler) DeleteAttributeGroup(ctx *gin.Context, req DeleteAttributeGroupReq) (ginx.Result, error)

func (*Handler) ListAttributeField

func (h *Handler) ListAttributeField(ctx *gin.Context, req ListAttributeReq) (ginx.Result, error)

func (*Handler) ListAttributeGroup

func (h *Handler) ListAttributeGroup(ctx *gin.Context, req ListAttributeGroupReq) (ginx.Result, error)

func (*Handler) ListAttributeGroupByIds

func (h *Handler) ListAttributeGroupByIds(ctx *gin.Context, req ListAttributeGroupByIdsReq) (ginx.Result, error)

func (*Handler) ListAttributes

func (h *Handler) ListAttributes(ctx *gin.Context, req ListAttributeReq) (ginx.Result, error)

func (*Handler) PrivateRoutes added in v1.3.0

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

func (*Handler) RenameAttributeGroup added in v1.10.0

func (h *Handler) RenameAttributeGroup(ctx *gin.Context, req RenameAttributeGroupReq) (ginx.Result, error)

func (*Handler) Sort added in v1.10.0

func (h *Handler) Sort(ctx *gin.Context, req SortAttributeReq) (ginx.Result, error)

Sort 属性拖拽排序

func (*Handler) SortAttributeGroup added in v1.10.0

func (h *Handler) SortAttributeGroup(ctx *gin.Context, req SortAttributeGroupReq) (ginx.Result, error)

SortAttributeGroup 属性组拖拽排序

func (*Handler) UpdateAttribute added in v1.6.0

func (h *Handler) UpdateAttribute(ctx *gin.Context, req UpdateAttributeReq) (ginx.Result, error)

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 added in v1.10.0

type RenameAttributeGroupReq struct {
	ID   int64  `json:"id"`
	Name string `json:"name"`
}

type RetrieveAttributeFieldList

type RetrieveAttributeFieldList struct {
	Attributes []Attribute `json:"attribute_fields,omitempty"`
	Total      int64       `json:"total,omitempty"`
}

type RetrieveAttributeFieldsList

type RetrieveAttributeFieldsList struct {
}

type RetrieveAttributeList

type RetrieveAttributeList struct {
	AttributeList []AttributeList `json:"attribute_groups"`
}

type SortAttributeGroupReq added in v1.10.0

type SortAttributeGroupReq struct {
	ID             int64 `json:"id"`              // 被拖拽的属性组 ID
	TargetPosition int64 `json:"target_position"` // 目标位置 (0-based,前端列表顺序)
}

SortAttributeGroupReq 属性组拖拽排序请求

type SortAttributeReq added in v1.10.0

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 added in v1.6.0

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"`
}

Jump to

Keyboard shortcuts

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