schema

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: GPL-3.0 Imports: 12 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func ExtractConfig added in v1.2.0

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

func GetNameAndRequiredFlag added in v1.2.1

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

func ResolveDefaultConfigPath added in v1.2.1

func ResolveDefaultConfigPath(path string) string

func SetProperties added in v1.2.1

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 added in v1.6.0

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