Example #1
0
func (p *Flop) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("a", thrift.I16, 1); err != nil {
		return fmt.Errorf("%T write field begin error 1:a: %s", p, err)
	}
	if err := oprot.WriteI16(int16(p.A)); err != nil {
		return fmt.Errorf("%T.a (1) field write error: %s", p, err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 1:a: %s", p, err)
	}
	return err
}
Example #2
0
func (p *Flop) writeField2(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("b", thrift.I16, 2); err != nil {
		return fmt.Errorf("%T write field begin error 2:b: %s", p, err)
	}
	if err := oprot.WriteI16(int16(p.B)); err != nil {
		return fmt.Errorf("%T.b (2) field write error: %s", p, err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 2:b: %s", p, err)
	}
	return err
}
Example #3
0
func (p *Types) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("short_value", thrift.I16, 1); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:short_value: ", p), err)
	}
	if err := oprot.WriteI16(int16(p.ShortValue)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.short_value (1) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 1:short_value: ", p), err)
	}
	return err
}
func (p *Message) writeField2(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("vote_type", thrift.I16, 2); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:vote_type: ", p), err)
	}
	if err := oprot.WriteI16(int16(p.VoteType)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.vote_type (2) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 2:vote_type: ", p), err)
	}
	return err
}
func (p *Student) writeField4(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("sage", thrift.I16, 4); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:sage: ", p), err)
	}
	if err := oprot.WriteI16(int16(p.Sage)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.sage (4) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 4:sage: ", p), err)
	}
	return err
}
Example #6
0
func (p *Endpoint) writeField2(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("port", thrift.I16, 2); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:port: ", p), err)
	}
	if err := oprot.WriteI16(int16(p.Port)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.port (2) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 2:port: ", p), err)
	}
	return err
}
Example #7
0
File: c4.go Project: cosh/C4
func (p *GetArgs) writeField2(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("columnId", thrift.I16, 2); err != nil {
		return fmt.Errorf("%T write field begin error 2:columnId: %s", p, err)
	}
	if err := oprot.WriteI16(int16(p.ColumnId)); err != nil {
		return fmt.Errorf("%T.columnId (2) field write error: %s", p)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 2:columnId: %s", p, err)
	}
	return err
}
Example #8
0
func (p *Person) writeField5(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("age", thrift.I16, 5); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:age: ", p), err)
	}
	if err := oprot.WriteI16(int16(p.Age)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.age (5) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 5:age: ", p), err)
	}
	return err
}
Example #9
0
func (p *CountResult) writeField0(oprot thrift.TProtocol) (err error) {
	if p.IsSetSuccess() {
		if err := oprot.WriteFieldBegin("success", thrift.I16, 0); err != nil {
			return fmt.Errorf("%T write field begin error 0:success: %s", p, err)
		}
		if err := oprot.WriteI16(int16(*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
}