schema

package
v2.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CustomGenerators = &customSchema{
	mapSchema: make(map[string]generator),
}

Functions

func ExtractConfig

func ExtractConfig(path string) (map[string]interface{}, error)

func GetNameAndRequiredFlag

func GetNameAndRequiredFlag(field reflect.StructField) (string, bool)

func ResolveDefaultConfigPath

func ResolveDefaultConfigPath(path string) string

func SetProperties

func SetProperties(field reflect.StructField, t *jsonschema.Type)

Types

type ConfigSchema

type ConfigSchema struct {
	Version       string                 `json:"version"`
	Schema        Schema                 `json:"schema"`
	DefaultConfig map[string]interface{} `json:"config"`
}

type Schema

type Schema *jsonschema.Schema

func DereferenceSchema

func DereferenceSchema(s Schema) Schema

func GenerateConfigSchema

func GenerateConfigSchema(cfgPtr interface{}) Schema

Jump to

Keyboard shortcuts

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