model

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SwitchOn  = "on"
	SwitchOff = "off"
)
View Source
const (
	Markdown  = "markdown"
	PlainText = "plaintext"
	XML       = "xml"
	Arklite   = "arklite"
	Auto      = "auto"
)

Variables

View Source
var ByteStringRegexpString = `(?i)^(\d+(?:\.\d+)?)(B|K|KB|KI|KIB|M|MB|MI|MIB|G|GB|GI|GIB|T|TB|TI|TIB|P|PB|PI|PIB)?$`
View Source
var OutputFormatAllowComplessMap = map[string]bool{
	Markdown:  true,
	PlainText: true,
	XML:       true,
	Arklite:   false,
	Auto:      false,
}
View Source
var OutputFormatUnitMap = map[string]string{
	"markdown":   Markdown,
	"Markdown":   Markdown,
	"MarkDown":   Markdown,
	"mark_down":  Markdown,
	"mark-down":  Markdown,
	"md":         Markdown,
	"mdn":        Markdown,
	"mkd":        Markdown,
	"plaintext":  PlainText,
	"plain_text": PlainText,
	"plain-text": PlainText,
	"PlainText":  PlainText,
	"Plaintext":  PlainText,
	"text":       PlainText,
	"txt":        PlainText,
	"xml":        XML,
	"Xml":        XML,
	"XML":        XML,
	"arklite":    Arklite,
	"arkl":       Arklite,
	"al":         Arklite,
	"compact":    Arklite,
	"auto":       Auto,
}

Functions

func Ext2OutputFormat

func Ext2OutputFormat(extension string) string

Types

type ByteString

type ByteString string

func (*ByteString) Bytes

func (b *ByteString) Bytes() (int, error)

func (*ByteString) Set

func (b *ByteString) Set(value string) error

func (*ByteString) String

func (b *ByteString) String() string

type OnOffSwitch

type OnOffSwitch string

func Bool2OnOffSwitch

func Bool2OnOffSwitch(b bool) OnOffSwitch

func (*OnOffSwitch) Bool

func (m *OnOffSwitch) Bool() bool

func (*OnOffSwitch) Set

func (m *OnOffSwitch) Set(value string) error

func (*OnOffSwitch) String

func (m *OnOffSwitch) String() string

type OutputFormat

type OutputFormat string

func (*OutputFormat) CanCompless added in v1.1.2

func (m *OutputFormat) CanCompless() bool

func (*OutputFormat) Set

func (m *OutputFormat) Set(value string) error

func (*OutputFormat) String

func (m *OutputFormat) String() string

Jump to

Keyboard shortcuts

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