cmd

package
v1.0.0-beta8 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: Apache-2.0 Imports: 24 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute() error

Execute executes the root command.

func LoadSchemaFromFileOrRepo

func LoadSchemaFromFileOrRepo(compiledSchema, repoDir, schemaName string, interner ls.Interner) (*ls.Layer, error)

func OutputIngestedGraph

func OutputIngestedGraph(outFormat string, target graph.Graph, wr io.Writer, includeSchema bool) error

Types

type Attribute

type Attribute struct {
	ID            string `json:"@id"`
	AttributeName string `json:"attributeName"`
	Types         string `json:"@type"`
}

Following structs are used to define a Layered Schema

type LS

type LS struct {
	Context string `json:"@context"`
	ID      string `json:"@id"`
	Type    string `json:"@type"`
	Layer   Layer  `json:"layer"`
}

type Layer

type Layer struct {
	AttributeList []Attribute `json:"attributeList"`
}

type SliceByTermsSpec

type SliceByTermsSpec struct {
	Type  string   `json:"type"`
	Terms []string `json:"terms"`
	ID    string   `json:"@id"`
	File  string   `json:"file"`
}

func (SliceByTermsSpec) Slice

func (spec SliceByTermsSpec) Slice(sourceLayer *ls.Layer, targetType string, templateData interface{}) (*ls.Layer, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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