12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193 |
- // ************************************************************
- // This file is automatically generated by genxdr. Do not edit.
- // ************************************************************
- package protocol
- import (
- "bytes"
- "io"
- "github.com/calmh/xdr"
- )
- /*
- IndexMessage Structure:
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Length of Folder |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- / /
- \ Folder (variable length) \
- / /
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Number of Files |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- / /
- \ Zero or more FileInfo Structures \
- / /
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Flags |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Number of Options |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- / /
- \ Zero or more Option Structures \
- / /
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- struct IndexMessage {
- string Folder<256>;
- FileInfo Files<1000000>;
- unsigned int Flags;
- Option Options<64>;
- }
- */
- func (o IndexMessage) EncodeXDR(w io.Writer) (int, error) {
- var xw = xdr.NewWriter(w)
- return o.EncodeXDRInto(xw)
- }
- func (o IndexMessage) MarshalXDR() ([]byte, error) {
- return o.AppendXDR(make([]byte, 0, 128))
- }
- func (o IndexMessage) MustMarshalXDR() []byte {
- bs, err := o.MarshalXDR()
- if err != nil {
- panic(err)
- }
- return bs
- }
- func (o IndexMessage) AppendXDR(bs []byte) ([]byte, error) {
- var aw = xdr.AppendWriter(bs)
- var xw = xdr.NewWriter(&aw)
- _, err := o.EncodeXDRInto(xw)
- return []byte(aw), err
- }
- func (o IndexMessage) EncodeXDRInto(xw *xdr.Writer) (int, error) {
- if l := len(o.Folder); l > 256 {
- return xw.Tot(), xdr.ElementSizeExceeded("Folder", l, 256)
- }
- xw.WriteString(o.Folder)
- if l := len(o.Files); l > 1000000 {
- return xw.Tot(), xdr.ElementSizeExceeded("Files", l, 1000000)
- }
- xw.WriteUint32(uint32(len(o.Files)))
- for i := range o.Files {
- _, err := o.Files[i].EncodeXDRInto(xw)
- if err != nil {
- return xw.Tot(), err
- }
- }
- xw.WriteUint32(o.Flags)
- if l := len(o.Options); l > 64 {
- return xw.Tot(), xdr.ElementSizeExceeded("Options", l, 64)
- }
- xw.WriteUint32(uint32(len(o.Options)))
- for i := range o.Options {
- _, err := o.Options[i].EncodeXDRInto(xw)
- if err != nil {
- return xw.Tot(), err
- }
- }
- return xw.Tot(), xw.Error()
- }
- func (o *IndexMessage) DecodeXDR(r io.Reader) error {
- xr := xdr.NewReader(r)
- return o.DecodeXDRFrom(xr)
- }
- func (o *IndexMessage) UnmarshalXDR(bs []byte) error {
- var br = bytes.NewReader(bs)
- var xr = xdr.NewReader(br)
- return o.DecodeXDRFrom(xr)
- }
- func (o *IndexMessage) DecodeXDRFrom(xr *xdr.Reader) error {
- o.Folder = xr.ReadStringMax(256)
- _FilesSize := int(xr.ReadUint32())
- if _FilesSize < 0 {
- return xdr.ElementSizeExceeded("Files", _FilesSize, 1000000)
- }
- if _FilesSize > 1000000 {
- return xdr.ElementSizeExceeded("Files", _FilesSize, 1000000)
- }
- o.Files = make([]FileInfo, _FilesSize)
- for i := range o.Files {
- (&o.Files[i]).DecodeXDRFrom(xr)
- }
- o.Flags = xr.ReadUint32()
- _OptionsSize := int(xr.ReadUint32())
- if _OptionsSize < 0 {
- return xdr.ElementSizeExceeded("Options", _OptionsSize, 64)
- }
- if _OptionsSize > 64 {
- return xdr.ElementSizeExceeded("Options", _OptionsSize, 64)
- }
- o.Options = make([]Option, _OptionsSize)
- for i := range o.Options {
- (&o.Options[i]).DecodeXDRFrom(xr)
- }
- return xr.Error()
- }
- /*
- FileInfo Structure:
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Length of Name |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- / /
- \ Name (variable length) \
- / /
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Flags |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | |
- + Modified (64 bits) +
- | |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- / /
- \ Vector Structure \
- / /
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | |
- + Local Version (64 bits) +
- | |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Number of Blocks |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- / /
- \ Zero or more BlockInfo Structures \
- / /
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- struct FileInfo {
- string Name<8192>;
- unsigned int Flags;
- hyper Modified;
- Vector Version;
- hyper LocalVersion;
- BlockInfo Blocks<1000000>;
- }
- */
- func (o FileInfo) EncodeXDR(w io.Writer) (int, error) {
- var xw = xdr.NewWriter(w)
- return o.EncodeXDRInto(xw)
- }
- func (o FileInfo) MarshalXDR() ([]byte, error) {
- return o.AppendXDR(make([]byte, 0, 128))
- }
- func (o FileInfo) MustMarshalXDR() []byte {
- bs, err := o.MarshalXDR()
- if err != nil {
- panic(err)
- }
- return bs
- }
- func (o FileInfo) AppendXDR(bs []byte) ([]byte, error) {
- var aw = xdr.AppendWriter(bs)
- var xw = xdr.NewWriter(&aw)
- _, err := o.EncodeXDRInto(xw)
- return []byte(aw), err
- }
- func (o FileInfo) EncodeXDRInto(xw *xdr.Writer) (int, error) {
- if l := len(o.Name); l > 8192 {
- return xw.Tot(), xdr.ElementSizeExceeded("Name", l, 8192)
- }
- xw.WriteString(o.Name)
- xw.WriteUint32(o.Flags)
- xw.WriteUint64(uint64(o.Modified))
- _, err := o.Version.EncodeXDRInto(xw)
- if err != nil {
- return xw.Tot(), err
- }
- xw.WriteUint64(uint64(o.LocalVersion))
- if l := len(o.Blocks); l > 1000000 {
- return xw.Tot(), xdr.ElementSizeExceeded("Blocks", l, 1000000)
- }
- xw.WriteUint32(uint32(len(o.Blocks)))
- for i := range o.Blocks {
- _, err := o.Blocks[i].EncodeXDRInto(xw)
- if err != nil {
- return xw.Tot(), err
- }
- }
- return xw.Tot(), xw.Error()
- }
- func (o *FileInfo) DecodeXDR(r io.Reader) error {
- xr := xdr.NewReader(r)
- return o.DecodeXDRFrom(xr)
- }
- func (o *FileInfo) UnmarshalXDR(bs []byte) error {
- var br = bytes.NewReader(bs)
- var xr = xdr.NewReader(br)
- return o.DecodeXDRFrom(xr)
- }
- func (o *FileInfo) DecodeXDRFrom(xr *xdr.Reader) error {
- o.Name = xr.ReadStringMax(8192)
- o.Flags = xr.ReadUint32()
- o.Modified = int64(xr.ReadUint64())
- (&o.Version).DecodeXDRFrom(xr)
- o.LocalVersion = int64(xr.ReadUint64())
- _BlocksSize := int(xr.ReadUint32())
- if _BlocksSize < 0 {
- return xdr.ElementSizeExceeded("Blocks", _BlocksSize, 1000000)
- }
- if _BlocksSize > 1000000 {
- return xdr.ElementSizeExceeded("Blocks", _BlocksSize, 1000000)
- }
- o.Blocks = make([]BlockInfo, _BlocksSize)
- for i := range o.Blocks {
- (&o.Blocks[i]).DecodeXDRFrom(xr)
- }
- return xr.Error()
- }
- /*
- BlockInfo Structure:
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Size |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Length of Hash |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- / /
- \ Hash (variable length) \
- / /
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- struct BlockInfo {
- int Size;
- opaque Hash<64>;
- }
- */
- func (o BlockInfo) EncodeXDR(w io.Writer) (int, error) {
- var xw = xdr.NewWriter(w)
- return o.EncodeXDRInto(xw)
- }
- func (o BlockInfo) MarshalXDR() ([]byte, error) {
- return o.AppendXDR(make([]byte, 0, 128))
- }
- func (o BlockInfo) MustMarshalXDR() []byte {
- bs, err := o.MarshalXDR()
- if err != nil {
- panic(err)
- }
- return bs
- }
- func (o BlockInfo) AppendXDR(bs []byte) ([]byte, error) {
- var aw = xdr.AppendWriter(bs)
- var xw = xdr.NewWriter(&aw)
- _, err := o.EncodeXDRInto(xw)
- return []byte(aw), err
- }
- func (o BlockInfo) EncodeXDRInto(xw *xdr.Writer) (int, error) {
- xw.WriteUint32(uint32(o.Size))
- if l := len(o.Hash); l > 64 {
- return xw.Tot(), xdr.ElementSizeExceeded("Hash", l, 64)
- }
- xw.WriteBytes(o.Hash)
- return xw.Tot(), xw.Error()
- }
- func (o *BlockInfo) DecodeXDR(r io.Reader) error {
- xr := xdr.NewReader(r)
- return o.DecodeXDRFrom(xr)
- }
- func (o *BlockInfo) UnmarshalXDR(bs []byte) error {
- var br = bytes.NewReader(bs)
- var xr = xdr.NewReader(br)
- return o.DecodeXDRFrom(xr)
- }
- func (o *BlockInfo) DecodeXDRFrom(xr *xdr.Reader) error {
- o.Size = int32(xr.ReadUint32())
- o.Hash = xr.ReadBytesMax(64)
- return xr.Error()
- }
- /*
- RequestMessage Structure:
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Length of Folder |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- / /
- \ Folder (variable length) \
- / /
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Length of Name |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- / /
- \ Name (variable length) \
- / /
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | |
- + Offset (64 bits) +
- | |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Size |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Length of Hash |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- / /
- \ Hash (variable length) \
- / /
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Flags |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Number of Options |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- / /
- \ Zero or more Option Structures \
- / /
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- struct RequestMessage {
- string Folder<256>;
- string Name<8192>;
- hyper Offset;
- int Size;
- opaque Hash<64>;
- unsigned int Flags;
- Option Options<64>;
- }
- */
- func (o RequestMessage) EncodeXDR(w io.Writer) (int, error) {
- var xw = xdr.NewWriter(w)
- return o.EncodeXDRInto(xw)
- }
- func (o RequestMessage) MarshalXDR() ([]byte, error) {
- return o.AppendXDR(make([]byte, 0, 128))
- }
- func (o RequestMessage) MustMarshalXDR() []byte {
- bs, err := o.MarshalXDR()
- if err != nil {
- panic(err)
- }
- return bs
- }
- func (o RequestMessage) AppendXDR(bs []byte) ([]byte, error) {
- var aw = xdr.AppendWriter(bs)
- var xw = xdr.NewWriter(&aw)
- _, err := o.EncodeXDRInto(xw)
- return []byte(aw), err
- }
- func (o RequestMessage) EncodeXDRInto(xw *xdr.Writer) (int, error) {
- if l := len(o.Folder); l > 256 {
- return xw.Tot(), xdr.ElementSizeExceeded("Folder", l, 256)
- }
- xw.WriteString(o.Folder)
- if l := len(o.Name); l > 8192 {
- return xw.Tot(), xdr.ElementSizeExceeded("Name", l, 8192)
- }
- xw.WriteString(o.Name)
- xw.WriteUint64(uint64(o.Offset))
- xw.WriteUint32(uint32(o.Size))
- if l := len(o.Hash); l > 64 {
- return xw.Tot(), xdr.ElementSizeExceeded("Hash", l, 64)
- }
- xw.WriteBytes(o.Hash)
- xw.WriteUint32(o.Flags)
- if l := len(o.Options); l > 64 {
- return xw.Tot(), xdr.ElementSizeExceeded("Options", l, 64)
- }
- xw.WriteUint32(uint32(len(o.Options)))
- for i := range o.Options {
- _, err := o.Options[i].EncodeXDRInto(xw)
- if err != nil {
- return xw.Tot(), err
- }
- }
- return xw.Tot(), xw.Error()
- }
- func (o *RequestMessage) DecodeXDR(r io.Reader) error {
- xr := xdr.NewReader(r)
- return o.DecodeXDRFrom(xr)
- }
- func (o *RequestMessage) UnmarshalXDR(bs []byte) error {
- var br = bytes.NewReader(bs)
- var xr = xdr.NewReader(br)
- return o.DecodeXDRFrom(xr)
- }
- func (o *RequestMessage) DecodeXDRFrom(xr *xdr.Reader) error {
- o.Folder = xr.ReadStringMax(256)
- o.Name = xr.ReadStringMax(8192)
- o.Offset = int64(xr.ReadUint64())
- o.Size = int32(xr.ReadUint32())
- o.Hash = xr.ReadBytesMax(64)
- o.Flags = xr.ReadUint32()
- _OptionsSize := int(xr.ReadUint32())
- if _OptionsSize < 0 {
- return xdr.ElementSizeExceeded("Options", _OptionsSize, 64)
- }
- if _OptionsSize > 64 {
- return xdr.ElementSizeExceeded("Options", _OptionsSize, 64)
- }
- o.Options = make([]Option, _OptionsSize)
- for i := range o.Options {
- (&o.Options[i]).DecodeXDRFrom(xr)
- }
- return xr.Error()
- }
- /*
- ResponseMessage Structure:
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Length of Data |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- / /
- \ Data (variable length) \
- / /
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Code |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- struct ResponseMessage {
- opaque Data<>;
- int Code;
- }
- */
- func (o ResponseMessage) EncodeXDR(w io.Writer) (int, error) {
- var xw = xdr.NewWriter(w)
- return o.EncodeXDRInto(xw)
- }
- func (o ResponseMessage) MarshalXDR() ([]byte, error) {
- return o.AppendXDR(make([]byte, 0, 128))
- }
- func (o ResponseMessage) MustMarshalXDR() []byte {
- bs, err := o.MarshalXDR()
- if err != nil {
- panic(err)
- }
- return bs
- }
- func (o ResponseMessage) AppendXDR(bs []byte) ([]byte, error) {
- var aw = xdr.AppendWriter(bs)
- var xw = xdr.NewWriter(&aw)
- _, err := o.EncodeXDRInto(xw)
- return []byte(aw), err
- }
- func (o ResponseMessage) EncodeXDRInto(xw *xdr.Writer) (int, error) {
- xw.WriteBytes(o.Data)
- xw.WriteUint32(uint32(o.Code))
- return xw.Tot(), xw.Error()
- }
- func (o *ResponseMessage) DecodeXDR(r io.Reader) error {
- xr := xdr.NewReader(r)
- return o.DecodeXDRFrom(xr)
- }
- func (o *ResponseMessage) UnmarshalXDR(bs []byte) error {
- var br = bytes.NewReader(bs)
- var xr = xdr.NewReader(br)
- return o.DecodeXDRFrom(xr)
- }
- func (o *ResponseMessage) DecodeXDRFrom(xr *xdr.Reader) error {
- o.Data = xr.ReadBytes()
- o.Code = int32(xr.ReadUint32())
- return xr.Error()
- }
- /*
- ClusterConfigMessage Structure:
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Length of Device Name |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- / /
- \ Device Name (variable length) \
- / /
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Length of Client Name |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- / /
- \ Client Name (variable length) \
- / /
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Length of Client Version |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- / /
- \ Client Version (variable length) \
- / /
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Number of Folders |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- / /
- \ Zero or more Folder Structures \
- / /
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Number of Options |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- / /
- \ Zero or more Option Structures \
- / /
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- struct ClusterConfigMessage {
- string DeviceName<64>;
- string ClientName<64>;
- string ClientVersion<64>;
- Folder Folders<1000000>;
- Option Options<64>;
- }
- */
- func (o ClusterConfigMessage) EncodeXDR(w io.Writer) (int, error) {
- var xw = xdr.NewWriter(w)
- return o.EncodeXDRInto(xw)
- }
- func (o ClusterConfigMessage) MarshalXDR() ([]byte, error) {
- return o.AppendXDR(make([]byte, 0, 128))
- }
- func (o ClusterConfigMessage) MustMarshalXDR() []byte {
- bs, err := o.MarshalXDR()
- if err != nil {
- panic(err)
- }
- return bs
- }
- func (o ClusterConfigMessage) AppendXDR(bs []byte) ([]byte, error) {
- var aw = xdr.AppendWriter(bs)
- var xw = xdr.NewWriter(&aw)
- _, err := o.EncodeXDRInto(xw)
- return []byte(aw), err
- }
- func (o ClusterConfigMessage) EncodeXDRInto(xw *xdr.Writer) (int, error) {
- if l := len(o.DeviceName); l > 64 {
- return xw.Tot(), xdr.ElementSizeExceeded("DeviceName", l, 64)
- }
- xw.WriteString(o.DeviceName)
- if l := len(o.ClientName); l > 64 {
- return xw.Tot(), xdr.ElementSizeExceeded("ClientName", l, 64)
- }
- xw.WriteString(o.ClientName)
- if l := len(o.ClientVersion); l > 64 {
- return xw.Tot(), xdr.ElementSizeExceeded("ClientVersion", l, 64)
- }
- xw.WriteString(o.ClientVersion)
- if l := len(o.Folders); l > 1000000 {
- return xw.Tot(), xdr.ElementSizeExceeded("Folders", l, 1000000)
- }
- xw.WriteUint32(uint32(len(o.Folders)))
- for i := range o.Folders {
- _, err := o.Folders[i].EncodeXDRInto(xw)
- if err != nil {
- return xw.Tot(), err
- }
- }
- if l := len(o.Options); l > 64 {
- return xw.Tot(), xdr.ElementSizeExceeded("Options", l, 64)
- }
- xw.WriteUint32(uint32(len(o.Options)))
- for i := range o.Options {
- _, err := o.Options[i].EncodeXDRInto(xw)
- if err != nil {
- return xw.Tot(), err
- }
- }
- return xw.Tot(), xw.Error()
- }
- func (o *ClusterConfigMessage) DecodeXDR(r io.Reader) error {
- xr := xdr.NewReader(r)
- return o.DecodeXDRFrom(xr)
- }
- func (o *ClusterConfigMessage) UnmarshalXDR(bs []byte) error {
- var br = bytes.NewReader(bs)
- var xr = xdr.NewReader(br)
- return o.DecodeXDRFrom(xr)
- }
- func (o *ClusterConfigMessage) DecodeXDRFrom(xr *xdr.Reader) error {
- o.DeviceName = xr.ReadStringMax(64)
- o.ClientName = xr.ReadStringMax(64)
- o.ClientVersion = xr.ReadStringMax(64)
- _FoldersSize := int(xr.ReadUint32())
- if _FoldersSize < 0 {
- return xdr.ElementSizeExceeded("Folders", _FoldersSize, 1000000)
- }
- if _FoldersSize > 1000000 {
- return xdr.ElementSizeExceeded("Folders", _FoldersSize, 1000000)
- }
- o.Folders = make([]Folder, _FoldersSize)
- for i := range o.Folders {
- (&o.Folders[i]).DecodeXDRFrom(xr)
- }
- _OptionsSize := int(xr.ReadUint32())
- if _OptionsSize < 0 {
- return xdr.ElementSizeExceeded("Options", _OptionsSize, 64)
- }
- if _OptionsSize > 64 {
- return xdr.ElementSizeExceeded("Options", _OptionsSize, 64)
- }
- o.Options = make([]Option, _OptionsSize)
- for i := range o.Options {
- (&o.Options[i]).DecodeXDRFrom(xr)
- }
- return xr.Error()
- }
- /*
- Folder Structure:
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Length of ID |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- / /
- \ ID (variable length) \
- / /
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Number of Devices |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- / /
- \ Zero or more Device Structures \
- / /
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Flags |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Number of Options |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- / /
- \ Zero or more Option Structures \
- / /
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- struct Folder {
- string ID<256>;
- Device Devices<1000000>;
- unsigned int Flags;
- Option Options<64>;
- }
- */
- func (o Folder) EncodeXDR(w io.Writer) (int, error) {
- var xw = xdr.NewWriter(w)
- return o.EncodeXDRInto(xw)
- }
- func (o Folder) MarshalXDR() ([]byte, error) {
- return o.AppendXDR(make([]byte, 0, 128))
- }
- func (o Folder) MustMarshalXDR() []byte {
- bs, err := o.MarshalXDR()
- if err != nil {
- panic(err)
- }
- return bs
- }
- func (o Folder) AppendXDR(bs []byte) ([]byte, error) {
- var aw = xdr.AppendWriter(bs)
- var xw = xdr.NewWriter(&aw)
- _, err := o.EncodeXDRInto(xw)
- return []byte(aw), err
- }
- func (o Folder) EncodeXDRInto(xw *xdr.Writer) (int, error) {
- if l := len(o.ID); l > 256 {
- return xw.Tot(), xdr.ElementSizeExceeded("ID", l, 256)
- }
- xw.WriteString(o.ID)
- if l := len(o.Devices); l > 1000000 {
- return xw.Tot(), xdr.ElementSizeExceeded("Devices", l, 1000000)
- }
- xw.WriteUint32(uint32(len(o.Devices)))
- for i := range o.Devices {
- _, err := o.Devices[i].EncodeXDRInto(xw)
- if err != nil {
- return xw.Tot(), err
- }
- }
- xw.WriteUint32(o.Flags)
- if l := len(o.Options); l > 64 {
- return xw.Tot(), xdr.ElementSizeExceeded("Options", l, 64)
- }
- xw.WriteUint32(uint32(len(o.Options)))
- for i := range o.Options {
- _, err := o.Options[i].EncodeXDRInto(xw)
- if err != nil {
- return xw.Tot(), err
- }
- }
- return xw.Tot(), xw.Error()
- }
- func (o *Folder) DecodeXDR(r io.Reader) error {
- xr := xdr.NewReader(r)
- return o.DecodeXDRFrom(xr)
- }
- func (o *Folder) UnmarshalXDR(bs []byte) error {
- var br = bytes.NewReader(bs)
- var xr = xdr.NewReader(br)
- return o.DecodeXDRFrom(xr)
- }
- func (o *Folder) DecodeXDRFrom(xr *xdr.Reader) error {
- o.ID = xr.ReadStringMax(256)
- _DevicesSize := int(xr.ReadUint32())
- if _DevicesSize < 0 {
- return xdr.ElementSizeExceeded("Devices", _DevicesSize, 1000000)
- }
- if _DevicesSize > 1000000 {
- return xdr.ElementSizeExceeded("Devices", _DevicesSize, 1000000)
- }
- o.Devices = make([]Device, _DevicesSize)
- for i := range o.Devices {
- (&o.Devices[i]).DecodeXDRFrom(xr)
- }
- o.Flags = xr.ReadUint32()
- _OptionsSize := int(xr.ReadUint32())
- if _OptionsSize < 0 {
- return xdr.ElementSizeExceeded("Options", _OptionsSize, 64)
- }
- if _OptionsSize > 64 {
- return xdr.ElementSizeExceeded("Options", _OptionsSize, 64)
- }
- o.Options = make([]Option, _OptionsSize)
- for i := range o.Options {
- (&o.Options[i]).DecodeXDRFrom(xr)
- }
- return xr.Error()
- }
- /*
- Device Structure:
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Length of ID |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- / /
- \ ID (variable length) \
- / /
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Length of Name |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- / /
- \ Name (variable length) \
- / /
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Number of Addresses |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Length of Addresses |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- / /
- \ Addresses (variable length) \
- / /
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Compression |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Length of Cert Name |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- / /
- \ Cert Name (variable length) \
- / /
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | |
- + Max Local Version (64 bits) +
- | |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Flags |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Number of Options |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- / /
- \ Zero or more Option Structures \
- / /
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- struct Device {
- opaque ID<32>;
- string Name<64>;
- string Addresses<64>;
- unsigned int Compression;
- string CertName<64>;
- hyper MaxLocalVersion;
- unsigned int Flags;
- Option Options<64>;
- }
- */
- func (o Device) EncodeXDR(w io.Writer) (int, error) {
- var xw = xdr.NewWriter(w)
- return o.EncodeXDRInto(xw)
- }
- func (o Device) MarshalXDR() ([]byte, error) {
- return o.AppendXDR(make([]byte, 0, 128))
- }
- func (o Device) MustMarshalXDR() []byte {
- bs, err := o.MarshalXDR()
- if err != nil {
- panic(err)
- }
- return bs
- }
- func (o Device) AppendXDR(bs []byte) ([]byte, error) {
- var aw = xdr.AppendWriter(bs)
- var xw = xdr.NewWriter(&aw)
- _, err := o.EncodeXDRInto(xw)
- return []byte(aw), err
- }
- func (o Device) EncodeXDRInto(xw *xdr.Writer) (int, error) {
- if l := len(o.ID); l > 32 {
- return xw.Tot(), xdr.ElementSizeExceeded("ID", l, 32)
- }
- xw.WriteBytes(o.ID)
- if l := len(o.Name); l > 64 {
- return xw.Tot(), xdr.ElementSizeExceeded("Name", l, 64)
- }
- xw.WriteString(o.Name)
- if l := len(o.Addresses); l > 64 {
- return xw.Tot(), xdr.ElementSizeExceeded("Addresses", l, 64)
- }
- xw.WriteUint32(uint32(len(o.Addresses)))
- for i := range o.Addresses {
- xw.WriteString(o.Addresses[i])
- }
- xw.WriteUint32(o.Compression)
- if l := len(o.CertName); l > 64 {
- return xw.Tot(), xdr.ElementSizeExceeded("CertName", l, 64)
- }
- xw.WriteString(o.CertName)
- xw.WriteUint64(uint64(o.MaxLocalVersion))
- xw.WriteUint32(o.Flags)
- if l := len(o.Options); l > 64 {
- return xw.Tot(), xdr.ElementSizeExceeded("Options", l, 64)
- }
- xw.WriteUint32(uint32(len(o.Options)))
- for i := range o.Options {
- _, err := o.Options[i].EncodeXDRInto(xw)
- if err != nil {
- return xw.Tot(), err
- }
- }
- return xw.Tot(), xw.Error()
- }
- func (o *Device) DecodeXDR(r io.Reader) error {
- xr := xdr.NewReader(r)
- return o.DecodeXDRFrom(xr)
- }
- func (o *Device) UnmarshalXDR(bs []byte) error {
- var br = bytes.NewReader(bs)
- var xr = xdr.NewReader(br)
- return o.DecodeXDRFrom(xr)
- }
- func (o *Device) DecodeXDRFrom(xr *xdr.Reader) error {
- o.ID = xr.ReadBytesMax(32)
- o.Name = xr.ReadStringMax(64)
- _AddressesSize := int(xr.ReadUint32())
- if _AddressesSize < 0 {
- return xdr.ElementSizeExceeded("Addresses", _AddressesSize, 64)
- }
- if _AddressesSize > 64 {
- return xdr.ElementSizeExceeded("Addresses", _AddressesSize, 64)
- }
- o.Addresses = make([]string, _AddressesSize)
- for i := range o.Addresses {
- o.Addresses[i] = xr.ReadStringMax(2083)
- }
- o.Compression = xr.ReadUint32()
- o.CertName = xr.ReadStringMax(64)
- o.MaxLocalVersion = int64(xr.ReadUint64())
- o.Flags = xr.ReadUint32()
- _OptionsSize := int(xr.ReadUint32())
- if _OptionsSize < 0 {
- return xdr.ElementSizeExceeded("Options", _OptionsSize, 64)
- }
- if _OptionsSize > 64 {
- return xdr.ElementSizeExceeded("Options", _OptionsSize, 64)
- }
- o.Options = make([]Option, _OptionsSize)
- for i := range o.Options {
- (&o.Options[i]).DecodeXDRFrom(xr)
- }
- return xr.Error()
- }
- /*
- Option Structure:
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Length of Key |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- / /
- \ Key (variable length) \
- / /
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Length of Value |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- / /
- \ Value (variable length) \
- / /
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- struct Option {
- string Key<64>;
- string Value<1024>;
- }
- */
- func (o Option) EncodeXDR(w io.Writer) (int, error) {
- var xw = xdr.NewWriter(w)
- return o.EncodeXDRInto(xw)
- }
- func (o Option) MarshalXDR() ([]byte, error) {
- return o.AppendXDR(make([]byte, 0, 128))
- }
- func (o Option) MustMarshalXDR() []byte {
- bs, err := o.MarshalXDR()
- if err != nil {
- panic(err)
- }
- return bs
- }
- func (o Option) AppendXDR(bs []byte) ([]byte, error) {
- var aw = xdr.AppendWriter(bs)
- var xw = xdr.NewWriter(&aw)
- _, err := o.EncodeXDRInto(xw)
- return []byte(aw), err
- }
- func (o Option) EncodeXDRInto(xw *xdr.Writer) (int, error) {
- if l := len(o.Key); l > 64 {
- return xw.Tot(), xdr.ElementSizeExceeded("Key", l, 64)
- }
- xw.WriteString(o.Key)
- if l := len(o.Value); l > 1024 {
- return xw.Tot(), xdr.ElementSizeExceeded("Value", l, 1024)
- }
- xw.WriteString(o.Value)
- return xw.Tot(), xw.Error()
- }
- func (o *Option) DecodeXDR(r io.Reader) error {
- xr := xdr.NewReader(r)
- return o.DecodeXDRFrom(xr)
- }
- func (o *Option) UnmarshalXDR(bs []byte) error {
- var br = bytes.NewReader(bs)
- var xr = xdr.NewReader(br)
- return o.DecodeXDRFrom(xr)
- }
- func (o *Option) DecodeXDRFrom(xr *xdr.Reader) error {
- o.Key = xr.ReadStringMax(64)
- o.Value = xr.ReadStringMax(1024)
- return xr.Error()
- }
- /*
- CloseMessage Structure:
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Length of Reason |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- / /
- \ Reason (variable length) \
- / /
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Code |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- struct CloseMessage {
- string Reason<1024>;
- int Code;
- }
- */
- func (o CloseMessage) EncodeXDR(w io.Writer) (int, error) {
- var xw = xdr.NewWriter(w)
- return o.EncodeXDRInto(xw)
- }
- func (o CloseMessage) MarshalXDR() ([]byte, error) {
- return o.AppendXDR(make([]byte, 0, 128))
- }
- func (o CloseMessage) MustMarshalXDR() []byte {
- bs, err := o.MarshalXDR()
- if err != nil {
- panic(err)
- }
- return bs
- }
- func (o CloseMessage) AppendXDR(bs []byte) ([]byte, error) {
- var aw = xdr.AppendWriter(bs)
- var xw = xdr.NewWriter(&aw)
- _, err := o.EncodeXDRInto(xw)
- return []byte(aw), err
- }
- func (o CloseMessage) EncodeXDRInto(xw *xdr.Writer) (int, error) {
- if l := len(o.Reason); l > 1024 {
- return xw.Tot(), xdr.ElementSizeExceeded("Reason", l, 1024)
- }
- xw.WriteString(o.Reason)
- xw.WriteUint32(uint32(o.Code))
- return xw.Tot(), xw.Error()
- }
- func (o *CloseMessage) DecodeXDR(r io.Reader) error {
- xr := xdr.NewReader(r)
- return o.DecodeXDRFrom(xr)
- }
- func (o *CloseMessage) UnmarshalXDR(bs []byte) error {
- var br = bytes.NewReader(bs)
- var xr = xdr.NewReader(br)
- return o.DecodeXDRFrom(xr)
- }
- func (o *CloseMessage) DecodeXDRFrom(xr *xdr.Reader) error {
- o.Reason = xr.ReadStringMax(1024)
- o.Code = int32(xr.ReadUint32())
- return xr.Error()
- }
- /*
- EmptyMessage Structure:
- (contains no fields)
- struct EmptyMessage {
- }
- */
- func (o EmptyMessage) EncodeXDR(w io.Writer) (int, error) {
- return 0, nil
- }
- func (o EmptyMessage) MarshalXDR() ([]byte, error) {
- return nil, nil
- }
- func (o EmptyMessage) MustMarshalXDR() []byte {
- return nil
- }
- func (o EmptyMessage) AppendXDR(bs []byte) ([]byte, error) {
- return bs, nil
- }
- func (o EmptyMessage) EncodeXDRInto(xw *xdr.Writer) (int, error) {
- return xw.Tot(), xw.Error()
- }
- func (o *EmptyMessage) DecodeXDR(r io.Reader) error {
- return nil
- }
- func (o *EmptyMessage) UnmarshalXDR(bs []byte) error {
- return nil
- }
- func (o *EmptyMessage) DecodeXDRFrom(xr *xdr.Reader) error {
- return xr.Error()
- }
|