示例#1
0
func (p *Types) writeField9(oprot thrift.TProtocol) (err error) {
	if p.IsSetMapValue() {
		if err := oprot.WriteFieldBegin("map_value", thrift.MAP, 9); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field begin error 9:map_value: ", p), err)
		}
		if err := oprot.WriteMapBegin(thrift.STRING, thrift.I32, len(p.MapValue)); err != nil {
			return thrift.PrependError("error writing map begin: ", err)
		}
		for k, v := range p.MapValue {
			if err := oprot.WriteString(string(k)); err != nil {
				return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err)
			}
			if err := oprot.WriteI32(int32(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 9:map_value: ", p), err)
		}
	}
	return err
}
示例#2
0
func (p *FunCallArgs) writeField3(oprot thrift.TProtocol) (err error) {
	if p.ParamMap != nil {
		if err := oprot.WriteFieldBegin("paramMap", thrift.MAP, 3); err != nil {
			return fmt.Errorf("%T write field begin error 3:paramMap: %s", p, err)
		}
		if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.ParamMap)); err != nil {
			return fmt.Errorf("error writing map begin: %s")
		}
		for k, v := range p.ParamMap {
			if err := oprot.WriteString(string(k)); err != nil {
				return fmt.Errorf("%T. (0) field write error: %s", p)
			}
			if err := oprot.WriteString(string(v)); err != nil {
				return fmt.Errorf("%T. (0) field write error: %s", p)
			}
		}
		if err := oprot.WriteMapEnd(); err != nil {
			return fmt.Errorf("error writing map end: %s")
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return fmt.Errorf("%T write field end error 3:paramMap: %s", p, err)
		}
	}
	return err
}
示例#3
0
func (p *NoStdJson) writeField1(oprot thrift.TProtocol) (err error) {
	if p.IsSetOne() {
		if err := oprot.WriteFieldBegin("one", thrift.MAP, 1); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:one: ", p), err)
		}
		if err := oprot.WriteMapBegin(thrift.I64, thrift.STRING, len(p.One)); err != nil {
			return thrift.PrependError("error writing map begin: ", err)
		}
		for k, v := range p.One {
			if err := oprot.WriteI64(int64(k)); err != nil {
				return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err)
			}
			if err := oprot.WriteString(string(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 1:one: ", p), err)
		}
	}
	return err
}
示例#4
0
func (p *ThriftFlumeEvent) writeField1(oprot thrift.TProtocol) (err error) {
	if p.Headers != nil {
		if err := oprot.WriteFieldBegin("headers", thrift.MAP, 1); err != nil {
			return fmt.Errorf("%T write field begin error 1:headers: %s", p, err)
		}
		if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.Headers)); err != nil {
			return fmt.Errorf("error writing map begin: %s")
		}
		for k, v := range p.Headers {
			if err := oprot.WriteString(string(k)); err != nil {
				return fmt.Errorf("%T. (0) field write error: %s", p)
			}
			if err := oprot.WriteString(string(v)); err != nil {
				return fmt.Errorf("%T. (0) field write error: %s", p)
			}
		}
		if err := oprot.WriteMapEnd(); err != nil {
			return fmt.Errorf("error writing map end: %s")
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return fmt.Errorf("%T write field end error 1:headers: %s", p, err)
		}
	}
	return err
}
示例#5
0
func (p *Result) writeField2(oprot thrift.TProtocol) (err error) {
	if p.Palette != nil {
		if err := oprot.WriteFieldBegin("palette", thrift.MAP, 2); err != nil {
			return fmt.Errorf("%T write field begin error 2:palette: %s", p, err)
		}
		if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRUCT, len(p.Palette)); err != nil {
			return fmt.Errorf("error writing map begin: %s")
		}
		for k, v := range p.Palette {
			if err := oprot.WriteString(string(k)); err != nil {
				return fmt.Errorf("%T. (0) field write error: %s", p)
			}
			if err := v.Write(oprot); err != nil {
				return fmt.Errorf("%T error writing struct: %s", v)
			}
		}
		if err := oprot.WriteMapEnd(); err != nil {
			return fmt.Errorf("error writing map end: %s")
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return fmt.Errorf("%T write field end error 2:palette: %s", p, err)
		}
	}
	return err
}
示例#6
0
func (p *Entry) writeField5(oprot thrift.TProtocol) (err error) {
	if p.IsSetFields() {
		if err := oprot.WriteFieldBegin("fields", thrift.MAP, 5); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:fields: ", p), err)
		}
		if err := oprot.WriteMapBegin(thrift.STRING, thrift.STRING, len(p.Fields)); err != nil {
			return thrift.PrependError("error writing map begin: ", err)
		}
		for k, v := range p.Fields {
			if err := oprot.WriteString(string(k)); err != nil {
				return thrift.PrependError(fmt.Sprintf("%T. (0) field write error: ", p), err)
			}
			if err := oprot.WriteString(string(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 5:fields: ", p), err)
		}
	}
	return err
}
func (p *GetLockArgs) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("calendarName", thrift.STRING, 1); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:calendarName: ", p), err)
	}
	if err := oprot.WriteString(string(p.CalendarName)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.calendarName (1) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 1:calendarName: ", p), err)
	}
	return err
}
示例#8
0
func (p *CreateArgs) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("contact", thrift.STRUCT, 1); err != nil {
		return fmt.Errorf("%T write field begin error 1:contact: %s", p, err)
	}
	if err := p.Contact.Write(oprot); err != nil {
		return fmt.Errorf("%T error writing struct: %s", p.Contact, err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 1:contact: %s", p, err)
	}
	return err
}
示例#9
0
func (p *SendShortMsgArgs) writeField3(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("zone", thrift.STRING, 3); err != nil {
		return fmt.Errorf("%T write field begin error 3:zone: %s", p, err)
	}
	if err := oprot.WriteString(string(p.Zone)); err != nil {
		return fmt.Errorf("%T.zone (3) field write error: %s", p, err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 3:zone: %s", p, err)
	}
	return err
}
示例#10
0
func (p *SendShortMsgArgs) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("phoneNumber", thrift.STRING, 1); err != nil {
		return fmt.Errorf("%T write field begin error 1:phoneNumber: %s", p, err)
	}
	if err := oprot.WriteString(string(p.PhoneNumber)); err != nil {
		return fmt.Errorf("%T.phoneNumber (1) field write error: %s", p, err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 1:phoneNumber: %s", p, err)
	}
	return err
}
示例#11
0
func (p *UpdateStatusArgs) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("key", thrift.STRING, 1); err != nil {
		return fmt.Errorf("%T write field begin error 1:key: %s", p, err)
	}
	if err := oprot.WriteString(string(p.Key)); err != nil {
		return fmt.Errorf("%T.key (1) field write error: %s", p, err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 1:key: %s", p, err)
	}
	return err
}
示例#12
0
文件: ttypes.go 项目: jinhy/rpc_proxy
func (p *RpcException) writeField2(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("msg", thrift.STRING, 2); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:msg: ", p), err)
	}
	if err := oprot.WriteString(string(p.Msg)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.msg (2) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 2:msg: ", p), err)
	}
	return err
}
示例#13
0
func (p *Work) writeField3(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("op", thrift.I32, 3); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:op: ", p), err)
	}
	if err := oprot.WriteI32(int32(p.Op)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.op (3) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 3:op: ", p), err)
	}
	return err
}
示例#14
0
func (p *Work) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("num1", thrift.I32, 1); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:num1: ", p), err)
	}
	if err := oprot.WriteI32(int32(p.Num1)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.num1 (1) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 1:num1: ", p), err)
	}
	return err
}
示例#15
0
func (p *GetPrivateMessageListArgs) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("uid", thrift.I64, 1); err != nil {
		return fmt.Errorf("%T write field begin error 1:uid: %s", p, err)
	}
	if err := oprot.WriteI64(int64(p.Uid)); err != nil {
		return fmt.Errorf("%T.uid (1) field write error: %s", p, err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 1:uid: %s", p, err)
	}
	return err
}
示例#16
0
func (p *AddPrivateMessageArgs) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("privateMessage", thrift.STRUCT, 1); err != nil {
		return fmt.Errorf("%T write field begin error 1:privateMessage: %s", p, err)
	}
	if err := p.PrivateMessage.Write(oprot); err != nil {
		return fmt.Errorf("%T error writing struct: %s", p.PrivateMessage, err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 1:privateMessage: %s", p, err)
	}
	return err
}
示例#17
0
文件: ttypes.go 项目: jinhy/rpc_proxy
func (p *RpcException) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("code", thrift.I32, 1); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err)
	}
	if err := oprot.WriteI32(int32(p.Code)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.code (1) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err)
	}
	return err
}
示例#18
0
func (p *InvalidOperation) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("whatOp", thrift.I32, 1); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:whatOp: ", p), err)
	}
	if err := oprot.WriteI32(int32(p.WhatOp)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.whatOp (1) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 1:whatOp: ", p), err)
	}
	return err
}
示例#19
0
func (p *RpcServiceAddArgs) writeField2(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("num2", thrift.I32, 2); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:num2: ", p), err)
	}
	if err := oprot.WriteI32(int32(p.Num2)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.num2 (2) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 2:num2: ", p), err)
	}
	return err
}
示例#20
0
func (p *InvalidOperation) writeField2(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("why", thrift.STRING, 2); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:why: ", p), err)
	}
	if err := oprot.WriteString(string(p.Why)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.why (2) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 2:why: ", p), err)
	}
	return err
}
示例#21
0
func (p *UpdateStatusArgs) writeField3(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("updateType", thrift.I32, 3); err != nil {
		return fmt.Errorf("%T write field begin error 3:updateType: %s", p, err)
	}
	if err := oprot.WriteI32(int32(p.UpdateType)); err != nil {
		return fmt.Errorf("%T.updateType (3) field write error: %s", p, err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 3:updateType: %s", p, err)
	}
	return err
}
示例#22
0
func (p *ColorCount) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("total", thrift.I64, 1); err != nil {
		return fmt.Errorf("%T write field begin error 1:total: %s", p, err)
	}
	if err := oprot.WriteI64(int64(p.Total)); err != nil {
		return fmt.Errorf("%T.total (1) field write error: %s", p)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 1:total: %s", p, err)
	}
	return err
}
示例#23
0
func (p *SendShortMsgArgs) writeField2(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("content", thrift.STRING, 2); err != nil {
		return fmt.Errorf("%T write field begin error 2:content: %s", p, err)
	}
	if err := oprot.WriteString(string(p.Content)); err != nil {
		return fmt.Errorf("%T.content (2) field write error: %s", p, err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 2:content: %s", p, err)
	}
	return err
}
示例#24
0
func (p *ColorCount) writeField2(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("percentage", thrift.DOUBLE, 2); err != nil {
		return fmt.Errorf("%T write field begin error 2:percentage: %s", p, err)
	}
	if err := oprot.WriteDouble(float64(p.Percentage)); err != nil {
		return fmt.Errorf("%T.percentage (2) field write error: %s", p)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 2:percentage: %s", p, err)
	}
	return err
}
示例#25
0
func (p *DestroyArgs) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("contactId", thrift.STRING, 1); err != nil {
		return fmt.Errorf("%T write field begin error 1:contactId: %s", p, err)
	}
	if err := oprot.WriteString(string(p.ContactId)); err != nil {
		return fmt.Errorf("%T.contactId (1) field write error: %s", p, err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 1:contactId: %s", p, err)
	}
	return err
}
示例#26
0
func (p *ColorMeta) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("baseColor", thrift.STRING, 1); err != nil {
		return fmt.Errorf("%T write field begin error 1:baseColor: %s", p, err)
	}
	if err := oprot.WriteString(string(p.BaseColor)); err != nil {
		return fmt.Errorf("%T.baseColor (1) field write error: %s", p)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 1:baseColor: %s", p, err)
	}
	return err
}
func (p *PuttoFrontArgs) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("msg", thrift.STRUCT, 1); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:msg: ", p), err)
	}
	if err := p.Msg.Write(oprot); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Msg), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 1:msg: ", p), err)
	}
	return err
}
示例#28
0
func (p *ColorMeta) writeField3(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("search_factor", thrift.DOUBLE, 3); err != nil {
		return fmt.Errorf("%T write field begin error 3:search_factor: %s", p, err)
	}
	if err := oprot.WriteDouble(float64(p.SearchFactor)); err != nil {
		return fmt.Errorf("%T.search_factor (3) field write error: %s", p)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 3:search_factor: %s", p, err)
	}
	return err
}
func (p *SharedServiceGetStructArgs) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("key", thrift.I32, 1); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:key: ", p), err)
	}
	if err := oprot.WriteI32(int32(p.Key)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.key (1) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 1:key: ", p), err)
	}
	return err
}
示例#30
0
func (p *ColorMeta) writeField4(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("distance", thrift.DOUBLE, 4); err != nil {
		return fmt.Errorf("%T write field begin error 4:distance: %s", p, err)
	}
	if err := oprot.WriteDouble(float64(p.Distance)); err != nil {
		return fmt.Errorf("%T.distance (4) field write error: %s", p)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 4:distance: %s", p, err)
	}
	return err
}