本文整理匯總了Golang中github.com/bcgraham/tsumtsum/external/thrift.TProtocol.WriteI32方法的典型用法代碼示例。如果您正苦於以下問題:Golang TProtocol.WriteI32方法的具體用法?Golang TProtocol.WriteI32怎麽用?Golang TProtocol.WriteI32使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/bcgraham/tsumtsum/external/thrift.TProtocol
的用法示例。
在下文中一共展示了TProtocol.WriteI32方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: writeField3
func (p *GetMessageBoxCompactWrapUpListArgs) writeField3(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("messageBoxCount", thrift.I32, 3); err != nil {
return fmt.Errorf("%T write field begin error 3:messageBoxCount: %s", p, err)
}
if err := oprot.WriteI32(int32(p.MessageBoxCount)); err != nil {
return fmt.Errorf("%T.messageBoxCount (3) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 3:messageBoxCount: %s", p, err)
}
return err
}
示例2: writeField2
func (p *GetMessageBoxCompactWrapUpListArgs) writeField2(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("start", thrift.I32, 2); err != nil {
return fmt.Errorf("%T write field begin error 2:start: %s", p, err)
}
if err := oprot.WriteI32(int32(p.Start)); err != nil {
return fmt.Errorf("%T.start (2) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 2:start: %s", p, err)
}
return err
}
示例3: writeField4
func (p *FetchMessageOperationsArgs) writeField4(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("count", thrift.I32, 4); err != nil {
return fmt.Errorf("%T write field begin error 4:count: %s", p, err)
}
if err := oprot.WriteI32(int32(p.Count)); err != nil {
return fmt.Errorf("%T.count (4) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 4:count: %s", p, err)
}
return err
}
示例4: writeField1
func (p *FindAndAddContactsByUseridArgs) writeField1(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("reqSeq", thrift.I32, 1); err != nil {
return fmt.Errorf("%T write field begin error 1:reqSeq: %s", p, err)
}
if err := oprot.WriteI32(int32(p.ReqSeq)); err != nil {
return fmt.Errorf("%T.reqSeq (1) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 1:reqSeq: %s", p, err)
}
return err
}
示例5: writeField8
func (p *LoginWithIdentityCredentialForCertificateArgs) writeField8(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("identityProvider", thrift.I32, 8); err != nil {
return fmt.Errorf("%T write field begin error 8:identityProvider: %s", p, err)
}
if err := oprot.WriteI32(int32(p.IdentityProvider)); err != nil {
return fmt.Errorf("%T.identityProvider (8) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 8:identityProvider: %s", p, err)
}
return err
}