generator

package
v0.0.0-...-3ffbcef Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectRelations

func CollectRelations(relationships map[string][]*Relation) ([]string, error)

func Generate

func Generate(metadataDir string, outputFile string, includeProperties bool) error

Types

type Entity

type Entity struct {
	Name        string
	Description string
	Fields      []Field
	Relations   []Relation
}

func ParseMetadata

func ParseMetadata(filePath string) Entity

type Field

type Field struct {
	Id          string
	Name        string
	Type        string
	Mandatory   bool
	Description string
}

type Relation

type Relation struct {
	Type   string
	Id     string
	Name   string
	Target Target

	FromTable string // Used to track which table the relation was found in
	// contains filtered or unexported fields
}

type Target

type Target struct {
	Table  string
	Fields map[string]interface{}
}

Jump to

Keyboard shortcuts

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