scheme

package
v0.0.0-...-558ffba Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decorator

type Decorator struct {
	SchemeLiteral `yaml:",inline"`
	Inherit       bool
}

type DisplayProps

type DisplayProps struct {
	Fg            string `yaml:"fg"`
	Bg            string `yaml:"bg"`
	Type          string `yaml:"type"`
	Bold          bool   `yaml:"bold"`
	Italic        bool   `yaml:"italic"`
	Underline     bool   `yaml:"underline"`
	Strikethrough bool   `yaml:"strikethrough"`
	Blink         bool   `yaml:"blink"`

	Quotted bool `yaml:"quotted"`
}

func (*DisplayProps) FormatStr

func (dp *DisplayProps) FormatStr() string

func (*DisplayProps) ToColor

func (dp *DisplayProps) ToColor() *color.Color

type EnumVariant

type EnumVariant struct {
	Value string

	DisplayProps `yaml:",inline"`
}

type Scheme

type Scheme struct {
	Items []*SchemeItem
}

func New

func New(r []byte) (*Scheme, error)

type SchemeItem

type SchemeItem struct {
	Name     string
	Optional bool
	// Datetime format as a Go format string
	SrcFormat string `yaml:"src_format"`
	DstFormat string `yaml:"dst_format"`

	// Whether an Array/Object will be displayed inline or on multiple lines.
	Multiline bool

	SchemeLiteral `yaml:",inline"`

	Enum    []EnumVariant
	Prefix  *Decorator
	Postfix *Decorator
}

type SchemeLiteral

type SchemeLiteral struct {
	Literal      string
	DisplayProps `yaml:",inline"`
}

Jump to

Keyboard shortcuts

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