types

package
v0.0.3-alpha3 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2020 License: MIT Imports: 14 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EM_TypeBinary_FailedToReadBytes = "Type>Binary:FailedTo_ReadBytes (length: %s)"
	EM_TypeBinary_FailedToSkipBytes = "Type>Binary:FailedTo_SkipBytes (length: %s)"
)
View Source
var (
	Counter     int64 = 0
	CounterTime int64 = 0
	CounterLock sync.Mutex
)
View Source
var Package_TextWrapperStyle_Details = typeUtils.Text_WrapperOption{
	Char_LeftMain:   '│',
	Char_LeftBottom: '└',
	Char_BottomMain: '─',
	Indent_Title:    0,
	Indent_Content:  1,
}
View Source
var Package_TextWrapperStyle_Package = typeUtils.Text_WrapperOption{
	Char_LeftMain:   '│',
	Char_LeftBottom: '└',
	Char_BottomMain: '-',
	Indent_Title:    0,
	Indent_Content:  2,
}
View Source
var (
	Throwable_logger_wg sync.WaitGroup
)

Functions

func SetThrowable_PrefixEveryLine

func SetThrowable_PrefixEveryLine(option bool)

func SetThrowable_ThrowLevel

func SetThrowable_ThrowLevel(level ThrowableLevel)

func Throw

func Throw(t interface{}, level ThrowableLevel)

Types

type BinaryReader

type BinaryReader struct {
	// contains filtered or unexported fields
}

func NewBinaryReader

func NewBinaryReader(rs io.Reader) *BinaryReader

func (*BinaryReader) ReadAllFollowedBytes

func (r *BinaryReader) ReadAllFollowedBytes() ([]byte, error)

func (*BinaryReader) ReadBytes

func (r *BinaryReader) ReadBytes(length uint64) ([]byte, error)

func (*BinaryReader) Skip

func (r *BinaryReader) Skip(length int) error

type Buffer

type Buffer struct {
	// contains filtered or unexported fields
}

func NewBuffer

func NewBuffer() *Buffer

func (*Buffer) Dump

func (b *Buffer) Dump() ([]byte, error)

func (*Buffer) Read

func (b *Buffer) Read(p []byte) (int, error)

func (*Buffer) String

func (b *Buffer) String() string

func (*Buffer) Write

func (b *Buffer) Write(p []byte) (int, error)

func (*Buffer) WriteString

func (b *Buffer) WriteString(str string) (int, error)

func (*Buffer) WriteStrings

func (b *Buffer) WriteStrings(parts ...string) (int, error)

func (*Buffer) WriteStringsIE

func (b *Buffer) WriteStringsIE(parts ...string)

type ErrorThrowable

type ErrorThrowable interface {
	error
	Throwable
}

type Mask

type Mask struct {
	// contains filtered or unexported fields
}

func NewMask

func NewMask(mask string, template string) Mask

func (Mask) Error

func (m Mask) Error() string

func (*Mask) GetMask

func (m *Mask) GetMask() string

func (*Mask) GetMessage

func (m *Mask) GetMessage(args map[string]string) string

type MaskComparable

type MaskComparable interface {
	Is(error) bool
}

type MaskComparableThrowable

type MaskComparableThrowable interface {
	MaskComparable
	Throwable
}

type Masker

type Masker interface {
	GetMask() string
}

type Messager

type Messager interface {
	GetMessage() string
}

type PackageAuthor

type PackageAuthor struct {
	// contains filtered or unexported fields
}

PackageAuthor

func NewPackageAuthor

func NewPackageAuthor(nick, mail string) PackageAuthor

func (PackageAuthor) String

func (author PackageAuthor) String() string

type PackageAuthors

type PackageAuthors []PackageAuthor

func (PackageAuthors) MarshalJSON

func (authors PackageAuthors) MarshalJSON() ([]byte, error)

func (PackageAuthors) String

func (authors PackageAuthors) String() string

type PackageCopyright

type PackageCopyright string

PackageCopyright

func NewPackageCopyright

func NewPackageCopyright(content string) PackageCopyright

func (PackageCopyright) String

func (copyright PackageCopyright) String() string

type PackageCopyrights

type PackageCopyrights []PackageCopyright

func (PackageCopyrights) String

func (copyrights PackageCopyrights) String() string

type PackageInfo

type PackageInfo struct {
	// contains filtered or unexported fields
}

PackageInfo

func NewPackageInfo

func NewPackageInfo(name string, version Version, extraInfo ...packageInfoExtension) PackageInfo

func (PackageInfo) GetAuthor

func (pkgInfo PackageInfo) GetAuthor() PackageAuthors

func (PackageInfo) GetCopyrights

func (pkgInfo PackageInfo) GetCopyrights() PackageCopyrights

func (PackageInfo) GetLicenses

func (pkgInfo PackageInfo) GetLicenses() PackageLicenses

func (PackageInfo) GetMask

func (pkgInfo PackageInfo) GetMask() string

func (PackageInfo) GetMessage

func (pkgInfo PackageInfo) GetMessage() string

func (PackageInfo) GetName

func (pkgInfo PackageInfo) GetName() string

func (PackageInfo) GetVersion

func (pkgInfo PackageInfo) GetVersion() Version

func (PackageInfo) String

func (pkgInfo PackageInfo) String() string

func (PackageInfo) String_Detailed

func (pkgInfo PackageInfo) String_Detailed() string

type PackageLicense

type PackageLicense string

PackageLicense

func NewPackageLicense

func NewPackageLicense(license string) PackageLicense

func (PackageLicense) String

func (license PackageLicense) String() string

type PackageLicenses

type PackageLicenses []PackageLicense

func (PackageLicenses) String

func (licenses PackageLicenses) String() string

type SimpleThrowable

type SimpleThrowable struct {
	Mask  Mask
	Param map[string]string
}

func NewSimpleThrowable

func NewSimpleThrowable(mask Mask, param map[string]string) *SimpleThrowable

func (*SimpleThrowable) Error

func (st *SimpleThrowable) Error() string

func (*SimpleThrowable) GetMask

func (st *SimpleThrowable) GetMask() string

func (*SimpleThrowable) GetMessage

func (st *SimpleThrowable) GetMessage() string

func (*SimpleThrowable) Is

func (st *SimpleThrowable) Is(err error) bool

func (*SimpleThrowable) SetParam

func (st *SimpleThrowable) SetParam(key, value string) *SimpleThrowable

type Throwable

type Throwable interface {
	Masker
	Messager
}

type ThrowableLevel

type ThrowableLevel uint8
const (
	TlUnknown ThrowableLevel = 1 << (8 - 1 - iota)
	TlDebug
	TlInfo
	TlNotify
	TlWarning
	TlError
	TlPanic
)

func (ThrowableLevel) String

func (s ThrowableLevel) String() string

type Version

type Version struct {
	// contains filtered or unexported fields
}

func NewVersion

func NewVersion(tag VersionTag, main, sub, fix, build uint, extra string) Version

func (Version) MarshalJSON

func (v Version) MarshalJSON() ([]byte, error)

func (Version) String

func (v Version) String() string

type VersionTag

type VersionTag uint8
const (
	VtStable VersionTag = 1 << (8 - 1 - iota) // 128
	VtCandidate
	VtBeta
	VtAlpha
	VtDev
)

func (VersionTag) String

func (vt VersionTag) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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