Help us shape the future of Go! Take the 2026 Go Developer Survey

securexml

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package securexml 约束密码元数据 XML 的大小、结构与包内路径。

Index

Constants

View Source
const Namespace = spec.Namespace

Variables

View Source
var ErrLimitExceeded = errors.New("securexml: XML 超过处理预算")

Functions

func Decode

func Decode(ctx context.Context, data []byte, root string, target any) error

Decode 在反序列化前检查完整 XML,拒绝歧义单值、DTD、命名空间和预算绕过。

func DecodeWithLimits

func DecodeWithLimits(ctx context.Context, data []byte, root string, target any, maximumNodes, maximumDepth int) error

DecodeWithLimits 可收紧硬上限,零值仍使用有限默认值。

func Resolve

func Resolve(from, value string) (string, error)

Resolve 以引用文件目录为基准,解析可含 .. 的 ST_Loc,禁止越过包根。

func ValidID

func ValidID(value string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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