domain

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	Text     string `json:"text"`
	Value    any    `json:"value"`
	FilePath string `json:"file_path"`
	FileType string `json:"file_type"`
	JSON     []byte `json:"-"`
}

type DataSet

type DataSet struct {
	File  *Path
	Files []*Path
}

type Error

type Error struct {
	Name        string  `json:"name,omitempty"`
	Description string  `json:"description,omitempty"`
	Links       []*Link `json:"links,omitempty"`
	Level       string  `json:"level,omitempty"`
	Message     string  `json:"message,omitempty"`
	LintFile    string  `json:"lint_file,omitempty"`
	DataFile    string  `json:"data_file,omitempty"`
	// DataFilePaths []string `json:"data_files,omitempty"`
	TargetID string `json:"target_id,omitempty"`
	Location any    `json:"location,omitempty"`
	Custom   any    `json:"custom,omitempty"`
}

func (*Error) Failed

func (e *Error) Failed(errLevel errlevel.Level) (bool, error)

type JsonnetResult

type JsonnetResult struct {
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
	Links       Links  `json:"links,omitempty"`
	Message     string `json:"message,omitempty"`
	Level       string `json:"level,omitempty"`
	Location    any    `json:"location,omitempty"`
	Custom      any    `json:"custom,omitempty"`
	Excluded    bool   `json:"excluded,omitempty"`
}

unmarshal Jsonnet as JSON

type Link struct {
	Title string `json:"title,omitempty"`
	Link  string `json:"link"`
}
type Links []*Link

func (*Links) UnmarshalJSON

func (ls *Links) UnmarshalJSON(b []byte) error

type Node

type Node struct {
	Node    ast.Node
	Config  map[string]any
	Key     string
	Link    string
	Combine bool
}

type Path

type Path struct {
	Raw string `json:"raw,omitempty"`
	Abs string `json:"abs,omitempty"`
}

type Paths

type Paths []*Path

func (Paths) Raw

func (ps Paths) Raw() []string

type Result

type Result struct {
	TargetID  string           `json:"target_id,omitempty"`
	LintFile  string           `json:"lint_file,omitempty"`
	DataFile  string           `json:"data_file,omitempty"`
	DataFiles []string         `json:"data_files,omitempty"`
	RawResult []*JsonnetResult `json:"-"`
	RawOutput string           `json:"-"`
	Interface any              `json:"result,omitempty"`
	Error     string           `json:"error,omitempty"`
}

func (*Result) FlatErrors

func (result *Result) FlatErrors() []*Error

type TopLevelArgment

type TopLevelArgment struct {
	Data         *Data          `json:"data,omitempty"`
	CombinedData []*Data        `json:"combined_data,omitempty"`
	Config       map[string]any `json:"config"`
}

Jump to

Keyboard shortcuts

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