Exemplo n.º 1
0
func (p *BaseServiceGetInterfaceVersionsResult) ReadField0(iprot thrift.TProtocol) error {
	_, _, size, err := iprot.ReadMapBegin()
	if err != nil {
		return thrift.PrependError("error reading map begin: ", err)
	}
	tMap := make(map[string]*version.Version, size)
	p.Success = tMap
	for i := 0; i < size; i++ {
		var _key12 string
		if v, err := iprot.ReadString(); err != nil {
			return thrift.PrependError("error reading field 0: ", err)
		} else {
			_key12 = v
		}
		_val13 := version.NewVersion()
		if err := _val13.Read(iprot); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _val13), err)
		}
		p.Success[_key12] = _val13
	}
	if err := iprot.ReadMapEnd(); err != nil {
		return thrift.PrependError("error reading map end: ", err)
	}
	return nil
}
Exemplo n.º 2
0
func (p *MonitoringCollectResult) ReadField0(iprot thrift.TProtocol) error {
	_, _, size, err := iprot.ReadMapBegin()
	if err != nil {
		return thrift.PrependError("error reading map begin: ", err)
	}
	tMap := make(Metrics, size)
	p.Success = tMap
	for i := 0; i < size; i++ {
		var _key5 MetricID
		if v, err := iprot.ReadString(); err != nil {
			return thrift.PrependError("error reading field 0: ", err)
		} else {
			temp := MetricID(v)
			_key5 = temp
		}
		var _val6 float64
		if v, err := iprot.ReadDouble(); err != nil {
			return thrift.PrependError("error reading field 0: ", err)
		} else {
			_val6 = v
		}
		p.Success[_key5] = _val6
	}
	if err := iprot.ReadMapEnd(); err != nil {
		return thrift.PrependError("error reading map end: ", err)
	}
	return nil
}
Exemplo n.º 3
0
func (p *BaseServiceGetNameResult) Read(iprot thrift.TProtocol) error {
	if _, err := iprot.ReadStructBegin(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
	}

	for {
		_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
		if err != nil {
			return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
		}
		if fieldTypeId == thrift.STOP {
			break
		}
		switch fieldId {
		case 0:
			if err := p.ReadField0(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 thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
	}
	return nil
}
Exemplo n.º 4
0
func (p *BaseServiceGetVersionArgs) Read(iprot thrift.TProtocol) error {
	if _, err := iprot.ReadStructBegin(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
	}

	for {
		_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
		if err != nil {
			return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
		}
		if fieldTypeId == thrift.STOP {
			break
		}
		if err := iprot.Skip(fieldTypeId); err != nil {
			return err
		}
		if err := iprot.ReadFieldEnd(); err != nil {
			return err
		}
	}
	if err := iprot.ReadStructEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
	}
	return nil
}
Exemplo n.º 5
0
func (p *SemanticVersion) Read(iprot thrift.TProtocol) error {
	if _, err := iprot.ReadStructBegin(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
	}

	var issetMajor bool = false
	var issetMinor bool = false
	var issetPatch bool = false

	for {
		_, fieldTypeId, fieldId, err := iprot.ReadFieldBegin()
		if err != nil {
			return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
		}
		if fieldTypeId == thrift.STOP {
			break
		}
		switch fieldId {
		case 1:
			if err := p.ReadField1(iprot); err != nil {
				return err
			}
			issetMajor = true
		case 2:
			if err := p.ReadField2(iprot); err != nil {
				return err
			}
			issetMinor = true
		case 3:
			if err := p.ReadField3(iprot); err != nil {
				return err
			}
			issetPatch = true
		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 thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
	}
	if !issetMajor {
		return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Major is not set"))
	}
	if !issetMinor {
		return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Minor is not set"))
	}
	if !issetPatch {
		return thrift.NewTProtocolExceptionWithType(thrift.INVALID_DATA, fmt.Errorf("Required field Patch is not set"))
	}
	return nil
}
Exemplo n.º 6
0
func (p *GitVersion) writeField3(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("branch", thrift.STRING, 3); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:branch: ", p), err)
	}
	if err := oprot.WriteString(string(p.Branch)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.branch (3) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 3:branch: ", p), err)
	}
	return err
}
Exemplo n.º 7
0
func (p *GitVersion) writeField2(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("remote", thrift.STRING, 2); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:remote: ", p), err)
	}
	if err := oprot.WriteString(string(p.Remote)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.remote (2) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 2:remote: ", p), err)
	}
	return err
}
Exemplo n.º 8
0
func (p *GitVersion) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("commit", thrift.STRING, 1); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:commit: ", p), err)
	}
	if err := oprot.WriteString(string(p.Commit)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.commit (1) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 1:commit: ", p), err)
	}
	return err
}
Exemplo n.º 9
0
func (p *SemanticVersion) writeField3(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("patch", thrift.I16, 3); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:patch: ", p), err)
	}
	if err := oprot.WriteI16(int16(p.Patch)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.patch (3) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 3:patch: ", p), err)
	}
	return err
}
Exemplo n.º 10
0
func (p *SemanticVersion) writeField2(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("minor", thrift.I16, 2); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:minor: ", p), err)
	}
	if err := oprot.WriteI16(int16(p.Minor)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.minor (2) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 2:minor: ", p), err)
	}
	return err
}
Exemplo n.º 11
0
func (p *ServiceNotAvailable) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("reason", thrift.STRING, 1); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:reason: ", p), err)
	}
	if err := oprot.WriteString(string(p.Reason)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.reason (1) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 1:reason: ", p), err)
	}
	return err
}
Exemplo n.º 12
0
func (p *BaseServiceGetVersionArgs) Write(oprot thrift.TProtocol) error {
	if err := oprot.WriteStructBegin("getVersion_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
}
Exemplo n.º 13
0
func (p *UnknownMetric) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("key", thrift.STRING, 1); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:key: ", p), err)
	}
	if err := oprot.WriteString(string(p.Key)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.key (1) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 1:key: ", p), err)
	}
	return err
}
Exemplo n.º 14
0
func (p *BaseServiceGetVersionResult) writeField0(oprot thrift.TProtocol) (err error) {
	if p.IsSetSuccess() {
		if err := oprot.WriteFieldBegin("success", thrift.STRUCT, 0); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err)
		}
		if err := p.Success.Write(oprot); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.Success), err)
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err)
		}
	}
	return err
}
Exemplo n.º 15
0
func (p *MonitoringCollectResult) writeField2(oprot thrift.TProtocol) (err error) {
	if p.IsSetUnknownMetric() {
		if err := oprot.WriteFieldBegin("unknownMetric", thrift.STRUCT, 2); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:unknownMetric: ", p), err)
		}
		if err := p.UnknownMetric.Write(oprot); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.UnknownMetric), err)
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field end error 2:unknownMetric: ", p), err)
		}
	}
	return err
}
Exemplo n.º 16
0
func (p *Version) writeField2(oprot thrift.TProtocol) (err error) {
	if p.IsSetGitVersion() {
		if err := oprot.WriteFieldBegin("git_version", thrift.STRUCT, 2); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:git_version: ", p), err)
		}
		if err := p.GitVersion.Write(oprot); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.GitVersion), err)
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field end error 2:git_version: ", p), err)
		}
	}
	return err
}
Exemplo n.º 17
0
func (p *BaseServiceGetNameResult) writeField0(oprot thrift.TProtocol) (err error) {
	if p.IsSetSuccess() {
		if err := oprot.WriteFieldBegin("success", thrift.STRING, 0); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field begin error 0:success: ", p), err)
		}
		if err := oprot.WriteString(string(*p.Success)); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T.success (0) field write error: ", p), err)
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field end error 0:success: ", p), err)
		}
	}
	return err
}
Exemplo n.º 18
0
func (p *MonitoringCollectResult) writeField1(oprot thrift.TProtocol) (err error) {
	if p.IsSetServiceUnavailable() {
		if err := oprot.WriteFieldBegin("serviceUnavailable", thrift.STRUCT, 1); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:serviceUnavailable: ", p), err)
		}
		if err := p.ServiceUnavailable.Write(oprot); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T error writing struct: ", p.ServiceUnavailable), err)
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field end error 1:serviceUnavailable: ", p), err)
		}
	}
	return err
}
Exemplo n.º 19
0
func (p *BaseServiceGetNameResult) Write(oprot thrift.TProtocol) error {
	if err := oprot.WriteStructBegin("getName_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
}
Exemplo n.º 20
0
func (p *ServiceNotAvailable) Write(oprot thrift.TProtocol) error {
	if err := oprot.WriteStructBegin("ServiceNotAvailable"); 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
}
Exemplo n.º 21
0
func (p *UnknownMetric) Write(oprot thrift.TProtocol) error {
	if err := oprot.WriteStructBegin("UnknownMetric"); 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
}
Exemplo n.º 22
0
func (p *MonitoringCollectArgs) Write(oprot thrift.TProtocol) error {
	if err := oprot.WriteStructBegin("collect_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
}
Exemplo n.º 23
0
func (p *MonitoringCollectResult) ReadField2(iprot thrift.TProtocol) error {
	p.UnknownMetric = NewUnknownMetric()
	if err := p.UnknownMetric.Read(iprot); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.UnknownMetric), err)
	}
	return nil
}
Exemplo n.º 24
0
func (p *MonitoringCollectResult) ReadField1(iprot thrift.TProtocol) error {
	p.ServiceUnavailable = NewServiceNotAvailable()
	if err := p.ServiceUnavailable.Read(iprot); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.ServiceUnavailable), err)
	}
	return nil
}
Exemplo n.º 25
0
func (p *BaseServiceGetVersionResult) ReadField0(iprot thrift.TProtocol) error {
	p.Success = version.NewVersion()
	if err := p.Success.Read(iprot); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.Success), err)
	}
	return nil
}
Exemplo n.º 26
0
func (p *Version) ReadField2(iprot thrift.TProtocol) error {
	p.GitVersion = NewGitVersion()
	if err := p.GitVersion.Read(iprot); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", p.GitVersion), err)
	}
	return nil
}
Exemplo n.º 27
0
func (p *ServiceNotAvailable) ReadField1(iprot thrift.TProtocol) error {
	if v, err := iprot.ReadString(); err != nil {
		return thrift.PrependError("error reading field 1: ", err)
	} else {
		p.Reason = v
	}
	return nil
}
Exemplo n.º 28
0
func (p *SemanticVersion) ReadField3(iprot thrift.TProtocol) error {
	if v, err := iprot.ReadI16(); err != nil {
		return thrift.PrependError("error reading field 3: ", err)
	} else {
		p.Patch = v
	}
	return nil
}
Exemplo n.º 29
0
func (p *GitVersion) ReadField3(iprot thrift.TProtocol) error {
	if v, err := iprot.ReadString(); err != nil {
		return thrift.PrependError("error reading field 3: ", err)
	} else {
		p.Branch = v
	}
	return nil
}
Exemplo n.º 30
0
func (p *BaseServiceGetNameResult) ReadField0(iprot thrift.TProtocol) error {
	if v, err := iprot.ReadString(); err != nil {
		return thrift.PrependError("error reading field 0: ", err)
	} else {
		p.Success = &v
	}
	return nil
}