func (p *UserGroup) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) } if fieldTypeId == thrift.STOP { break } switch fieldId { case 1: if err := p.readField1(iprot); err != nil { return err } case 2: if err := p.readField2(iprot); err != nil { return err } default: if err := iprot.Skip(fieldTypeId); err != nil { return err } } if err := iprot.ReadFieldEnd(); err != nil { return err } } if err := iprot.ReadStructEnd(); err != nil { return fmt.Errorf("%T read struct end error: %s", p, err) } return nil }
func (p *User) readField13(iprot thrift.TProtocol) error { if v, err := iprot.ReadString(); err != nil { return fmt.Errorf("error reading field 13: %s", err) } else { p.OrganizationID = v } return nil }
func (p *User) readField14(iprot thrift.TProtocol) error { if v, err := iprot.ReadString(); err != nil { return fmt.Errorf("error reading field 14: %s", err) } else { p.Gender = v } return nil }
func (p *UserGroup) readField1(iprot thrift.TProtocol) error { if v, err := iprot.ReadString(); err != nil { return fmt.Errorf("error reading field 1: %s", err) } else { p.ID = bson.ObjectId(v) } return nil }
func (p *UserGroup) readField2(iprot thrift.TProtocol) error { if v, err := iprot.ReadString(); err != nil { return fmt.Errorf("error reading field 2: %s", err) } else { p.Name = v } return nil }
func (p *User) readField9(iprot thrift.TProtocol) error { if v, err := iprot.ReadBool(); err != nil { return fmt.Errorf("error reading field 9: %s", err) } else { p.IsAdmin = v } return nil }
func (p *User) readField15(iprot thrift.TProtocol) error { if v, err := iprot.ReadI32(); err != nil { return fmt.Errorf("error reading field 15: %s", err) } else { p.Index = v } return nil }
func (p *User) Write(oprot thrift.TProtocol) error { if err := oprot.WriteStructBegin("User"); 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 := p.writeField6(oprot); err != nil { return err } if err := p.writeField7(oprot); err != nil { return err } if err := p.writeField8(oprot); err != nil { return err } if err := p.writeField9(oprot); err != nil { return err } if err := p.writeField10(oprot); err != nil { return err } if err := p.writeField11(oprot); err != nil { return err } if err := p.writeField12(oprot); err != nil { return err } if err := p.writeField13(oprot); err != nil { return err } if err := p.writeField14(oprot); err != nil { return err } if err := p.writeField15(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 }
func (p *UserGroup) writeField2(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("Name", thrift.STRING, 2); err != nil { return fmt.Errorf("%T write field begin error 2:Name: %s", p, err) } if err := oprot.WriteString(string(p.Name)); err != nil { return fmt.Errorf("%T.Name (2) field write error: %s", p, err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 2:Name: %s", p, err) } return err }
func (p *User) writeField15(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("Index", thrift.I32, 15); err != nil { return fmt.Errorf("%T write field begin error 15:Index: %s", p, err) } if err := oprot.WriteI32(int32(p.Index)); err != nil { return fmt.Errorf("%T.Index (15) field write error: %s", p, err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 15:Index: %s", p, err) } return err }
func (p *User) writeField14(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("Gender", thrift.STRING, 14); err != nil { return fmt.Errorf("%T write field begin error 14:Gender: %s", p, err) } if err := oprot.WriteString(string(p.Gender)); err != nil { return fmt.Errorf("%T.Gender (14) field write error: %s", p, err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 14:Gender: %s", p, err) } return err }
func (p *User) writeField5(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("Email", thrift.STRING, 5); err != nil { return fmt.Errorf("%T write field begin error 5:Email: %s", p, err) } if err := oprot.WriteString(string(p.Email)); err != nil { return fmt.Errorf("%T.Email (5) field write error: %s", p, err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 5:Email: %s", p, err) } return err }
func (p *User) writeField13(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("OrganizationID", thrift.STRING, 13); err != nil { return fmt.Errorf("%T write field begin error 13:OrganizationID: %s", p, err) } if err := oprot.WriteString(string(p.OrganizationID)); err != nil { return fmt.Errorf("%T.OrganizationID (13) field write error: %s", p, err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 13:OrganizationID: %s", p, err) } return err }
func (p *User) writeField6(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("Intro", thrift.STRING, 6); err != nil { return fmt.Errorf("%T write field begin error 6:Intro: %s", p, err) } if err := oprot.WriteString(string(p.Intro)); err != nil { return fmt.Errorf("%T.Intro (6) field write error: %s", p, err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 6:Intro: %s", p, err) } return err }
func (p *User) writeField12(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("PubInfoID", thrift.STRING, 12); err != nil { return fmt.Errorf("%T write field begin error 12:PubInfoID: %s", p, err) } if err := oprot.WriteString(string(p.PubInfoID)); err != nil { return fmt.Errorf("%T.PubInfoID (12) field write error: %s", p, err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 12:PubInfoID: %s", p, err) } return err }
func (p *User) writeField11(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("Status", thrift.I32, 11); err != nil { return fmt.Errorf("%T write field begin error 11:Status: %s", p, err) } if err := oprot.WriteI32(int32(p.Status)); err != nil { return fmt.Errorf("%T.Status (11) field write error: %s", p, err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 11:Status: %s", p, err) } return err }
func (p *User) writeField9(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("IsAdmin", thrift.BOOL, 9); err != nil { return fmt.Errorf("%T write field begin error 9:IsAdmin: %s", p, err) } if err := oprot.WriteBool(bool(p.IsAdmin)); err != nil { return fmt.Errorf("%T.IsAdmin (9) field write error: %s", p, err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 9:IsAdmin: %s", p, err) } return err }
func (p *User) writeField8(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("Remark", thrift.STRING, 8); err != nil { return fmt.Errorf("%T write field begin error 8:Remark: %s", p, err) } if err := oprot.WriteString(string(p.Remark)); err != nil { return fmt.Errorf("%T.Remark (8) field write error: %s", p, err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 8:Remark: %s", p, err) } return err }
func (p *User) writeField7(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("Picture", thrift.STRING, 7); err != nil { return fmt.Errorf("%T write field begin error 7:Picture: %s", p, err) } if err := oprot.WriteString(string(p.Picture)); err != nil { return fmt.Errorf("%T.Picture (7) field write error: %s", p, err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 7:Picture: %s", p, err) } return err }
func (p *UserGroup) writeField1(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("ID", thrift.STRING, 1); err != nil { return fmt.Errorf("%T write field begin error 1:ID: %s", p, err) } if err := oprot.WriteString(string(p.ID)); err != nil { return fmt.Errorf("%T.ID (1) field write error: %s", p, err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 1:ID: %s", p, err) } return err }
func (p *User) writeField3(oprot thrift.TProtocol) (err error) { if err := oprot.WriteFieldBegin("Password", thrift.STRING, 3); err != nil { return fmt.Errorf("%T write field begin error 3:Password: %s", p, err) } if err := oprot.WriteString(string(p.Password)); err != nil { return fmt.Errorf("%T.Password (3) field write error: %s", p, err) } if err := oprot.WriteFieldEnd(); err != nil { return fmt.Errorf("%T write field end error 3:Password: %s", p, err) } return err }
func (p *UserGroup) Write(oprot thrift.TProtocol) error { if err := oprot.WriteStructBegin("UserGroup"); 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 := 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 }
func (p *User) Read(iprot thrift.TProtocol) error { if _, err := iprot.ReadStructBegin(); err != nil { return fmt.Errorf("%T read error: %s", p, err) } for { _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin() if err != nil { return fmt.Errorf("%T field %d read error: %s", p, fieldId, err) } if fieldTypeId == thrift.STOP { break } switch fieldId { case 1: if err := p.readField1(iprot); err != nil { return err } case 2: if err := p.readField2(iprot); err != nil { return err } case 3: if err := p.readField3(iprot); err != nil { return err } case 4: if err := p.readField4(iprot); err != nil { return err } case 5: if err := p.readField5(iprot); err != nil { return err } case 6: if err := p.readField6(iprot); err != nil { return err } case 7: if err := p.readField7(iprot); err != nil { return err } case 8: if err := p.readField8(iprot); err != nil { return err } case 9: if err := p.readField9(iprot); err != nil { return err } case 10: if err := p.readField10(iprot); err != nil { return err } case 11: if err := p.readField11(iprot); err != nil { return err } case 12: if err := p.readField12(iprot); err != nil { return err } case 13: if err := p.readField13(iprot); err != nil { return err } case 14: if err := p.readField14(iprot); err != nil { return err } case 15: if err := p.readField15(iprot); err != nil { return err } default: if err := iprot.Skip(fieldTypeId); err != nil { return err } } if err := iprot.ReadFieldEnd(); err != nil { return err } } if err := iprot.ReadStructEnd(); err != nil { return fmt.Errorf("%T read struct end error: %s", p, err) } return nil }