Documentation ¶
Index ¶
- type Content
- func (x *Content) Read(viewer *ContentViewer, reader *karmem.Reader)
- func (x *Content) ReadAsRoot(reader *karmem.Reader)
- func (x *Content) Reset()
- func (x *Content) Write(writer *karmem.Writer, start uint) (offset uint, err error)
- func (x *Content) WriteAsRoot(writer *karmem.Writer) (offset uint, err error)
- type ContentOptions
- func (x *ContentOptions) Read(viewer *ContentOptionsViewer, reader *karmem.Reader)
- func (x *ContentOptions) ReadAsRoot(reader *karmem.Reader)
- func (x *ContentOptions) Reset()
- func (x *ContentOptions) Write(writer *karmem.Writer, start uint) (offset uint, err error)
- func (x *ContentOptions) WriteAsRoot(writer *karmem.Writer) (offset uint, err error)
- type ContentOptionsViewer
- type ContentSize
- func (x *ContentSize) Read(viewer *ContentSizeViewer, reader *karmem.Reader)
- func (x *ContentSize) ReadAsRoot(reader *karmem.Reader)
- func (x *ContentSize) Reset()
- func (x *ContentSize) Write(writer *karmem.Writer, start uint) (offset uint, err error)
- func (x *ContentSize) WriteAsRoot(writer *karmem.Writer) (offset uint, err error)
- type ContentSizeViewer
- type ContentViewer
- func (x *ContentViewer) Enums(reader *karmem.Reader) (v []EnumViewer)
- func (x *ContentViewer) Module(reader *karmem.Reader) (v []byte)
- func (x *ContentViewer) Options(reader *karmem.Reader) (v *ContentOptionsViewer)
- func (x *ContentViewer) Size(reader *karmem.Reader) (v *ContentSizeViewer)
- func (x *ContentViewer) Structs(reader *karmem.Reader) (v []StructViewer)
- func (x *ContentViewer) Tags(reader *karmem.Reader) (v []TagViewer)
- type Enum
- type EnumData
- func (x *EnumData) Read(viewer *EnumDataViewer, reader *karmem.Reader)
- func (x *EnumData) ReadAsRoot(reader *karmem.Reader)
- func (x *EnumData) Reset()
- func (x *EnumData) Write(writer *karmem.Writer, start uint) (offset uint, err error)
- func (x *EnumData) WriteAsRoot(writer *karmem.Writer) (offset uint, err error)
- type EnumDataViewer
- type EnumField
- func (x *EnumField) Read(viewer *EnumFieldViewer, reader *karmem.Reader)
- func (x *EnumField) ReadAsRoot(reader *karmem.Reader)
- func (x *EnumField) Reset()
- func (x *EnumField) Write(writer *karmem.Writer, start uint) (offset uint, err error)
- func (x *EnumField) WriteAsRoot(writer *karmem.Writer) (offset uint, err error)
- type EnumFieldData
- func (x *EnumFieldData) Read(viewer *EnumFieldDataViewer, reader *karmem.Reader)
- func (x *EnumFieldData) ReadAsRoot(reader *karmem.Reader)
- func (x *EnumFieldData) Reset()
- func (x *EnumFieldData) Write(writer *karmem.Writer, start uint) (offset uint, err error)
- func (x *EnumFieldData) WriteAsRoot(writer *karmem.Writer) (offset uint, err error)
- type EnumFieldDataViewer
- type EnumFieldViewer
- type EnumViewer
- type Reader
- type Struct
- func (x *Struct) Read(viewer *StructViewer, reader *karmem.Reader)
- func (x *Struct) ReadAsRoot(reader *karmem.Reader)
- func (x *Struct) Reset()
- func (x *Struct) Write(writer *karmem.Writer, start uint) (offset uint, err error)
- func (x *Struct) WriteAsRoot(writer *karmem.Writer) (offset uint, err error)
- type StructClass
- type StructData
- func (x StructData) IsTable() bool
- func (x *StructData) Read(viewer *StructDataViewer, reader *karmem.Reader)
- func (x *StructData) ReadAsRoot(reader *karmem.Reader)
- func (x *StructData) Reset()
- func (x *StructData) Write(writer *karmem.Writer, start uint) (offset uint, err error)
- func (x *StructData) WriteAsRoot(writer *karmem.Writer) (offset uint, err error)
- type StructDataViewer
- func (x *StructDataViewer) Class() (v StructClass)
- func (x *StructDataViewer) Fields(reader *karmem.Reader) (v []StructFieldViewer)
- func (x *StructDataViewer) ID() (v uint64)
- func (x *StructDataViewer) Name(reader *karmem.Reader) (v []byte)
- func (x *StructDataViewer) Size(reader *karmem.Reader) (v *StructSizeViewer)
- type StructField
- func (x *StructField) Read(viewer *StructFieldViewer, reader *karmem.Reader)
- func (x *StructField) ReadAsRoot(reader *karmem.Reader)
- func (x *StructField) Reset()
- func (x *StructField) Write(writer *karmem.Writer, start uint) (offset uint, err error)
- func (x *StructField) WriteAsRoot(writer *karmem.Writer) (offset uint, err error)
- type StructFieldData
- func (x *StructFieldData) Read(viewer *StructFieldDataViewer, reader *karmem.Reader)
- func (x *StructFieldData) ReadAsRoot(reader *karmem.Reader)
- func (x *StructFieldData) Reset()
- func (x *StructFieldData) Write(writer *karmem.Writer, start uint) (offset uint, err error)
- func (x *StructFieldData) WriteAsRoot(writer *karmem.Writer) (offset uint, err error)
- type StructFieldDataViewer
- func (x *StructFieldDataViewer) Name(reader *karmem.Reader) (v []byte)
- func (x *StructFieldDataViewer) Offset() (v uint32)
- func (x *StructFieldDataViewer) Size(reader *karmem.Reader) (v *StructFieldSizeViewer)
- func (x *StructFieldDataViewer) Tags(reader *karmem.Reader) (v []TagViewer)
- func (x *StructFieldDataViewer) Type(reader *karmem.Reader) (v *TypeViewer)
- type StructFieldSize
- func (x *StructFieldSize) Read(viewer *StructFieldSizeViewer, reader *karmem.Reader)
- func (x *StructFieldSize) ReadAsRoot(reader *karmem.Reader)
- func (x *StructFieldSize) Reset()
- func (x *StructFieldSize) Write(writer *karmem.Writer, start uint) (offset uint, err error)
- func (x *StructFieldSize) WriteAsRoot(writer *karmem.Writer) (offset uint, err error)
- type StructFieldSizeViewer
- type StructFieldViewer
- type StructSize
- func (x *StructSize) Read(viewer *StructSizeViewer, reader *karmem.Reader)
- func (x *StructSize) ReadAsRoot(reader *karmem.Reader)
- func (x *StructSize) Reset()
- func (x *StructSize) Write(writer *karmem.Writer, start uint) (offset uint, err error)
- func (x *StructSize) WriteAsRoot(writer *karmem.Writer) (offset uint, err error)
- type StructSizeViewer
- type StructViewer
- type Tag
- type TagViewer
- type Tags
- type Type
- func (x *Type) IsArray() bool
- func (x *Type) IsBasic() bool
- func (x *Type) IsBool() bool
- func (x *Type) IsEnum() bool
- func (x *Type) IsInline() bool
- func (x *Type) IsInteger() bool
- func (x *Type) IsLimited() bool
- func (x *Type) IsNative() bool
- func (x *Type) IsSlice() bool
- func (x *Type) IsString() bool
- func (x *Type) Read(viewer *TypeViewer, reader *karmem.Reader)
- func (x *Type) ReadAsRoot(reader *karmem.Reader)
- func (x *Type) Reset()
- func (x *Type) Write(writer *karmem.Writer, start uint) (offset uint, err error)
- func (x *Type) WriteAsRoot(writer *karmem.Writer) (offset uint, err error)
- type TypeFormat
- type TypeModel
- type TypeViewer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Content ¶
type Content struct { Tags []Tag Structs []Struct Enums []Enum Size ContentSize Options ContentOptions Module string }
func (*Content) ReadAsRoot ¶
type ContentOptions ¶
func (*ContentOptions) Read ¶
func (x *ContentOptions) Read(viewer *ContentOptionsViewer, reader *karmem.Reader)
func (*ContentOptions) ReadAsRoot ¶
func (x *ContentOptions) ReadAsRoot(reader *karmem.Reader)
func (*ContentOptions) Reset ¶
func (x *ContentOptions) Reset()
func (*ContentOptions) WriteAsRoot ¶
func (x *ContentOptions) WriteAsRoot(writer *karmem.Writer) (offset uint, err error)
type ContentOptionsViewer ¶
type ContentOptionsViewer struct {
// contains filtered or unexported fields
}
func NewContentOptionsViewer ¶
func NewContentOptionsViewer(reader *karmem.Reader, offset uint32) (v *ContentOptionsViewer)
func (*ContentOptionsViewer) Import ¶
func (x *ContentOptionsViewer) Import(reader *karmem.Reader) (v []byte)
type ContentSize ¶
type ContentSize struct {
Largest uint32
}
func (*ContentSize) Read ¶
func (x *ContentSize) Read(viewer *ContentSizeViewer, reader *karmem.Reader)
func (*ContentSize) ReadAsRoot ¶
func (x *ContentSize) ReadAsRoot(reader *karmem.Reader)
func (*ContentSize) Reset ¶
func (x *ContentSize) Reset()
func (*ContentSize) WriteAsRoot ¶
func (x *ContentSize) WriteAsRoot(writer *karmem.Writer) (offset uint, err error)
type ContentSizeViewer ¶
type ContentSizeViewer struct {
// contains filtered or unexported fields
}
func NewContentSizeViewer ¶
func NewContentSizeViewer(reader *karmem.Reader, offset uint32) (v *ContentSizeViewer)
func (*ContentSizeViewer) Largest ¶
func (x *ContentSizeViewer) Largest() (v uint32)
type ContentViewer ¶
type ContentViewer struct {
// contains filtered or unexported fields
}
func NewContentViewer ¶
func NewContentViewer(reader *karmem.Reader, offset uint32) (v *ContentViewer)
func (*ContentViewer) Enums ¶
func (x *ContentViewer) Enums(reader *karmem.Reader) (v []EnumViewer)
func (*ContentViewer) Options ¶
func (x *ContentViewer) Options(reader *karmem.Reader) (v *ContentOptionsViewer)
func (*ContentViewer) Size ¶
func (x *ContentViewer) Size(reader *karmem.Reader) (v *ContentSizeViewer)
func (*ContentViewer) Structs ¶
func (x *ContentViewer) Structs(reader *karmem.Reader) (v []StructViewer)
type EnumDataViewer ¶
type EnumDataViewer struct {
// contains filtered or unexported fields
}
func NewEnumDataViewer ¶
func NewEnumDataViewer(reader *karmem.Reader, offset uint32) (v *EnumDataViewer)
func (*EnumDataViewer) Fields ¶
func (x *EnumDataViewer) Fields(reader *karmem.Reader) (v []EnumFieldViewer)
func (*EnumDataViewer) Type ¶
func (x *EnumDataViewer) Type(reader *karmem.Reader) (v *TypeViewer)
type EnumField ¶
type EnumField struct {
Data EnumFieldData
}
func (*EnumField) ReadAsRoot ¶
type EnumFieldData ¶
func (*EnumFieldData) Read ¶
func (x *EnumFieldData) Read(viewer *EnumFieldDataViewer, reader *karmem.Reader)
func (*EnumFieldData) ReadAsRoot ¶
func (x *EnumFieldData) ReadAsRoot(reader *karmem.Reader)
func (*EnumFieldData) Reset ¶
func (x *EnumFieldData) Reset()
func (*EnumFieldData) WriteAsRoot ¶
func (x *EnumFieldData) WriteAsRoot(writer *karmem.Writer) (offset uint, err error)
type EnumFieldDataViewer ¶
type EnumFieldDataViewer struct {
// contains filtered or unexported fields
}
func NewEnumFieldDataViewer ¶
func NewEnumFieldDataViewer(reader *karmem.Reader, offset uint32) (v *EnumFieldDataViewer)
func (*EnumFieldDataViewer) Name ¶
func (x *EnumFieldDataViewer) Name(reader *karmem.Reader) (v []byte)
type EnumFieldViewer ¶
type EnumFieldViewer struct {
// contains filtered or unexported fields
}
func NewEnumFieldViewer ¶
func NewEnumFieldViewer(reader *karmem.Reader, offset uint32) (v *EnumFieldViewer)
func (*EnumFieldViewer) Data ¶
func (x *EnumFieldViewer) Data(reader *karmem.Reader) (v *EnumFieldDataViewer)
type EnumViewer ¶
type EnumViewer struct {
// contains filtered or unexported fields
}
func NewEnumViewer ¶
func NewEnumViewer(reader *karmem.Reader, offset uint32) (v *EnumViewer)
func (*EnumViewer) Data ¶
func (x *EnumViewer) Data(reader *karmem.Reader) (v *EnumDataViewer)
type Reader ¶
type Reader struct { Parsed Content // contains filtered or unexported fields }
Reader reads and decodes Karmem files.
type Struct ¶
type Struct struct {
Data StructData
}
func (*Struct) ReadAsRoot ¶
type StructClass ¶
type StructClass uint8
const ( StructClassNone StructClass = 0 StructClassTable StructClass = 1 StructClassInline StructClass = 2 )
type StructData ¶
type StructData struct { ID uint64 Name string Size StructSize Fields []StructField Class StructClass }
func (StructData) IsTable ¶
func (x StructData) IsTable() bool
func (*StructData) Read ¶
func (x *StructData) Read(viewer *StructDataViewer, reader *karmem.Reader)
func (*StructData) ReadAsRoot ¶
func (x *StructData) ReadAsRoot(reader *karmem.Reader)
func (*StructData) Reset ¶
func (x *StructData) Reset()
func (*StructData) WriteAsRoot ¶
func (x *StructData) WriteAsRoot(writer *karmem.Writer) (offset uint, err error)
type StructDataViewer ¶
type StructDataViewer struct {
// contains filtered or unexported fields
}
func NewStructDataViewer ¶
func NewStructDataViewer(reader *karmem.Reader, offset uint32) (v *StructDataViewer)
func (*StructDataViewer) Class ¶
func (x *StructDataViewer) Class() (v StructClass)
func (*StructDataViewer) Fields ¶
func (x *StructDataViewer) Fields(reader *karmem.Reader) (v []StructFieldViewer)
func (*StructDataViewer) ID ¶
func (x *StructDataViewer) ID() (v uint64)
func (*StructDataViewer) Size ¶
func (x *StructDataViewer) Size(reader *karmem.Reader) (v *StructSizeViewer)
type StructField ¶
type StructField struct {
Data StructFieldData
}
func (*StructField) Read ¶
func (x *StructField) Read(viewer *StructFieldViewer, reader *karmem.Reader)
func (*StructField) ReadAsRoot ¶
func (x *StructField) ReadAsRoot(reader *karmem.Reader)
func (*StructField) Reset ¶
func (x *StructField) Reset()
func (*StructField) WriteAsRoot ¶
func (x *StructField) WriteAsRoot(writer *karmem.Writer) (offset uint, err error)
type StructFieldData ¶
type StructFieldData struct { Name string Type Type Offset uint32 Tags []Tag Size StructFieldSize }
func (*StructFieldData) Read ¶
func (x *StructFieldData) Read(viewer *StructFieldDataViewer, reader *karmem.Reader)
func (*StructFieldData) ReadAsRoot ¶
func (x *StructFieldData) ReadAsRoot(reader *karmem.Reader)
func (*StructFieldData) Reset ¶
func (x *StructFieldData) Reset()
func (*StructFieldData) WriteAsRoot ¶
func (x *StructFieldData) WriteAsRoot(writer *karmem.Writer) (offset uint, err error)
type StructFieldDataViewer ¶
type StructFieldDataViewer struct {
// contains filtered or unexported fields
}
func NewStructFieldDataViewer ¶
func NewStructFieldDataViewer(reader *karmem.Reader, offset uint32) (v *StructFieldDataViewer)
func (*StructFieldDataViewer) Name ¶
func (x *StructFieldDataViewer) Name(reader *karmem.Reader) (v []byte)
func (*StructFieldDataViewer) Offset ¶
func (x *StructFieldDataViewer) Offset() (v uint32)
func (*StructFieldDataViewer) Size ¶
func (x *StructFieldDataViewer) Size(reader *karmem.Reader) (v *StructFieldSizeViewer)
func (*StructFieldDataViewer) Tags ¶
func (x *StructFieldDataViewer) Tags(reader *karmem.Reader) (v []TagViewer)
func (*StructFieldDataViewer) Type ¶
func (x *StructFieldDataViewer) Type(reader *karmem.Reader) (v *TypeViewer)
type StructFieldSize ¶
func (*StructFieldSize) Read ¶
func (x *StructFieldSize) Read(viewer *StructFieldSizeViewer, reader *karmem.Reader)
func (*StructFieldSize) ReadAsRoot ¶
func (x *StructFieldSize) ReadAsRoot(reader *karmem.Reader)
func (*StructFieldSize) Reset ¶
func (x *StructFieldSize) Reset()
func (*StructFieldSize) WriteAsRoot ¶
func (x *StructFieldSize) WriteAsRoot(writer *karmem.Writer) (offset uint, err error)
type StructFieldSizeViewer ¶
type StructFieldSizeViewer struct {
// contains filtered or unexported fields
}
func NewStructFieldSizeViewer ¶
func NewStructFieldSizeViewer(reader *karmem.Reader, offset uint32) (v *StructFieldSizeViewer)
func (*StructFieldSizeViewer) Allocation ¶
func (x *StructFieldSizeViewer) Allocation() (v uint32)
func (*StructFieldSizeViewer) Field ¶
func (x *StructFieldSizeViewer) Field() (v uint32)
func (*StructFieldSizeViewer) Minimum ¶
func (x *StructFieldSizeViewer) Minimum() (v uint32)
type StructFieldViewer ¶
type StructFieldViewer struct {
// contains filtered or unexported fields
}
func NewStructFieldViewer ¶
func NewStructFieldViewer(reader *karmem.Reader, offset uint32) (v *StructFieldViewer)
func (*StructFieldViewer) Data ¶
func (x *StructFieldViewer) Data(reader *karmem.Reader) (v *StructFieldDataViewer)
type StructSize ¶
type StructSize struct { Minimum uint32 Content uint32 Padding uint32 Total uint32 TotalGroup []uint8 }
func (*StructSize) Read ¶
func (x *StructSize) Read(viewer *StructSizeViewer, reader *karmem.Reader)
func (*StructSize) ReadAsRoot ¶
func (x *StructSize) ReadAsRoot(reader *karmem.Reader)
func (*StructSize) Reset ¶
func (x *StructSize) Reset()
func (*StructSize) WriteAsRoot ¶
func (x *StructSize) WriteAsRoot(writer *karmem.Writer) (offset uint, err error)
type StructSizeViewer ¶
type StructSizeViewer struct {
// contains filtered or unexported fields
}
func NewStructSizeViewer ¶
func NewStructSizeViewer(reader *karmem.Reader, offset uint32) (v *StructSizeViewer)
func (*StructSizeViewer) Content ¶
func (x *StructSizeViewer) Content() (v uint32)
func (*StructSizeViewer) Minimum ¶
func (x *StructSizeViewer) Minimum() (v uint32)
func (*StructSizeViewer) Padding ¶
func (x *StructSizeViewer) Padding() (v uint32)
func (*StructSizeViewer) Total ¶
func (x *StructSizeViewer) Total() (v uint32)
func (*StructSizeViewer) TotalGroup ¶
func (x *StructSizeViewer) TotalGroup(reader *karmem.Reader) (v []uint8)
type StructViewer ¶
type StructViewer struct {
// contains filtered or unexported fields
}
func NewStructViewer ¶
func NewStructViewer(reader *karmem.Reader, offset uint32) (v *StructViewer)
func (*StructViewer) Data ¶
func (x *StructViewer) Data(reader *karmem.Reader) (v *StructDataViewer)
type Tag ¶
func (*Tag) ReadAsRoot ¶
type Type ¶
type Type struct { Schema string PlainSchema string Length uint32 Format TypeFormat Model TypeModel }
func (*Type) ReadAsRoot ¶
type TypeFormat ¶
type TypeFormat uint8
const ( TypeFormatNone TypeFormat = 0 TypeFormatPrimitive TypeFormat = 1 TypeFormatEnum TypeFormat = 2 TypeFormatStruct TypeFormat = 3 TypeFormatTable TypeFormat = 4 )
type TypeViewer ¶
type TypeViewer struct {
// contains filtered or unexported fields
}
func NewTypeViewer ¶
func NewTypeViewer(reader *karmem.Reader, offset uint32) (v *TypeViewer)
func (*TypeViewer) Format ¶
func (x *TypeViewer) Format() (v TypeFormat)
func (*TypeViewer) Length ¶
func (x *TypeViewer) Length() (v uint32)
func (*TypeViewer) Model ¶
func (x *TypeViewer) Model() (v TypeModel)
func (*TypeViewer) PlainSchema ¶
func (x *TypeViewer) PlainSchema(reader *karmem.Reader) (v []byte)
Click to show internal directories.
Click to hide internal directories.