gen_basic

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

@generated by the gondn_tlv_gen, DO NOT modify manually

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeMetaInfo

type FakeMetaInfo struct {
	//+field:natural
	Number uint64 `tlv:"0x18"`
	//+field:time
	Time time.Duration `tlv:"0x19"`
	//+field:binary
	Binary []byte `tlv:"0x1a"`
}

func ParseFakeMetaInfo

func ParseFakeMetaInfo(reader enc.ParseReader, ignoreCritical bool) (*FakeMetaInfo, error)

func (*FakeMetaInfo) Bytes

func (value *FakeMetaInfo) Bytes() []byte

func (*FakeMetaInfo) Encode

func (value *FakeMetaInfo) Encode() enc.Wire

type FakeMetaInfoEncoder

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

func (*FakeMetaInfoEncoder) Encode

func (encoder *FakeMetaInfoEncoder) Encode(value *FakeMetaInfo) enc.Wire

func (*FakeMetaInfoEncoder) EncodeInto

func (encoder *FakeMetaInfoEncoder) EncodeInto(value *FakeMetaInfo, buf []byte)

func (*FakeMetaInfoEncoder) Init

func (encoder *FakeMetaInfoEncoder) Init(value *FakeMetaInfo)

type FakeMetaInfoParsingContext

type FakeMetaInfoParsingContext struct {
}

func (*FakeMetaInfoParsingContext) Init

func (context *FakeMetaInfoParsingContext) Init()

func (*FakeMetaInfoParsingContext) Parse

func (context *FakeMetaInfoParsingContext) Parse(reader enc.ParseReader, ignoreCritical bool) (*FakeMetaInfo, error)

type FixedUintField

type FixedUintField struct {
	//+field:fixedUint:byte
	Byte byte `tlv:"0x01"`
	//+field:fixedUint:uint32:optional
	U32 *uint32 `tlv:"0x02"`
	//+field:fixedUint:uint64:optional
	U64 *uint64 `tlv:"0x03"`
}

func ParseFixedUintField

func ParseFixedUintField(reader enc.ParseReader, ignoreCritical bool) (*FixedUintField, error)

func (*FixedUintField) Bytes

func (value *FixedUintField) Bytes() []byte

func (*FixedUintField) Encode

func (value *FixedUintField) Encode() enc.Wire

type FixedUintFieldEncoder

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

func (*FixedUintFieldEncoder) Encode

func (encoder *FixedUintFieldEncoder) Encode(value *FixedUintField) enc.Wire

func (*FixedUintFieldEncoder) EncodeInto

func (encoder *FixedUintFieldEncoder) EncodeInto(value *FixedUintField, buf []byte)

func (*FixedUintFieldEncoder) Init

func (encoder *FixedUintFieldEncoder) Init(value *FixedUintField)

type FixedUintFieldParsingContext

type FixedUintFieldParsingContext struct {
}

func (*FixedUintFieldParsingContext) Init

func (context *FixedUintFieldParsingContext) Init()

func (*FixedUintFieldParsingContext) Parse

func (context *FixedUintFieldParsingContext) Parse(reader enc.ParseReader, ignoreCritical bool) (*FixedUintField, error)

type Markers

type Markers struct {

	//+field:wire
	Wire enc.Wire `tlv:"0x01"`

	//+field:name
	Name enc.Name `tlv:"0x02"`
	// contains filtered or unexported fields
}

+tlv-model:private,ordered

func ParseMarkers

func ParseMarkers(buf []byte, arg int) *Markers

func (*Markers) Encode

func (m *Markers) Encode(arg int) []byte

type MarkersEncoder

type MarkersEncoder struct {
	Wire_length uint

	Name_length uint
	// contains filtered or unexported fields
}

func (*MarkersEncoder) Encode

func (encoder *MarkersEncoder) Encode(value *Markers) enc.Wire

func (*MarkersEncoder) EncodeInto

func (encoder *MarkersEncoder) EncodeInto(value *Markers, buf []byte)

func (*MarkersEncoder) Init

func (encoder *MarkersEncoder) Init(value *Markers)

type MarkersParsingContext

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

func (*MarkersParsingContext) Init

func (context *MarkersParsingContext) Init()

func (*MarkersParsingContext) Parse

func (context *MarkersParsingContext) Parse(reader enc.ParseReader, ignoreCritical bool) (*Markers, error)

type NoCopyStruct

type NoCopyStruct struct {
	//+field:wire
	Wire1 enc.Wire `tlv:"0x01"`
	//+field:natural
	Number uint64 `tlv:"0x02"`
	//+field:wire
	Wire2 enc.Wire `tlv:"0x03"`
}

+tlv-model:nocopy

func ParseNoCopyStruct

func ParseNoCopyStruct(reader enc.ParseReader, ignoreCritical bool) (*NoCopyStruct, error)

func (*NoCopyStruct) Bytes

func (value *NoCopyStruct) Bytes() []byte

func (*NoCopyStruct) Encode

