web

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateTemplateGroupReq

type CreateTemplateGroupReq struct {
	Name string `json:"name"`
	Icon string `json:"icon"`
}

type CreateTemplateReq

type CreateTemplateReq struct {
	Name       string `json:"name"`
	WorkflowId int64  `json:"workflow_id"`
	GroupId    int64  `json:"group_id"`
	Icon       string `json:"icon"`
	Rules      string `json:"rules"`
	Options    string `json:"options"`
	Desc       string `json:"desc"`
}

type CreateType

type CreateType uint8

type DeleteTemplateReq

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

type DetailTemplateReq

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

type GroupHandler

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

func NewGroupHandler

func NewGroupHandler(svc service.GroupService) *GroupHandler

func (*GroupHandler) CreateTemplateGroup

func (h *GroupHandler) CreateTemplateGroup(ctx *gin.Context, req CreateTemplateGroupReq) (ginx.Result, error)

func (*GroupHandler) ListTemplateGroup

func (h *GroupHandler) ListTemplateGroup(ctx *gin.Context, req Page) (ginx.Result, error)

func (*GroupHandler) PrivateRoutes added in v1.3.0

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

type Handler

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

func NewHandler

func NewHandler(svc service.Service, groupSvc service.GroupService) *Handler

func (*Handler) CreateTemplate

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

func (*Handler) DeleteTemplate

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

func (*Handler) DetailTemplate

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

func (*Handler) ListTemplate

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

func (*Handler) Pipeline

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

func (*Handler) PrivateRoutes added in v1.3.0

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

func (*Handler) UpdateTemplate

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

type ListTemplateReq

type ListTemplateReq struct {
	Page
}

type Page

type Page struct {
	Offset int64 `json:"offset,omitempty"`
	Limit  int64 `json:"limit,omitempty"`
}

type RetrieveTemplateCombination

type RetrieveTemplateCombination struct {
	TemplateCombinations []TemplateCombination `json:"template_combinations"`
}

type RetrieveTemplateGroup

type RetrieveTemplateGroup struct {
	TemplateGroups []TemplateGroup `json:"template_groups"`
	Total          int64           `json:"total"`
}

type RetrieveTemplates

type RetrieveTemplates struct {
	Total     int64      `json:"total"`
	Templates []Template `json:"templates"`
}

type Template

type Template struct {
	Id         int64                    `json:"id"`
	Name       string                   `json:"name"`
	WorkflowId int64                    `json:"workflow_id"`
	Icon       string                   `json:"icon"`
	GroupId    int64                    `json:"group_id"`
	CreateType CreateType               `json:"create_type"`
	Rules      []map[string]interface{} `json:"rules"`
	Options    map[string]interface{}   `json:"options"`
	Desc       string                   `json:"desc"`
}

type TemplateCombination

type TemplateCombination struct {
	Id        int64      `json:"id"`
	Name      string     `json:"name"`
	Icon      string     `json:"icon"`
	Total     int64      `json:"total"`
	Templates []Template `json:"templates"`
}

TemplateCombination 一组数据

type TemplateGroup

type TemplateGroup struct {
	Id   int64  `json:"id"`
	Name string `json:"name"`
	Icon string `json:"icon"`
}

type UpdateTemplateReq

type UpdateTemplateReq struct {
	Id         int64  `json:"id"`
	GroupId    int64  `json:"group_id"`
	Icon       string `json:"icon"`
	WorkflowId int64  `json:"workflow_id"`
	Name       string `json:"name"`
	Rules      string `json:"rules"`
	Options    string `json:"options"`
}

Jump to

Keyboard shortcuts

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