コード例 #1
0
ファイル: ttypes.go プロジェクト: mohanarpit/goh
func (p *Manymaps) writeField5(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	if p.Binarymap != nil {
		err = oprot.WriteFieldBegin("binarymap", thrift.MAP, 5)
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(5, "binarymap", p.ThriftName(), err)
		}
		err = oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.Binarymap))
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(-1, "", "map", err)
		}
		for Kiter89, Viter90 := range p.Binarymap {
			err = oprot.WriteString(Kiter89)
			if err != nil {
				return thrift.NewTProtocolExceptionWriteField(0, "Kiter89", "", err)
			}
			err = oprot.WriteString(Viter90)
			if err != nil {
				return thrift.NewTProtocolExceptionWriteField(0, "Viter90", "", err)
			}
		}
		err = oprot.WriteMapEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(-1, "", "map", err)
		}
		err = oprot.WriteFieldEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(5, "binarymap", p.ThriftName(), err)
		}
	}
	return err
}
コード例 #2
0
ファイル: ttypes.go プロジェクト: mohanarpit/goh
func (p *Manylists) writeField1(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	if p.Bytelist != nil {
		err = oprot.WriteFieldBegin("bytelist", thrift.LIST, 1)
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(1, "bytelist", p.ThriftName(), err)
		}
		err = oprot.WriteListBegin(thrift.BYTE, len(p.Bytelist))
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(-1, "", "list", err)
		}
		for _, Iter77 := range p.Bytelist {
			err = oprot.WriteByte(int8(Iter77))
			if err != nil {
				return thrift.NewTProtocolExceptionWriteField(0, "Iter77", "", err)
			}
		}
		err = oprot.WriteListEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(-1, "", "list", err)
		}
		err = oprot.WriteFieldEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(1, "bytelist", p.ThriftName(), err)
		}
	}
	return err
}
コード例 #3
0
ファイル: ttypes.go プロジェクト: mohanarpit/goh
func (p *Manymaps) writeField6(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	if p.Binarstructymap != nil {
		err = oprot.WriteFieldBegin("binarstructymap", thrift.MAP, 6)
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(6, "binarstructymap", p.ThriftName(), err)
		}
		err = oprot.WriteMapBegin(thrift.STRING, thrift.STRUCT, len(p.Binarstructymap))
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(-1, "", "map", err)
		}
		for Kiter91, Viter92 := range p.Binarstructymap {
			err = oprot.WriteString(Kiter91)
			if err != nil {
				return thrift.NewTProtocolExceptionWriteField(0, "Kiter91", "", err)
			}
			err = Viter92.Write(oprot)
			if err != nil {
				return thrift.NewTProtocolExceptionWriteStruct("intstruct", err)
			}
		}
		err = oprot.WriteMapEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(-1, "", "map", err)
		}
		err = oprot.WriteFieldEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(6, "binarstructymap", p.ThriftName(), err)
		}
	}
	return err
}
コード例 #4
0
ファイル: ttypes.go プロジェクト: mohanarpit/goh
func (p *Manymaps) writeField3(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	if p.I32map != nil {
		err = oprot.WriteFieldBegin("i32map", thrift.MAP, 3)
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(3, "i32map", p.ThriftName(), err)
		}
		err = oprot.WriteMapBegin(thrift.I32, thrift.STRING, len(p.I32map))
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(-1, "", "map", err)
		}
		for Kiter85, Viter86 := range p.I32map {
			err = oprot.WriteI32(int32(Kiter85))
			if err != nil {
				return thrift.NewTProtocolExceptionWriteField(0, "Kiter85", "", err)
			}
			err = oprot.WriteString(Viter86)
			if err != nil {
				return thrift.NewTProtocolExceptionWriteField(0, "Viter86", "", err)
			}
		}
		err = oprot.WriteMapEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(-1, "", "map", err)
		}
		err = oprot.WriteFieldEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(3, "i32map", p.ThriftName(), err)
		}
	}
	return err
}
コード例 #5
0
ファイル: ttypes.go プロジェクト: mohanarpit/goh
func (p *Manymaps) writeField4(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	if p.Stringmap != nil {
		err = oprot.WriteFieldBegin("stringmap", thrift.MAP, 4)
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(4, "stringmap", p.ThriftName(), err)
		}
		err = oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.Stringmap))
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(-1, "", "map", err)
		}
		for Kiter87, Viter88 := range p.Stringmap {
			err = oprot.WriteString(Kiter87)
			if err != nil {
				return thrift.NewTProtocolExceptionWriteField(0, "Kiter87", "", err)
			}
			err = oprot.WriteString(Viter88)
			if err != nil {
				return thrift.NewTProtocolExceptionWriteField(0, "Viter88", "", err)
			}
		}
		err = oprot.WriteMapEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(-1, "", "map", err)
		}
		err = oprot.WriteFieldEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(4, "stringmap", p.ThriftName(), err)
		}
	}
	return err
}
コード例 #6
0
ファイル: ttypes.go プロジェクト: mohanarpit/goh
func (p *Manymaps) writeField1(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	if p.Bytemap != nil {
		err = oprot.WriteFieldBegin("bytemap", thrift.MAP, 1)
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(1, "bytemap", p.ThriftName(), err)
		}
		err = oprot.WriteMapBegin(thrift.BYTE, thrift.STRING, len(p.Bytemap))
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(-1, "", "map", err)
		}
		for Kiter81, Viter82 := range p.Bytemap {
			err = oprot.WriteByte(int8(Kiter81))
			if err != nil {
				return thrift.NewTProtocolExceptionWriteField(0, "Kiter81", "", err)
			}
			err = oprot.WriteString(Viter82)
			if err != nil {
				return thrift.NewTProtocolExceptionWriteField(0, "Viter82", "", err)
			}
		}
		err = oprot.WriteMapEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(-1, "", "map", err)
		}
		err = oprot.WriteFieldEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(1, "bytemap", p.ThriftName(), err)
		}
	}
	return err
}
コード例 #7
0
ファイル: ttypes.go プロジェクト: mohanarpit/goh
func (p *Manymaps) writeField2(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	if p.I16map != nil {
		if p.IsSetI16map() {
			err = oprot.WriteFieldBegin("i16map", thrift.MAP, 2)
			if err != nil {
				return thrift.NewTProtocolExceptionWriteField(2, "i16map", p.ThriftName(), err)
			}
			err = oprot.WriteMapBegin(thrift.I16, thrift.STRING, len(p.I16map))
			if err != nil {
				return thrift.NewTProtocolExceptionWriteField(-1, "", "map", err)
			}
			for Kiter83, Viter84 := range p.I16map {
				err = oprot.WriteI16(int16(Kiter83))
				if err != nil {
					return thrift.NewTProtocolExceptionWriteField(0, "Kiter83", "", err)
				}
				err = oprot.WriteString(Viter84)
				if err != nil {
					return thrift.NewTProtocolExceptionWriteField(0, "Viter84", "", err)
				}
			}
			err = oprot.WriteMapEnd()
			if err != nil {
				return thrift.NewTProtocolExceptionWriteField(-1, "", "map", err)
			}
			err = oprot.WriteFieldEnd()
			if err != nil {
				return thrift.NewTProtocolExceptionWriteField(2, "i16map", p.ThriftName(), err)
			}
		}
	}
	return err
}
コード例 #8
0
ファイル: ttypes.go プロジェクト: mohanarpit/goh
func (p *Manylists) writeField4(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	if p.Stringlist != nil {
		err = oprot.WriteFieldBegin("stringlist", thrift.LIST, 4)
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(4, "stringlist", p.ThriftName(), err)
		}
		err = oprot.WriteListBegin(thrift.STRING, len(p.Stringlist))
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(-1, "", "list", err)
		}
		for _, Iter80 := range p.Stringlist {
			err = oprot.WriteString(Iter80)
			if err != nil {
				return thrift.NewTProtocolExceptionWriteField(0, "Iter80", "", err)
			}
		}
		err = oprot.WriteListEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(-1, "", "list", err)
		}
		err = oprot.WriteFieldEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(4, "stringlist", p.ThriftName(), err)
		}
	}
	return err
}
コード例 #9
0
ファイル: ttypes.go プロジェクト: mohanarpit/goh
func (p *Manylists) writeField5(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	if p.Structlist != nil {
		err = oprot.WriteFieldBegin("structlist", thrift.LIST, 5)
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(5, "structlist", p.ThriftName(), err)
		}
		err = oprot.WriteListBegin(thrift.STRUCT, len(p.Structlist))
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(-1, "", "list", err)
		}
		for _, Iter81 := range p.Structlist {
			err = Iter81.Write(oprot)
			if err != nil {
				return thrift.NewTProtocolExceptionWriteStruct("intstruct", err)
			}
		}
		err = oprot.WriteListEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(-1, "", "list", err)
		}
		err = oprot.WriteFieldEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(5, "structlist", p.ThriftName(), err)
		}
	}
	return err
}
コード例 #10
0
ファイル: ttypes.go プロジェクト: mohanarpit/goh
func (p *Manylists) writeField3(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	if p.I32list != nil {
		err = oprot.WriteFieldBegin("i32list", thrift.LIST, 3)
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(3, "i32list", p.ThriftName(), err)
		}
		err = oprot.WriteListBegin(thrift.I32, len(p.I32list))
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(-1, "", "list", err)
		}
		for _, Iter79 := range p.I32list {
			err = oprot.WriteI32(int32(Iter79))
			if err != nil {
				return thrift.NewTProtocolExceptionWriteField(0, "Iter79", "", err)
			}
		}
		err = oprot.WriteListEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(-1, "", "list", err)
		}
		err = oprot.WriteFieldEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(3, "i32list", p.ThriftName(), err)
		}
	}
	return err
}
コード例 #11
0
ファイル: ttypes.go プロジェクト: mohanarpit/goh
func (p *Manylists) writeField2(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	if p.I16list != nil {
		if p.IsSetI16list() {
			err = oprot.WriteFieldBegin("i16list", thrift.LIST, 2)
			if err != nil {
				return thrift.NewTProtocolExceptionWriteField(2, "i16list", p.ThriftName(), err)
			}
			err = oprot.WriteListBegin(thrift.I16, len(p.I16list))
			if err != nil {
				return thrift.NewTProtocolExceptionWriteField(-1, "", "list", err)
			}
			for _, Iter78 := range p.I16list {
				err = oprot.WriteI16(int16(Iter78))
				if err != nil {
					return thrift.NewTProtocolExceptionWriteField(0, "Iter78", "", err)
				}
			}
			err = oprot.WriteListEnd()
			if err != nil {
				return thrift.NewTProtocolExceptionWriteField(-1, "", "list", err)
			}
			err = oprot.WriteFieldEnd()
			if err != nil {
				return thrift.NewTProtocolExceptionWriteField(2, "i16list", p.ThriftName(), err)
			}
		}
	}
	return err
}
コード例 #12
0
ファイル: ttypes.go プロジェクト: mohanarpit/goh
func (p *Intstruct) writeField1(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	err = oprot.WriteFieldBegin("ifield", thrift.I32, 1)
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(1, "ifield", p.ThriftName(), err)
	}
	err = oprot.WriteI32(int32(p.Ifield))
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(1, "ifield", p.ThriftName(), err)
	}
	err = oprot.WriteFieldEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(1, "ifield", p.ThriftName(), err)
	}
	return err
}
コード例 #13
0
ファイル: Calculator.go プロジェクト: mohanarpit/goh
func (p *AddArgs) writeField1(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	err = oprot.WriteFieldBegin("num1", thrift.I32, 1)
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(1, "num1", p.ThriftName(), err)
	}
	err = oprot.WriteI32(int32(p.Num1))
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(1, "num1", p.ThriftName(), err)
	}
	err = oprot.WriteFieldEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(1, "num1", p.ThriftName(), err)
	}
	return err
}
コード例 #14
0
ファイル: Calculator.go プロジェクト: mohanarpit/goh
func (p *CalculateResult) writeField0(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	err = oprot.WriteFieldBegin("success", thrift.I32, 0)
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(0, "success", p.ThriftName(), err)
	}
	err = oprot.WriteI32(int32(p.Success))
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(0, "success", p.ThriftName(), err)
	}
	err = oprot.WriteFieldEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(0, "success", p.ThriftName(), err)
	}
	return err
}
コード例 #15
0
ファイル: Calculator.go プロジェクト: mohanarpit/goh
func (p *CalculateArgs) writeField1(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	err = oprot.WriteFieldBegin("logid", thrift.I32, 1)
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(1, "logid", p.ThriftName(), err)
	}
	err = oprot.WriteI32(int32(p.Logid))
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(1, "logid", p.ThriftName(), err)
	}
	err = oprot.WriteFieldEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(1, "logid", p.ThriftName(), err)
	}
	return err
}
コード例 #16
0
ファイル: ttypes.go プロジェクト: mohanarpit/goh
func (p *InvalidOperation) writeField2(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	err = oprot.WriteFieldBegin("why", thrift.STRING, 2)
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(2, "why", p.ThriftName(), err)
	}
	err = oprot.WriteString(p.Why)
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(2, "why", p.ThriftName(), err)
	}
	err = oprot.WriteFieldEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(2, "why", p.ThriftName(), err)
	}
	return err
}
コード例 #17
0
ファイル: ttypes.go プロジェクト: mohanarpit/goh
func (p *Work) writeField2(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	err = oprot.WriteFieldBegin("num2", thrift.I32, 2)
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(2, "num2", p.ThriftName(), err)
	}
	err = oprot.WriteI32(int32(p.Num2))
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(2, "num2", p.ThriftName(), err)
	}
	err = oprot.WriteFieldEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(2, "num2", p.ThriftName(), err)
	}
	return err
}
コード例 #18
0
ファイル: ttypes.go プロジェクト: mohanarpit/goh
func (p *InvalidOperation) writeField1(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	err = oprot.WriteFieldBegin("what", thrift.I32, 1)
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(1, "what", p.ThriftName(), err)
	}
	err = oprot.WriteI32(int32(p.What))
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(1, "what", p.ThriftName(), err)
	}
	err = oprot.WriteFieldEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(1, "what", p.ThriftName(), err)
	}
	return err
}
コード例 #19
0
ファイル: ReverseOrderService.go プロジェクト: mohanarpit/goh
func (p *MyMethodArgs) writeField4(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	err = oprot.WriteFieldBegin("first", thrift.STRING, 4)
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(4, "first", p.ThriftName(), err)
	}
	err = oprot.WriteString(p.First)
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(4, "first", p.ThriftName(), err)
	}
	err = oprot.WriteFieldEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(4, "first", p.ThriftName(), err)
	}
	return err
}
コード例 #20
0
ファイル: ttypes.go プロジェクト: Digaku/ansvia-lessons
func (p *Ping) writeField1(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	err = oprot.WriteFieldBegin("timestamp", thrift.I32, 1)
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(1, "timestamp", p.ThriftName(), err)
	}
	err = oprot.WriteI32(int32(p.Timestamp))
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(1, "timestamp", p.ThriftName(), err)
	}
	err = oprot.WriteFieldEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(1, "timestamp", p.ThriftName(), err)
	}
	return err
}
コード例 #21
0
ファイル: ReverseOrderService.go プロジェクト: mohanarpit/goh
func (p *MyMethodArgs) writeField2(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	err = oprot.WriteFieldBegin("third", thrift.I32, 2)
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(2, "third", p.ThriftName(), err)
	}
	err = oprot.WriteI32(int32(p.Third))
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(2, "third", p.ThriftName(), err)
	}
	err = oprot.WriteFieldEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(2, "third", p.ThriftName(), err)
	}
	return err
}
コード例 #22
0
ファイル: ReverseOrderService.go プロジェクト: mohanarpit/goh
func (p *MyMethodArgs) writeField3(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	err = oprot.WriteFieldBegin("second", thrift.I16, 3)
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(3, "second", p.ThriftName(), err)
	}
	err = oprot.WriteI16(int16(p.Second))
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(3, "second", p.ThriftName(), err)
	}
	err = oprot.WriteFieldEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(3, "second", p.ThriftName(), err)
	}
	return err
}
コード例 #23
0
ファイル: ReverseOrderService.go プロジェクト: mohanarpit/goh
func (p *MyMethodArgs) writeField1(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	err = oprot.WriteFieldBegin("fourth", thrift.I64, 1)
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(1, "fourth", p.ThriftName(), err)
	}
	err = oprot.WriteI64(int64(p.Fourth))
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(1, "fourth", p.ThriftName(), err)
	}
	err = oprot.WriteFieldEnd()
	if err != nil {
		return thrift.NewTProtocolExceptionWriteField(1, "fourth", p.ThriftName(), err)
	}
	return err
}
コード例 #24
0
func (p *MethodThatThrowsAnExceptionResult) writeField1(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	if p.Xwamap != nil {
		err = oprot.WriteFieldBegin("xwamap", thrift.STRUCT, 1)
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(1, "xwamap", p.ThriftName(), err)
		}
		err = p.Xwamap.Write(oprot)
		if err != nil {
			return thrift.NewTProtocolExceptionWriteStruct("ExceptionWithAMap", err)
		}
		err = oprot.WriteFieldEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(1, "xwamap", p.ThriftName(), err)
		}
	}
	return err
}
コード例 #25
0
ファイル: ttypes.go プロジェクト: mohanarpit/goh
func (p *Work) writeField4(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	if p.IsSetComment() {
		err = oprot.WriteFieldBegin("comment", thrift.STRING, 4)
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(4, "comment", p.ThriftName(), err)
		}
		err = oprot.WriteString(p.Comment)
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(4, "comment", p.ThriftName(), err)
		}
		err = oprot.WriteFieldEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(4, "comment", p.ThriftName(), err)
		}
	}
	return err
}
コード例 #26
0
ファイル: ttypes.go プロジェクト: mohanarpit/goh
func (p *Work) writeField3(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	if p.IsSetOp() {
		err = oprot.WriteFieldBegin("op", thrift.I32, 3)
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(3, "op", p.ThriftName(), err)
		}
		err = oprot.WriteI32(int32(p.Op))
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(3, "op", p.ThriftName(), err)
		}
		err = oprot.WriteFieldEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(3, "op", p.ThriftName(), err)
		}
	}
	return err
}
コード例 #27
0
ファイル: ttypes.go プロジェクト: mohanarpit/goh
func (p *Manylists) writeField7(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	if p.IsSetOptionalint() {
		err = oprot.WriteFieldBegin("optionalint", thrift.I32, 7)
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(7, "optionalint", p.ThriftName(), err)
		}
		err = oprot.WriteI32(int32(p.Optionalint))
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(7, "optionalint", p.ThriftName(), err)
		}
		err = oprot.WriteFieldEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(7, "optionalint", p.ThriftName(), err)
		}
	}
	return err
}
コード例 #28
0
ファイル: Calculator.go プロジェクト: mohanarpit/goh
func (p *CalculateArgs) writeField2(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	if p.W != nil {
		err = oprot.WriteFieldBegin("w", thrift.STRUCT, 2)
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(2, "w", p.ThriftName(), err)
		}
		err = p.W.Write(oprot)
		if err != nil {
			return thrift.NewTProtocolExceptionWriteStruct("Work", err)
		}
		err = oprot.WriteFieldEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(2, "w", p.ThriftName(), err)
		}
	}
	return err
}
コード例 #29
0
ファイル: Calculator.go プロジェクト: mohanarpit/goh
func (p *CalculateResult) writeField1(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	if p.Ouch != nil {
		err = oprot.WriteFieldBegin("ouch", thrift.STRUCT, 1)
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(1, "ouch", p.ThriftName(), err)
		}
		err = p.Ouch.Write(oprot)
		if err != nil {
			return thrift.NewTProtocolExceptionWriteStruct("InvalidOperation", err)
		}
		err = oprot.WriteFieldEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(1, "ouch", p.ThriftName(), err)
		}
	}
	return err
}
コード例 #30
0
func (p *PingArgs) writeField1(oprot thrift.TProtocol) (err thrift.TProtocolException) {
	if p.Ts != nil {
		err = oprot.WriteFieldBegin("ts", thrift.STRUCT, 1)
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(1, "ts", p.ThriftName(), err)
		}
		err = p.Ts.Write(oprot)
		if err != nil {
			return thrift.NewTProtocolExceptionWriteStruct("Ping", err)
		}
		err = oprot.WriteFieldEnd()
		if err != nil {
			return thrift.NewTProtocolExceptionWriteField(1, "ts", p.ThriftName(), err)
		}
	}
	return err
}