model

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 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"
)

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 OutputFormatUnitMap = map[string]string{
	"markdown":   Markdown,
	"Markdown":   Markdown,
	"MarkDown":   Markdown,
	"mark_down":  Markdown,
	"md":         Markdown,
	"mdn":        Markdown,
	"mkd":        Markdown,
	"plaintext":  PlainText,
	"plain_text": PlainText,
	"PlainText":  PlainText,
	"Plaintext":  PlainText,
	"text":       PlainText,
	"txt":        PlainText,
}

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) 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