Beispiel #1
0
func (o *RequestMessage) decodeXDR(xr *xdr.Reader) error {
	o.Repository = xr.ReadStringMax(64)
	o.Name = xr.ReadStringMax(1024)
	o.Offset = xr.ReadUint64()
	o.Size = xr.ReadUint32()
	return xr.Error()
}
Beispiel #2
0
func (o *XDRBenchStruct) decodeXDR(xr *xdr.Reader) error {
	o.I1 = xr.ReadUint64()
	o.I2 = xr.ReadUint32()
	o.I3 = xr.ReadUint16()
	o.Bs0 = xr.ReadBytesMax(128)
	o.Bs1 = xr.ReadBytes()
	o.S0 = xr.ReadStringMax(128)
	o.S1 = xr.ReadString()
	return xr.Error()
}
Beispiel #3
0
func (o *FileInfo) decodeXDR(xr *xdr.Reader) error {
	o.Name = xr.ReadStringMax(1024)
	o.Flags = xr.ReadUint32()
	o.Modified = int64(xr.ReadUint64())
	o.Version = xr.ReadUint64()
	_BlocksSize := int(xr.ReadUint32())
	if _BlocksSize > 1000000 {
		return xdr.ErrElementSizeExceeded
	}
	o.Blocks = make([]BlockInfo, _BlocksSize)
	for i := range o.Blocks {
		(&o.Blocks[i]).decodeXDR(xr)
	}
	return xr.Error()
}
func (o *TestStruct) decodeXDR(xr *xdr.Reader) error {
	o.I = int(xr.ReadUint64())
	o.I16 = int16(xr.ReadUint16())
	o.UI16 = xr.ReadUint16()
	o.I32 = int32(xr.ReadUint32())
	o.UI32 = xr.ReadUint32()
	o.I64 = int64(xr.ReadUint64())
	o.UI64 = xr.ReadUint64()
	o.BS = xr.ReadBytes()
	o.S = xr.ReadString()
	return xr.Error()
}
Beispiel #5
0
func (o *File) decodeXDR(xr *xdr.Reader) error {
	o.Name = xr.ReadString()
	o.Flags = xr.ReadUint32()
	o.Modified = int64(xr.ReadUint64())
	o.Version = xr.ReadUint64()
	o.Size = int64(xr.ReadUint64())
	_BlocksSize := int(xr.ReadUint32())
	o.Blocks = make([]Block, _BlocksSize)
	for i := range o.Blocks {
		(&o.Blocks[i]).decodeXDR(xr)
	}
	o.Suppressed = xr.ReadBool()
	return xr.Error()
}
Beispiel #6
0
func (o *Node) decodeXDR(xr *xdr.Reader) error {
	o.ID = xr.ReadBytesMax(32)
	o.Flags = xr.ReadUint32()
	o.MaxVersion = xr.ReadUint64()
	return xr.Error()
}
Beispiel #7
0
func (o *fileVersion) decodeXDR(xr *xdr.Reader) error {
	o.version = xr.ReadUint64()
	o.node = xr.ReadBytes()
	return xr.Error()
}
Beispiel #8
0
func (o *Block) decodeXDR(xr *xdr.Reader) error {
	o.Offset = int64(xr.ReadUint64())
	o.Size = xr.ReadUint32()
	o.Hash = xr.ReadBytes()
	return xr.Error()
}