func (value *NoCopyStruct) Encode() enc.Wire

type NoCopyStructEncoder

type NoCopyStructEncoder struct {
	Wire1_length uint

	Wire2_length uint
	// contains filtered or unexported fields
}

func (*NoCopyStructEncoder) Encode

func (encoder *NoCopyStructEncoder) Encode(value *NoCopyStruct) enc.Wire

func (*NoCopyStructEncoder) EncodeInto

func (encoder *NoCopyStructEncoder) EncodeInto(value *NoCopyStruct, wire enc.Wire)

func (*NoCopyStructEncoder) Init

func (encoder *NoCopyStructEncoder) Init(value *NoCopyStruct)

type NoCopyStructParsingContext

type NoCopyStructParsingContext struct {
}

func (*NoCopyStructParsingContext) Init

func (context *NoCopyStructParsingContext) Init()

func (*NoCopyStructParsingContext) Parse

func (context *NoCopyStructParsingContext) Parse(reader enc.ParseReader, ignoreCritical bool) (*NoCopyStruct, error)

type OptField

type OptField struct {
	//+field:natural:optional
	Number *uint64 `tlv:"0x18"`
	//+field:time:optional
	Time *time.Duration `tlv:"0x19"`
	//+field:binary
	Binary []byte `tlv:"0x1a"`
	//+field:bool
	Bool bool `tlv:"0x30"`
}

func ParseOptField

func ParseOptField(reader enc.ParseReader, ignoreCritical bool) (*OptField, error)

func (*OptField) Bytes

func (value *OptField) Bytes() []byte

func (*OptField) Encode

func (value *OptField) Encode() enc.Wire

type OptFieldEncoder

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

func (*OptFieldEncoder) Encode

func (encoder *OptFieldEncoder) Encode(value *OptField) enc.Wire

func (*OptFieldEncoder) EncodeInto

func (encoder *OptFieldEncoder) EncodeInto(value *OptField, buf []byte)

func (*OptFieldEncoder) Init

func (encoder *OptFieldEncoder) Init(value *OptField)

type OptFieldParsingContext

type OptFieldParsingContext struct {
}

func (*OptFieldParsingContext) Init

func (context *OptFieldParsingContext) Init()

func (*OptFieldParsingContext) Parse

func (context *OptFieldParsingContext) Parse(reader enc.ParseReader, ignoreCritical bool) (*OptField, error)

type StrField

type StrField struct {
	//+field:string
	Str1 string `tlv:"0x01"`
	//+field:string:optional
	Str2 *string `tlv:"0x02"`
}

func ParseStrField

func ParseStrField(reader enc.ParseReader, ignoreCritical bool) (*StrField, error)

func (*StrField) Bytes

func (value *StrField) Bytes() []byte

func (*StrField) Encode

func (value *StrField) Encode() enc.Wire

type StrFieldEncoder

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

func (*StrFieldEncoder) Encode

func (encoder *StrFieldEncoder) Encode(value *StrField) enc.Wire

func (*StrFieldEncoder) EncodeInto

func (encoder *StrFieldEncoder) EncodeInto(value *StrField, buf []byte)

func (*StrFieldEncoder) Init

func (encoder *StrFieldEncoder) Init(value *StrField)

type StrFieldParsingContext

type StrFieldParsingContext struct {
}

func (*StrFieldParsingContext) Init

func (context *StrFieldParsingContext) Init()

func (*StrFieldParsingContext) Parse

func (context *StrFieldParsingContext) Parse(reader enc.ParseReader, ignoreCritical bool) (*StrField, error)

type WireNameField

type WireNameField struct {
	//+field:wire
	Wire enc.Wire `tlv:"0x01"`
	//+field:name
	Name enc.Name `tlv:"0x02"`
}

func ParseWireNameField

func ParseWireNameField(reader enc.ParseReader, ignoreCritical bool) (*WireNameField, error)

func (*WireNameField) Bytes

func (value *WireNameField) Bytes() []byte

func (*WireNameField) Encode

func (value *WireNameField) Encode() enc.Wire

type WireNameFieldEncoder

type WireNameFieldEncoder struct {
	Wire_length uint
	Name_length uint
	// contains filtered or unexported fields
}

func (*WireNameFieldEncoder) Encode

func (encoder *WireNameFieldEncoder) Encode(value *WireNameField) enc.Wire

func (*WireNameFieldEncoder) EncodeInto

func (encoder *WireNameFieldEncoder) EncodeInto(value *WireNameField, buf []byte)

func (*WireNameFieldEncoder) Init

func (encoder *WireNameFieldEncoder) Init(value *WireNameField)

type WireNameFieldParsingContext

type WireNameFieldParsingContext struct {
}

func (*WireNameFieldParsingContext) Init

func (context *WireNameFieldParsingContext) Init()

func (*WireNameFieldParsingContext) Parse

func (context *WireNameFieldParsingContext) Parse(reader enc.ParseReader, ignoreCritical bool) (*WireNameField, error)

Jump to

Keyboard shortcuts

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