karbuf

package module
v0.0.0-...-2e0d1dc Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: MIT Imports: 9 Imported by: 0

README

karbuf

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

func NewBuilder

func NewBuilder() *Builder

func (*Builder) Print

func (e *Builder) Print(buf *strings.Builder) error

func (*Builder) Process

func (e *Builder) Process()

type Field

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

func New

func New(typ FieldType) *Field

func NewSlice

func NewSlice(t *Field) *Field

func NewString

func NewString() *Field

func (*Field) Add

func (b *Field) Add(name string, field *Field) *Field

func (*Field) Reg

func (s *Field) Reg(e *Builder, name string) *Field

func (*Field) Virtual

func (s *Field) Virtual() *Field

type FieldType

type FieldType uint
const (
	FieldInvalid FieldType = iota
	FieldBool
	FieldInt8
	FieldInt16
	FieldInt32
	FieldInt64
	FieldUint8
	FieldUint16
	FieldUint32
	FieldUint64
	FieldFloat32
	FieldFloat64
	FieldString
	FieldSlice
	FieldStruct
)

func (FieldType) IsPrimitive

func (ft FieldType) IsPrimitive() bool

func (FieldType) IsType

func (ft FieldType) IsType(t FieldType) bool

func (FieldType) Size

func (ft FieldType) Size() uint

func (FieldType) String

func (ft FieldType) String() string

type Reader

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

func NewReader

func NewReader(data []byte) *Reader

func (*Reader) Copy

func (r *Reader) Copy(ptr unsafe.Pointer, length int)

func (*Reader) Data

func (r *Reader) Data() []byte

func (*Reader) Pos

func (r *Reader) Pos() int

func (*Reader) Read

func (r *Reader) Read(length int) uintptr

func (*Reader) ReadLen

func (r *Reader) ReadLen() int

type Struct

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

func (*Struct) AppendFields

func (s *Struct) AppendFields(fields ...*Field) *Struct

type StructField

type StructField struct {
	*Field
	// contains filtered or unexported fields
}

type Writer

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

func NewWriter

func NewWriter() *Writer

func (*Writer) Copy

func (w *Writer) Copy(ptr unsafe.Pointer, length int)

func (*Writer) Data

func (w *Writer) Data() []byte

func (*Writer) WriteLen

func (w *Writer) WriteLen(length int)

Jump to

Keyboard shortcuts

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