schema

package
v0.0.0-...-8049e74 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ObjectBase

type ObjectBase struct {
	// contains filtered or unexported fields
}

func (*ObjectBase) AllParents

func (this *ObjectBase) AllParents() []ObjectInterface

Get all the parents all the way up to the root object, immediate parent first in the array, then its parent, and so on.

func (*ObjectBase) AllParentsByTypeName

func (this *ObjectBase) AllParentsByTypeName(typeName ObjectTypeName) []ObjectInterface

Get all the parents filtered by type name, all the way up to the root

func (*ObjectBase) Children

func (this *ObjectBase) Children() []ObjectInterface

Get all the immediate child schema objects, regardless of their types.

func (*ObjectBase) ChildrenByTypeName

func (this *ObjectBase) ChildrenByTypeName(typeName ObjectTypeName) []ObjectInterface

Get all the immediate child schema objects, filtered by their type name.

func (*ObjectBase) NearestParentByTypeName

func (this *ObjectBase) NearestParentByTypeName(typeName ObjectTypeName) ObjectInterface

Get the nearest parent that matches the supplied type name

func (*ObjectBase) ObjectTypeName

func (this *ObjectBase) ObjectTypeName() ObjectTypeName

func (*ObjectBase) Parent

func (this *ObjectBase) Parent() ObjectInterface

Get the immediate parent schema object.

func (*ObjectBase) Root

func (this *ObjectBase) Root() ObjectInterface

Get the root schema object.

func (*ObjectBase) SetChildren

func (this *ObjectBase) SetChildren(children []ObjectInterface)

func (*ObjectBase) SetParent

func (this *ObjectBase) SetParent(parent ObjectInterface)

type ObjectInterface

type ObjectInterface interface {
	// The type name of this object - corresponds to the OpenAPI Spec ObjectInterface
	// name, e.g. "Schema" or "Parameter"
	ObjectTypeName() ObjectTypeName

	// Get all the immediate child schema objects, regardless of their types.
	Children() []ObjectInterface

	// Get all the immediate child schema objects, filtered by their type name.
	ChildrenByTypeName(ObjectTypeName) []ObjectInterface

	// Get the root schema object.
	Root() ObjectInterface

	// Get the immediate parent schema object.
	Parent() ObjectInterface

	// Get all the parents all the way up to the root object, immediate
	// parent first in the array, then its parent, and so on.
	AllParents() []ObjectInterface

	// Get all the parents filtered by type name, all the way up to the root
	AllParentsByTypeName(ObjectTypeName) []ObjectInterface

	// Get the nearest parent that matches the supplied type name
	NearestParentByTypeName(ObjectTypeName) ObjectInterface
}

type ObjectTypeName

type ObjectTypeName string

Used to uniquely identify schema object types - corresponds to the OpenAPI Spec ObjectInterface name, e.g. "Schema" or "Parameter"

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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