Пример #1
0
func (p *Manymaps) readField6(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	_ktype70, _vtype71, _size69, err := iprot.ReadMapBegin()
	if err != nil {
		return thrift.NewTProtocolExceptionReadField(-1, "p.Binarstructymap", "", err)
	}
	_, _ = _ktype70, _vtype71
	p.Binarstructymap = make(map[string]*Intstruct, _size69)
	for i := 0; i < _size69; i++ {
		v76, err77 := iprot.ReadString()
		if err77 != nil {
			return thrift.NewTProtocolExceptionReadField(0, "_key74", "", err77)
		}
		_key74 := v76
		_val75 := NewIntstruct()
		err80 := _val75.Read(iprot)
		if err80 != nil {
			return thrift.NewTProtocolExceptionReadStruct("_val75intstruct", err80)
		}
		p.Binarstructymap[_key74] = _val75
	}
	err = iprot.ReadMapEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionReadField(-1, "", "map", err)
	}
	return err
}
Пример #2
0
func (p *Manylists) readField6(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	_etype62, _size59, err := iprot.ReadListBegin()
	if err != nil {
		return thrift.NewTProtocolExceptionReadField(-1, "p.Listoflist", "", err)
	}
	_ = _etype62
	p.Listoflist = make([][]int32, _size59, _size59)
	for i := 0; i < _size59; i++ {
		_etype70, _size67, err := iprot.ReadListBegin()
		if err != nil {
			return thrift.NewTProtocolExceptionReadField(-1, "_elem64", "", err)
		}
		_ = _etype70
		_elem64 := make([]int32, _size67, _size67)
		for i := 0; i < _size67; i++ {
			v73, err74 := iprot.ReadI32()
			if err74 != nil {
				return thrift.NewTProtocolExceptionReadField(0, "_elem72", "", err74)
			}
			_elem72 := v73
			_elem64[i] = _elem72
		}
		err = iprot.ReadListEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionReadField(-1, "", "list", err)
		}
		p.Listoflist[i] = _elem64
	}
	err = iprot.ReadListEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionReadField(-1, "", "list", err)
	}
	return err
}
Пример #3
0
func (p *Manymaps) readField5(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	_ktype57, _vtype58, _size56, err := iprot.ReadMapBegin()
	if err != nil {
		return thrift.NewTProtocolExceptionReadField(-1, "p.Binarymap", "", err)
	}
	_, _ = _ktype57, _vtype58
	p.Binarymap = make(map[string]string, _size56)
	for i := 0; i < _size56; i++ {
		v63, err64 := iprot.ReadString()
		if err64 != nil {
			return thrift.NewTProtocolExceptionReadField(0, "_key61", "", err64)
		}
		_key61 := v63
		v65, err66 := iprot.ReadString()
		if err66 != nil {
			return thrift.NewTProtocolExceptionReadField(0, "_val62", "", err66)
		}
		_val62 := v65
		p.Binarymap[_key61] = _val62
	}
	err = iprot.ReadMapEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionReadField(-1, "", "map", err)
	}
	return err
}
Пример #4
0
func (p *MyMethodResult) Read(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	_, err = iprot.ReadStructBegin()
	if err != nil {
		return thrift.NewTProtocolExceptionReadStruct(p.ThriftName(), err)
	}
	for {
		fieldName, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
		if fieldId < 0 {
			fieldId = int16(tstructMyMethodResult.FieldIdFromFieldName(fieldName))
			fieldTypeId = tstructMyMethodResult.FieldFromFieldName(fieldName).TypeId()
		}
		if err != nil {
			return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
		}
		if fieldTypeId == thrift.STOP {
			break
		}
		switch fieldId {
		default:
			err = iprot.Skip(fieldTypeId)
			if err != nil {
				return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
			}
		} //switch
		err = iprot.ReadFieldEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
		}
	}
	err = iprot.ReadStructEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionReadStruct(p.ThriftName(), err)
	}
	return err
}
Пример #5
0
func (p *Manymaps) readField4(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	_ktype44, _vtype45, _size43, err := iprot.ReadMapBegin()
	if err != nil {
		return thrift.NewTProtocolExceptionReadField(-1, "p.Stringmap", "", err)
	}
	_, _ = _ktype44, _vtype45
	p.Stringmap = make(map[string]string, _size43)
	for i := 0; i < _size43; i++ {
		v50, err51 := iprot.ReadString()
		if err51 != nil {
			return thrift.NewTProtocolExceptionReadField(0, "_key48", "", err51)
		}
		_key48 := v50
		v52, err53 := iprot.ReadString()
		if err53 != nil {
			return thrift.NewTProtocolExceptionReadField(0, "_val49", "", err53)
		}
		_val49 := v52
		p.Stringmap[_key48] = _val49
	}
	err = iprot.ReadMapEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionReadField(-1, "", "map", err)
	}
	return err
}
Пример #6
0
func (p *Manymaps) readField2(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	_ktype18, _vtype19, _size17, err := iprot.ReadMapBegin()
	if err != nil {
		return thrift.NewTProtocolExceptionReadField(-1, "p.I16map", "", err)
	}
	_, _ = _ktype18, _vtype19
	p.I16map = make(map[int16]string, _size17)
	for i := 0; i < _size17; i++ {
		v24, err25 := iprot.ReadI16()
		if err25 != nil {
			return thrift.NewTProtocolExceptionReadField(0, "_key22", "", err25)
		}
		_key22 := v24
		v26, err27 := iprot.ReadString()
		if err27 != nil {
			return thrift.NewTProtocolExceptionReadField(0, "_val23", "", err27)
		}
		_val23 := v26
		p.I16map[_key22] = _val23
	}
	err = iprot.ReadMapEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionReadField(-1, "", "map", err)
	}
	return err
}
Пример #7
0
func (p *Manymaps) readField3(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	_ktype31, _vtype32, _size30, err := iprot.ReadMapBegin()
	if err != nil {
		return thrift.NewTProtocolExceptionReadField(-1, "p.I32map", "", err)
	}
	_, _ = _ktype31, _vtype32
	p.I32map = make(map[int32]string, _size30)
	for i := 0; i < _size30; i++ {
		v37, err38 := iprot.ReadI32()
		if err38 != nil {
			return thrift.NewTProtocolExceptionReadField(0, "_key35", "", err38)
		}
		_key35 := v37
		v39, err40 := iprot.ReadString()
		if err40 != nil {
			return thrift.NewTProtocolExceptionReadField(0, "_val36", "", err40)
		}
		_val36 := v39
		p.I32map[_key35] = _val36
	}
	err = iprot.ReadMapEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionReadField(-1, "", "map", err)
	}
	return err
}
Пример #8
0
func (p *Manymaps) readField1(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	_ktype5, _vtype6, _size4, err := iprot.ReadMapBegin()
	if err != nil {
		return thrift.NewTProtocolExceptionReadField(-1, "p.Bytemap", "", err)
	}
	_, _ = _ktype5, _vtype6
	p.Bytemap = make(map[int8]string, _size4)
	for i := 0; i < _size4; i++ {
		v11, err12 := iprot.ReadByte()
		if err12 != nil {
			return thrift.NewTProtocolExceptionReadField(0, "_key9", "", err12)
		}
		_key9 := v11
		v13, err14 := iprot.ReadString()
		if err14 != nil {
			return thrift.NewTProtocolExceptionReadField(0, "_val10", "", err14)
		}
		_val10 := v13
		p.Bytemap[_key9] = _val10
	}
	err = iprot.ReadMapEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionReadField(-1, "", "map", err)
	}
	return err
}
Пример #9
0
func (p *Ping) Read(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	_, err = iprot.ReadStructBegin()
	if err != nil {
		return thrift.NewTProtocolExceptionReadStruct(p.ThriftName(), err)
	}
	for {
		fieldName, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
		if fieldId < 0 {
			fieldId = int16(tstructPing.FieldIdFromFieldName(fieldName))
			fieldTypeId = tstructPing.FieldFromFieldName(fieldName).TypeId()
		}
		if err != nil {
			return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
		}
		if fieldTypeId == thrift.STOP {
			break
		}
		switch fieldId {
		case 1: //i32
			if fieldTypeId == thrift.I32 {
				err = p.readField1(iprot)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			} else {
				err = iprot.Skip(fieldTypeId)
				if err != nil {
					return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
				}
			}
		default:
			err = iprot.Skip(fieldTypeId)
			if err != nil {
				return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
			}
		} //switch
		err = iprot.ReadFieldEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionReadField(int(fieldId), fieldName, p.ThriftName(), err)
		}
	}
	err = iprot.ReadStructEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionReadStruct(p.ThriftName(), err)
	}
	return err
}
Пример #10
0
func (p *MyMethodArgs) readField2(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v1123, err1124 := iprot.ReadI32()
	if err1124 != nil {
		return thrift.NewTProtocolExceptionReadField(2, "third", p.ThriftName(), err1124)
	}
	p.Third = v1123
	return err
}
Пример #11
0
func (p *MyMethodArgs) readField3(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v1121, err1122 := iprot.ReadI16()
	if err1122 != nil {
		return thrift.NewTProtocolExceptionReadField(3, "second", p.ThriftName(), err1122)
	}
	p.Second = v1121
	return err
}
Пример #12
0
func (p *MyMethodArgs) readField4(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v1119, err1120 := iprot.ReadString()
	if err1120 != nil {
		return thrift.NewTProtocolExceptionReadField(4, "first", p.ThriftName(), err1120)
	}
	p.First = v1119
	return err
}
Пример #13
0
func (p *Intstruct) readField1(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v0, err1 := iprot.ReadI32()
	if err1 != nil {
		return thrift.NewTProtocolExceptionReadField(1, "ifield", p.ThriftName(), err1)
	}
	p.Ifield = v0
	return err
}
Пример #14
0
func (p *MulArgs) readField2(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v21, err22 := iprot.ReadI32()
	if err22 != nil {
		return thrift.NewTProtocolExceptionReadField(2, "num2", p.ThriftName(), err22)
	}
	p.Num2 = v21
	return err
}
Пример #15
0
func (p *CalculateArgs) readField1(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v48, err49 := iprot.ReadI32()
	if err49 != nil {
		return thrift.NewTProtocolExceptionReadField(1, "logid", p.ThriftName(), err49)
	}
	p.Logid = v48
	return err
}
Пример #16
0
func (p *AddArgs) readField1(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v42, err43 := iprot.ReadI32()
	if err43 != nil {
		return thrift.NewTProtocolExceptionReadField(1, "num1", p.ThriftName(), err43)
	}
	p.Num1 = v42
	return err
}
Пример #17
0
func (p *AddResult) readField0(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v46, err47 := iprot.ReadI32()
	if err47 != nil {
		return thrift.NewTProtocolExceptionReadField(0, "success", p.ThriftName(), err47)
	}
	p.Success = v46
	return err
}
Пример #18
0
func (p *AddArgs) readField2(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v44, err45 := iprot.ReadI32()
	if err45 != nil {
		return thrift.NewTProtocolExceptionReadField(2, "num2", p.ThriftName(), err45)
	}
	p.Num2 = v44
	return err
}
Пример #19
0
func (p *MyMethodArgs) readField1(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v1125, err1126 := iprot.ReadI64()
	if err1126 != nil {
		return thrift.NewTProtocolExceptionReadField(1, "fourth", p.ThriftName(), err1126)
	}
	p.Fourth = v1125
	return err
}
Пример #20
0
func (p *Work) readField1(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v0, err1 := iprot.ReadI32()
	if err1 != nil {
		return thrift.NewTProtocolExceptionReadField(1, "num1", p.ThriftName(), err1)
	}
	p.Num1 = v0
	return err
}
Пример #21
0
func (p *Work) readField3(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v4, err5 := iprot.ReadI32()
	if err5 != nil {
		return thrift.NewTProtocolExceptionReadField(3, "op", p.ThriftName(), err5)
	}
	p.Op = Operation(v4)
	return err
}
Пример #22
0
func (p *CalculateResult) readField0(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v53, err54 := iprot.ReadI32()
	if err54 != nil {
		return thrift.NewTProtocolExceptionReadField(0, "success", p.ThriftName(), err54)
	}
	p.Success = v53
	return err
}
Пример #23
0
func (p *Ping) readField1(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v0, err1 := iprot.ReadI32()
	if err1 != nil {
		return thrift.NewTProtocolExceptionReadField(1, "timestamp", p.ThriftName(), err1)
	}
	p.Timestamp = v0
	return err
}
Пример #24
0
func (p *InvalidOperation) readField1(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v8, err9 := iprot.ReadI32()
	if err9 != nil {
		return thrift.NewTProtocolExceptionReadField(1, "what", p.ThriftName(), err9)
	}
	p.What = v8
	return err
}
Пример #25
0
func (p *Work) readField2(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v2, err3 := iprot.ReadI32()
	if err3 != nil {
		return thrift.NewTProtocolExceptionReadField(2, "num2", p.ThriftName(), err3)
	}
	p.Num2 = v2
	return err
}
Пример #26
0
func (p *MulResult) readField0(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v23, err24 := iprot.ReadI32()
	if err24 != nil {
		return thrift.NewTProtocolExceptionReadField(0, "success", p.ThriftName(), err24)
	}
	p.Success = v23
	return err
}
Пример #27
0
func (p *Work) readField4(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v6, err7 := iprot.ReadString()
	if err7 != nil {
		return thrift.NewTProtocolExceptionReadField(4, "comment", p.ThriftName(), err7)
	}
	p.Comment = v6
	return err
}
Пример #28
0
func (p *Manylists) readField7(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v75, err76 := iprot.ReadI32()
	if err76 != nil {
		return thrift.NewTProtocolExceptionReadField(7, "optionalint", p.ThriftName(), err76)
	}
	p.Optionalint = v75
	return err
}
Пример #29
0
func (p *InvalidOperation) readField2(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v10, err11 := iprot.ReadString()
	if err11 != nil {
		return thrift.NewTProtocolExceptionReadField(2, "why", p.ThriftName(), err11)
	}
	p.Why = v10
	return err
}
Пример #30
0
func (p *MulArgs) readField1(iprot thrift.TProtocol) (err thrift.TProtocolException) {
	v19, err20 := iprot.ReadI32()
	if err20 != nil {
		return thrift.NewTProtocolExceptionReadField(1, "num1", p.ThriftName(), err20)
	}
	p.Num1 = v19
	return err
}