本文整理汇总了Golang中github.com/bcgraham/tsumtsum/external/thrift.TProtocol.WriteI64方法的典型用法代码示例。如果您正苦于以下问题:Golang TProtocol.WriteI64方法的具体用法?Golang TProtocol.WriteI64怎么用?Golang TProtocol.WriteI64使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/bcgraham/tsumtsum/external/thrift.TProtocol
的用法示例。
在下文中一共展示了TProtocol.WriteI64方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: writeField2
func (p *FetchMessageOperationsArgs) writeField2(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("localRevision", thrift.I64, 2); err != nil {
return fmt.Errorf("%T write field begin error 2:localRevision: %s", p, err)
}
if err := oprot.WriteI64(int64(p.LocalRevision)); err != nil {
return fmt.Errorf("%T.localRevision (2) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 2:localRevision: %s", p, err)
}
return err
}
示例2: writeField3
func (p *FetchMessageOperationsArgs) writeField3(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("lastOpTimestamp", thrift.I64, 3); err != nil {
return fmt.Errorf("%T write field begin error 3:lastOpTimestamp: %s", p, err)
}
if err := oprot.WriteI64(int64(p.LastOpTimestamp)); err != nil {
return fmt.Errorf("%T.lastOpTimestamp (3) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 3:lastOpTimestamp: %s", p, err)
}
return err
}
示例3: writeField0
func (p *GetLastOpRevisionResult) writeField0(oprot thrift.TProtocol) (err error) {
if p.IsSetSuccess() {
if err := oprot.WriteFieldBegin("success", thrift.I64, 0); err != nil {
return fmt.Errorf("%T write field begin error 0:success: %s", p, err)
}
if err := oprot.WriteI64(int64(*p.Success)); err != nil {
return fmt.Errorf("%T.success (0) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 0:success: %s", p, err)
}
}
return err
}