domain

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Class

type Class struct {
	Source
	// Schema from which the Class is parsed
	Schema *jsonschema.Schema

	// Name of the Class
	Name string

	// Docstring of the Class
	Docstring string

	// Properties of the Class
	Properties []*Property
}

Class representation of parsed source files

type FileSource

type FileSource struct {
	FilePath string
}

FileSource is a simple Source representation where it's a single file source

func (FileSource) Path

func (f FileSource) Path() string

Path of the Source

type Property

type Property struct {
	// Schema from which the property is parsed
	Schema *jsonschema.Schema

	// Parent Class the Property belongs to
	Parent *Class

	// Name of the Property
	Name string

	// Type of the Property
	Type string

	// Docstring of the Property
	Docstring string
}

Property of a Class

type Relation

type Relation struct {
	// Type of relation (free format)
	Type string

	// FromProperty can optionally be set if the Relation originates from a Property
	FromProperty *Property

	// From part of the Relation
	From *Class

	// ToProperty can optionally be set if the Relation points towards a Property (e.g. with an $anchor #)
	ToProperty *Property

	// To receiving end of the Relation
	To *Class
}

Relation which can exist between Class (and optionally further specified into Property)

type Source

type Source interface {
	Path() string
}

Source returns information about the path where the data was parsed from

Jump to

Keyboard shortcuts

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