output

package
v0.0.0-...-29c7dbf Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatSize

func FormatSize(size int64) string

FormatSize formats a byte size as a human-readable string.

Types

type AnalysisResult

type AnalysisResult struct {
	Status  string      `json:"status"` // "success", "warning", "error"
	Message string      `json:"message"`
	Count   int         `json:"count,omitempty"`
	Details interface{} `json:"details,omitempty"`
}

AnalysisResult represents the result of an analysis command for JSON output

type Format

type Format string

Format represents the output format

const (
	FormatTable Format = "table"
	FormatJSON  Format = "json"
)

type PropertyValidationResult

type PropertyValidationResult struct {
	EntityID   string   `json:"entity_id"`
	EntityType string   `json:"entity_type"`
	Errors     []string `json:"errors"`
}

PropertyValidationResult represents validation errors for JSON output

type RelationPropertyValidationResult

type RelationPropertyValidationResult struct {
	RelationKey  string   `json:"relation_key"` // from--type--to
	RelationType string   `json:"relation_type"`
	Errors       []string `json:"errors"`
}

RelationPropertyValidationResult represents validation errors for a relation

type SchemaEntityDef

type SchemaEntityDef interface {
	GetLabel() string
	GetAliases() []string
	GetIDPatterns() []string
	GetProperties() interface{}
	GetRDFType() string
	GetColor() string
	GetBorderColor() string
}

SchemaEntityDef interface for entity definition output

type SchemaMetamodel

type SchemaMetamodel interface {
	GetVersion() string
	GetNamespace() string
	GetEntities() interface{}
	GetRelations() interface{}
	GetTypes() interface{}
}

SchemaMetamodel interface for metamodel schema output

type SchemaRelationDef

type SchemaRelationDef interface {
	GetLabel() string
	GetFrom() []string
	GetTo() []string
	GetDescription() string
	GetInverse() interface{}
	IsSymmetric() bool
	GetMinOutgoing() *int
	GetMaxOutgoing() *int
	GetMinIncoming() *int
	GetMaxIncoming() *int
}

SchemaRelationDef interface for relation definition output

type Writer

type Writer struct {
	Format  Format
	Out     io.Writer
	NoColor bool
}

Writer handles formatted output

func New

func New(format Format) *Writer

New creates a new output writer

func NewWithWriter

func NewWithWriter(w io.Writer, format Format) *Writer

NewWithWriter creates a new output writer with a custom writer

func (*Writer) WriteAnalysisResult

func (w *Writer) WriteAnalysisResult(result AnalysisResult) error

WriteAnalysisResult outputs an analysis result in the appropriate format

func (*Writer) WriteBar

func (w *Writer) WriteBar(value, maxValue int) string

WriteBar writes a small inline bar visualization

func (*Writer) WriteEntities

func (w *Writer) WriteEntities(entities []*entity.Entity) error

WriteEntities outputs a list of entities

func (*Writer) WriteEntitiesWithSummary

func (w *Writer) WriteEntitiesWithSummary(entities []*entity.Entity) error

WriteEntitiesWithSummary outputs a list of entities with a footer summary

func (*Writer) WriteEntity

func (w *Writer) WriteEntity(entity *entity.Entity, incoming, outgoing []*entity.Relation) error

WriteEntity outputs a single entity with details

func (*Writer) WriteError

func (w *Writer) WriteError(format string, args ...interface{})

WriteError outputs an error message

func (*Writer) WriteFooterSummary

func (w *Writer) WriteFooterSummary(text string)

WriteFooterSummary writes a subtle footer summary line

func (*Writer) WriteInfo

func (w *Writer) WriteInfo(format string, args ...interface{})

WriteInfo outputs an info message

func (*Writer) WriteMessage

func (w *Writer) WriteMessage(format string, args ...interface{})

WriteMessage outputs a simple message

func (*Writer) WritePath

func (w *Writer) WritePath(path []tracer.PathStep) error

WritePath outputs a path between nodes

func (*Writer) WriteRelations

func (w *Writer) WriteRelations(relations []*entity.Relation) error

WriteRelations outputs a list of relations

func (*Writer) WriteSchemaEntities

func (w *Writer) WriteSchemaEntities(m SchemaMetamodel) error

WriteSchemaEntities outputs entity types as JSON

func (*Writer) WriteSchemaEntityDetail

func (w *Writer) WriteSchemaEntityDetail(name string, def SchemaEntityDef, _ SchemaMetamodel) error

WriteSchemaEntityDetail outputs a single entity type as JSON

func (*Writer) WriteSchemaOverview

func (w *Writer) WriteSchemaOverview(m SchemaMetamodel) error

WriteSchemaOverview outputs the metamodel overview as JSON

func (*Writer) WriteSchemaRelationDetail

func (w *Writer) WriteSchemaRelationDetail(name string, def SchemaRelationDef) error

WriteSchemaRelationDetail outputs a single relation type as JSON

func (*Writer) WriteSchemaRelations

func (w *Writer) WriteSchemaRelations(m SchemaMetamodel) error

WriteSchemaRelations outputs relation types as JSON

func (*Writer) WriteSchemaTypes

func (w *Writer) WriteSchemaTypes(m SchemaMetamodel) error

WriteSchemaTypes outputs custom types as JSON

func (*Writer) WriteSectionHeader

func (w *Writer) WriteSectionHeader(title string)

WriteSectionHeader writes a styled section header with box drawing

func (*Writer) WriteSeparator

func (w *Writer) WriteSeparator()

WriteSeparator writes a subtle horizontal separator

func (*Writer) WriteSuccess

func (w *Writer) WriteSuccess(format string, args ...interface{})

WriteSuccess outputs a success message

func (*Writer) WriteSummaryBox

func (w *Writer) WriteSummaryBox(items []string)

WriteSummaryBox writes a boxed summary line

func (*Writer) WriteTrace

func (w *Writer) WriteTrace(result *tracer.TraceResult) error

WriteTrace outputs a trace result as a tree

func (*Writer) WriteWarning

func (w *Writer) WriteWarning(format string, args ...interface{})

WriteWarning outputs a warning message

Jump to

Keyboard shortcuts

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