예제 #1
0
func (p *Span) writeField5(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("parentId", thrift.STRING, 5); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:parentId: ", p), err)
	}
	if err := oprot.WriteBinary(p.ParentId); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.parentId (5) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 5:parentId: ", p), err)
	}
	return err
}
예제 #2
0
func (p *BinaryAnnotation) writeField2(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("value", thrift.STRING, 2); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:value: ", p), err)
	}
	if err := oprot.WriteBinary(p.Value); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.value (2) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 2:value: ", p), err)
	}
	return err
}
예제 #3
0
func (p *Span) writeField4(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("id", thrift.STRING, 4); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:id: ", p), err)
	}
	if err := oprot.WriteBinary(p.ID); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.id (4) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 4:id: ", p), err)
	}
	return err
}
예제 #4
0
func (p *Span) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("traceId", thrift.STRING, 1); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:traceId: ", p), err)
	}
	if err := oprot.WriteBinary(p.TraceId); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.traceId (1) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 1:traceId: ", p), err)
	}
	return err
}
예제 #5
0
func (p *Span) writeField4(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("id", thrift.STRING, 4); err != nil {
		return fmt.Errorf("%T write field begin error 4:id: %s", p, err)
	}
	if err := oprot.WriteBinary(p.Id); err != nil {
		return fmt.Errorf("%T.id (4) field write error: %s", p, err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 4:id: %s", p, err)
	}
	return err
}
예제 #6
0
func (p *BinaryAnnotation) writeField5(oprot thrift.TProtocol) (err error) {
	if p.IsSetBytesValue() {
		if err := oprot.WriteFieldBegin("bytesValue", thrift.STRING, 5); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:bytesValue: ", p), err)
		}
		if err := oprot.WriteBinary(p.BytesValue); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T.bytesValue (5) field write error: ", p), err)
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field end error 5:bytesValue: ", p), err)
		}
	}
	return err
}
예제 #7
0
파일: ttypes.go 프로젝트: akaspin/bar
func (p *Spec) writeField3(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("blobs", thrift.MAP, 3); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:blobs: ", p), err)
	}
	if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.Blobs)); err != nil {
		return thrift.PrependError("error writing map begin: ", err)
	}
	for k, v := range p.Blobs {
		if err := oprot.WriteString(string(k)); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err)
		}
		if err := oprot.WriteBinary(v); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err)
		}
	}
	if err := oprot.WriteMapEnd(); err != nil {
		return thrift.PrependError("error writing map end: ", err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 3:blobs: ", p), err)
	}
	return err
}