本文整理汇总了Golang中git/apache/org/thrift/git/lib/go/thrift.TProtocol.WriteI64方法的典型用法代码示例。如果您正苦于以下问题:Golang TProtocol.WriteI64方法的具体用法?Golang TProtocol.WriteI64怎么用?Golang TProtocol.WriteI64使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类git/apache/org/thrift/git/lib/go/thrift.TProtocol
的用法示例。
在下文中一共展示了TProtocol.WriteI64方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: writeField1
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
}
示例2: writeField2
func (p *BoltProcessTimerArgs) writeField2(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("time", thrift.I64, 2); err != nil {
return fmt.Errorf("%T write field begin error 2:time: %s", p, err)
}
if err := oprot.WriteI64(int64(p.Time)); err != nil {
return fmt.Errorf("%T.time (2) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 2:time: %s", p, err)
}
return err
}
示例3: writeField1
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
}
示例4: writeField3
func (p *GetPrivateMessageListArgs) writeField3(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("endReceiveTime", thrift.I64, 3); err != nil {
return fmt.Errorf("%T write field begin error 3:endReceiveTime: %s", p, err)
}
if err := oprot.WriteI64(int64(p.EndReceiveTime)); err != nil {
return fmt.Errorf("%T.endReceiveTime (3) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 3:endReceiveTime: %s", p, err)
}
return err
}
示例5: writeField2
func (p *DeleteResourceViewHistoryArgs) writeField2(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("viewTime", thrift.I64, 2); err != nil {
return fmt.Errorf("%T write field begin error 2:viewTime: %s", p, err)
}
if err := oprot.WriteI64(int64(p.ViewTime)); err != nil {
return fmt.Errorf("%T.viewTime (2) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 2:viewTime: %s", p, err)
}
return err
}
示例6: writeField2
func (p *DadoTransporteThrift) writeField2(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("tipoDadoSerializado", thrift.I64, 2); err != nil {
return fmt.Errorf("%T write field begin error 2:tipoDadoSerializado: %s", p, err)
}
if err := oprot.WriteI64(int64(p.TipoDadoSerializado)); err != nil {
return fmt.Errorf("%T.tipoDadoSerializado (2) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 2:tipoDadoSerializado: %s", p, err)
}
return err
}
示例7: writeField1
func (p *AuditLogEntry) writeField1(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("id", thrift.I64, 1); err != nil {
return fmt.Errorf("%T write field begin error 1:id: %s", p, err)
}
if err := oprot.WriteI64(int64(p.Id)); err != nil {
return fmt.Errorf("%T.id (1) field write error: %s", p)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 1:id: %s", p, err)
}
return err
}
示例8: writeField1
func (p *Person) writeField1(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("ID", thrift.I64, 1); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:ID: ", p), err)
}
if err := oprot.WriteI64(int64(p.ID)); err != nil {
return thrift.PrependError(fmt.Sprintf("%T.ID (1) field write error: ", p), err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 1:ID: ", p), err)
}
return err
}
示例9: writeField1
func (p *GetComplaintsArgs) writeField1(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("startCreateTime", thrift.I64, 1); err != nil {
return fmt.Errorf("%T write field begin error 1:startCreateTime: %s", p, err)
}
if err := oprot.WriteI64(int64(p.StartCreateTime)); err != nil {
return fmt.Errorf("%T.startCreateTime (1) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 1:startCreateTime: %s", p, err)
}
return err
}
示例10: writeField2
func (p *UpdateComplaintArgs) writeField2(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("mask", thrift.I64, 2); err != nil {
return fmt.Errorf("%T write field begin error 2:mask: %s", p, err)
}
if err := oprot.WriteI64(int64(p.Mask)); err != nil {
return fmt.Errorf("%T.mask (2) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 2:mask: %s", p, err)
}
return err
}
示例11: writeField3
func (p *GetGroupMessagesArgs) writeField3(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("startMid", thrift.I64, 3); err != nil {
return fmt.Errorf("%T write field begin error 3:startMid: %s", p, err)
}
if err := oprot.WriteI64(int64(p.StartMid)); err != nil {
return fmt.Errorf("%T.startMid (3) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 3:startMid: %s", p, err)
}
return err
}
示例12: writeField2
func (p *GetGroupMessagesArgs) writeField2(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("startDeliverTime", thrift.I64, 2); err != nil {
return fmt.Errorf("%T write field begin error 2:startDeliverTime: %s", p, err)
}
if err := oprot.WriteI64(int64(p.StartDeliverTime)); err != nil {
return fmt.Errorf("%T.startDeliverTime (2) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 2:startDeliverTime: %s", p, err)
}
return err
}
示例13: writeField1
func (p *SignalArgs) writeField1(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("topologyId", thrift.I64, 1); err != nil {
return fmt.Errorf("%T write field begin error 1:topologyId: %s", p, err)
}
if err := oprot.WriteI64(int64(p.TopologyId)); err != nil {
return fmt.Errorf("%T.topologyId (1) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 1:topologyId: %s", p, err)
}
return err
}
示例14: writeField1
func (p *RpcServiceFunCallArgs) writeField1(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("callTime", thrift.I64, 1); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:callTime: ", p), err)
}
if err := oprot.WriteI64(int64(p.CallTime)); err != nil {
return thrift.PrependError(fmt.Sprintf("%T.callTime (1) field write error: ", p), err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 1:callTime: ", p), err)
}
return err
}
示例15: writeField1
func (p *DestroyArgs) writeField1(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("user_id", thrift.I64, 1); err != nil {
return fmt.Errorf("%T write field begin error 1:user_id: %s", p, err)
}
if err := oprot.WriteI64(int64(p.UserId)); err != nil {
return fmt.Errorf("%T.user_id (1) field write error: %s", p)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 1:user_id: %s", p, err)
}
return err
}