indexschema

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: MIT Imports: 9 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

Overview

Package indexschema 校验插件仓库 index.json 的结构契约。

这里实现 JSON Schema 中索引实际用到的子集:type/required/properties/ additionalProperties/items/enum/const/pattern/min*/max*/uniqueItems/$ref/ format(date-time)。校验器不依赖第三方包,发布流程与单元测试共用同一份 schema。

Index

Constants

This section is empty.

Variables

View Source
var SchemaJSON []byte

Functions

func Validate

func Validate(document []byte) error

Validate 使用内置 schema 校验索引文档。

func ValidateWithSchema

func ValidateWithSchema(schemaJSON, document []byte) error

ValidateWithSchema 使用指定 schema 校验文档,便于测试与第三方工具复用。

Types

This section is empty.

Jump to

Keyboard shortcuts

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