本文整理汇总了Golang中github.com/apache/thrift/lib/go/thrift.TProtocol.WriteStructBegin方法的典型用法代码示例。如果您正苦于以下问题:Golang TProtocol.WriteStructBegin方法的具体用法?Golang TProtocol.WriteStructBegin怎么用?Golang TProtocol.WriteStructBegin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/apache/thrift/lib/go/thrift.TProtocol
的用法示例。
在下文中一共展示了TProtocol.WriteStructBegin方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: Write
func (p *BinaryAnnotation) Write(oprot thrift.TProtocol) error {
if err := oprot.WriteStructBegin("BinaryAnnotation"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
}
if err := p.writeField1(oprot); err != nil {
return err
}
if err := p.writeField2(oprot); err != nil {
return err
}
if err := p.writeField3(oprot); err != nil {
return err
}
if err := p.writeField4(oprot); err != nil {
return err
}
if err := p.writeField5(oprot); err != nil {
return err
}
if err := p.writeField6(oprot); err != nil {
return err
}
if err := p.writeField7(oprot); err != nil {
return err
}
if err := oprot.WriteFieldStop(); err != nil {
return thrift.PrependError("write field stop error: ", err)
}
if err := oprot.WriteStructEnd(); err != nil {
return thrift.PrependError("write struct stop error: ", err)
}
return nil
}
示例2: Write
func (p *Moments) Write(oprot thrift.TProtocol) error {
if err := oprot.WriteStructBegin("Moments"); err != nil {
return fmt.Errorf("%T write struct begin error: %s", p, err)
}
if err := p.writeField1(oprot); err != nil {
return err
}
if err := p.writeField2(oprot); err != nil {
return err
}
if err := p.writeField3(oprot); err != nil {
return err
}
if err := p.writeField4(oprot); err != nil {
return err
}
if err := p.writeField5(oprot); err != nil {
return err
}
if err := oprot.WriteFieldStop(); err != nil {
return fmt.Errorf("write field stop error: %s", err)
}
if err := oprot.WriteStructEnd(); err != nil {
return fmt.Errorf("write struct stop error: %s", err)
}
return nil
}
示例3: Write
func (p *FirstAppErrorResult) Write(oprot thrift.TProtocol) error {
if err := oprot.WriteStructBegin("AppError_result"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
}
if err := oprot.WriteFieldStop(); err != nil {
return thrift.PrependError("write field stop error: ", err)
}
if err := oprot.WriteStructEnd(); err != nil {
return thrift.PrependError("write struct stop error: ", err)
}
return nil
}
示例4: Write
func (p *SecondServiceBlahBlahArgs) Write(oprot thrift.TProtocol) error {
if err := oprot.WriteStructBegin("blahBlah_args"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
}
if err := oprot.WriteFieldStop(); err != nil {
return thrift.PrependError("write field stop error: ", err)
}
if err := oprot.WriteStructEnd(); err != nil {
return thrift.PrependError("write struct stop error: ", err)
}
return nil
}
示例5: Write
func (p *MetaVersionInfoArgs) Write(oprot thrift.TProtocol) error {
if err := oprot.WriteStructBegin("versionInfo_args"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
}
if err := oprot.WriteFieldStop(); err != nil {
return thrift.PrependError("write field stop error: ", err)
}
if err := oprot.WriteStructEnd(); err != nil {
return thrift.PrependError("write struct stop error: ", err)
}
return nil
}
示例6: Write
func (p *TestResult) Write(oprot thrift.TProtocol) error {
if err := oprot.WriteStructBegin("Test_result"); err != nil {
return fmt.Errorf("%T write struct begin error: %s", p, err)
}
if err := oprot.WriteFieldStop(); err != nil {
return fmt.Errorf("write field stop error: %s", err)
}
if err := oprot.WriteStructEnd(); err != nil {
return fmt.Errorf("write struct stop error: %s", err)
}
return nil
}
示例7: Write
func (p *NotAuthorized) Write(oprot thrift.TProtocol) error {
if err := oprot.WriteStructBegin("NotAuthorized"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
}
if err := oprot.WriteFieldStop(); err != nil {
return thrift.PrependError("write field stop error: ", err)
}
if err := oprot.WriteStructEnd(); err != nil {
return thrift.PrependError("write struct stop error: ", err)
}
return nil
}
示例8: Write
func (p *SimpleArgs) Write(oprot thrift.TProtocol) error {
if err := oprot.WriteStructBegin("Simple_args"); err != nil {
return fmt.Errorf("%T write struct begin error: %s", p, err)
}
if err := oprot.WriteFieldStop(); err != nil {
return fmt.Errorf("write field stop error: %s", err)
}
if err := oprot.WriteStructEnd(); err != nil {
return fmt.Errorf("write struct stop error: %s", err)
}
return nil
}
示例9: Write
func (p *NotAuthorized) Write(oprot thrift.TProtocol) error {
if err := oprot.WriteStructBegin("NotAuthorized"); err != nil {
return fmt.Errorf("%T write struct begin error: %s", p, err)
}
if err := oprot.WriteFieldStop(); err != nil {
return fmt.Errorf("write field stop error: %s", err)
}
if err := oprot.WriteStructEnd(); err != nil {
return fmt.Errorf("write struct stop error: %s", err)
}
return nil
}
示例10: Write
func (p *MultiSubmitArgs) Write(oprot thrift.TProtocol) error {
if err := oprot.WriteStructBegin("multi_submit_args"); err != nil {
return fmt.Errorf("%T write struct begin error: %s", p, err)
}
if err := p.writeField1(oprot); err != nil {
return err
}
if err := oprot.WriteFieldStop(); err != nil {
return fmt.Errorf("write field stop error: %s", err)
}
if err := oprot.WriteStructEnd(); err != nil {
return fmt.Errorf("write struct stop error: %s", err)
}
return nil
}
示例11: Write
func (p *StoreDependenciesArgs) Write(oprot thrift.TProtocol) error {
if err := oprot.WriteStructBegin("storeDependencies_args"); err != nil {
return fmt.Errorf("%T write struct begin error: %s", p, err)
}
if err := p.writeField1(oprot); err != nil {
return err
}
if err := oprot.WriteFieldStop(); err != nil {
return fmt.Errorf("write field stop error: %s", err)
}
if err := oprot.WriteStructEnd(); err != nil {
return fmt.Errorf("write struct stop error: %s", err)
}
return nil
}
示例12: Write
func (p *TCollectorMultiSubmitResult) Write(oprot thrift.TProtocol) error {
if err := oprot.WriteStructBegin("multi_submit_result"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
}
if err := p.writeField0(oprot); err != nil {
return err
}
if err := oprot.WriteFieldStop(); err != nil {
return thrift.PrependError("write field stop error: ", err)
}
if err := oprot.WriteStructEnd(); err != nil {
return thrift.PrependError("write struct stop error: ", err)
}
return nil
}
示例13: Write
func (p *ConcatReply) Write(oprot thrift.TProtocol) error {
if err := oprot.WriteStructBegin("ConcatReply"); err != nil {
return fmt.Errorf("%T write struct begin error: %s", p, err)
}
if err := p.writeField1(oprot); err != nil {
return err
}
if err := oprot.WriteFieldStop(); err != nil {
return fmt.Errorf("write field stop error: %s", err)
}
if err := oprot.WriteStructEnd(); err != nil {
return fmt.Errorf("write struct stop error: %s", err)
}
return nil
}
示例14: Write
func (p *AccountDoActionArgs) Write(oprot thrift.TProtocol) error {
if err := oprot.WriteStructBegin("doAction_args"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
}
if err := p.writeField1(oprot); err != nil {
return err
}
if err := oprot.WriteFieldStop(); err != nil {
return thrift.PrependError("write field stop error: ", err)
}
if err := oprot.WriteStructEnd(); err != nil {
return thrift.PrependError("write struct stop error: ", err)
}
return nil
}
示例15: Write
func (p *TCollectorGetSamplingStrategyArgs) Write(oprot thrift.TProtocol) error {
if err := oprot.WriteStructBegin("getSamplingStrategy_args"); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
}
if err := p.writeField1(oprot); err != nil {
return err
}
if err := oprot.WriteFieldStop(); err != nil {
return thrift.PrependError("write field stop error: ", err)
}
if err := oprot.WriteStructEnd(); err != nil {
return thrift.PrependError("write struct stop error: ", err)
}
return nil
}