pkg

package
v1.0.51 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 6 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

func Diff

func Diff(cur, old []string) []string

Diff 计算两个数组中的key变更元素

func ValidOrder added in v1.0.50

func ValidOrder(v string) bool

ValidOrder 校验排序方向是否合法(白名单校验,纵深防御;正常入口已由 proto validate 拦截)

func ValidOrderBy added in v1.0.50

func ValidOrderBy(v string) bool

ValidOrderBy 校验排序列是否合法(与 proto validate 的 in 规则保持一致)

Types

type TemplateParser added in v1.0.45

type TemplateParser interface {
	// CheckTemplate 检查模板变量
	CheckTemplate(keys []string, template string) error

	// RenderTemplate 渲染模板
	RenderTemplate(bvs []*entity.BusinessValue, rvs []*entity.ResourceValue, format string, content string) (string, error)
}

func NewTemplateParser added in v1.0.45

func NewTemplateParser() TemplateParser

type TemplateValue added in v1.0.45

type TemplateValue struct {
	Value   string
	Exclude bool
}

Jump to

Keyboard shortcuts

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