jsonschema

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanCommentDirectory

func CleanCommentDirectory() error

CleanCommentDirectory will remove the main temporary directory used by updatecli.

func CloneCommentDirectory

func CloneCommentDirectory() error

CloneCommentDirectory clones the updatecli git repository in a temporary location so we can parse comments

func GenerateJsonSchema

func GenerateJsonSchema(resourceConfigSchema interface{}, anyOf map[string]interface{}) *jschema.Schema

func GetPackageComments

func GetPackageComments(rootPackagePath string) (map[string]string, error)

GetPackageComments retrieves all updatecli code comments

Types

type Schema

type Schema struct {
	SchemaDir    string
	BaseSchemaID string
	JsonSchema   jschema.Schema
}

func New

func New(baseSchemaID, schemaDirectory string) *Schema

func (*Schema) GenerateSchema

func (s *Schema) GenerateSchema(object interface{}) error

GenerateSchema generates updatecli json schema based the config struct

func (*Schema) Save

func (s *Schema) Save() error

Save export a jsonschema to a local file

func (*Schema) String

func (s *Schema) String() string

String implements the string interface

Jump to

Keyboard shortcuts

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