Esempio n. 1
0
// DecodeMsg implements msgp.Decodable
func (z *Message) DecodeMsg(dc *msgp.Reader) (err error) {
	var ssz uint32
	ssz, err = dc.ReadArrayHeader()
	if err != nil {
		return
	}
	if ssz != 4 {
		err = msgp.ArrayError{Wanted: 4, Got: ssz}
		return
	}
	z.Tag, err = dc.ReadString()
	if err != nil {
		return
	}
	z.Time, err = dc.ReadInt64()
	if err != nil {
		return
	}
	z.Record, err = dc.ReadIntf()
	if err != nil {
		return
	}
	z.Option, err = dc.ReadIntf()
	if err != nil {
		return
	}
	return
}
Esempio n. 2
0
// DecodeMsg implements msgp.Decodable
func (z *StructInstance) DecodeMsg(dc *msgp.Reader) (err error) {
	var field []byte
	_ = field
	var zqke uint32
	zqke, err = dc.ReadMapHeader()
	if err != nil {
		return
	}
	for zqke > 0 {
		zqke--
		field, err = dc.ReadMapKeyPtr()
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "StructId":
			z.StructId, err = dc.ReadInt64()
			if err != nil {
				return
			}
		default:
			err = dc.Skip()
			if err != nil {
				return
			}
		}
	}
	return
}
Esempio n. 3
0
// DecodeMsg implements msgp.Decodable
func (z *runIterator32) DecodeMsg(dc *msgp.Reader) (err error) {
	var field []byte
	_ = field
	var zqke uint32
	zqke, err = dc.ReadMapHeader()
	if err != nil {
		return
	}
	for zqke > 0 {
		zqke--
		field, err = dc.ReadMapKeyPtr()
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "rc":
			if dc.IsNil() {
				err = dc.ReadNil()
				if err != nil {
					return
				}
				z.rc = nil
			} else {
				if z.rc == nil {
					z.rc = new(runContainer32)
				}
				err = z.rc.DecodeMsg(dc)
				if err != nil {
					return
				}
			}
		case "curIndex":
			z.curIndex, err = dc.ReadInt64()
			if err != nil {
				return
			}
		case "curPosInIndex":
			z.curPosInIndex, err = dc.ReadUint32()
			if err != nil {
				return
			}
		case "curSeq":
			z.curSeq, err = dc.ReadInt64()
			if err != nil {
				return
			}
		default:
			err = dc.Skip()
			if err != nil {
				return
			}
		}
	}
	return
}
Esempio n. 4
0
// DecodeMsg implements msgp.Decodable
func (z *MethodT) DecodeMsg(dc *msgp.Reader) (err error) {
	var field []byte
	_ = field
	var zcxo uint32
	zcxo, err = dc.ReadMapHeader()
	if err != nil {
		return
	}
	for zcxo > 0 {
		zcxo--
		field, err = dc.ReadMapKeyPtr()
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "MethodId":
			z.MethodId, err = dc.ReadInt64()
			if err != nil {
				return
			}
		case "Name":
			z.Name, err = dc.ReadString()
			if err != nil {
				return
			}
		case "Inputs":
			err = z.Inputs.DecodeMsg(dc)
			if err != nil {
				return
			}
		case "Returns":
			err = z.Returns.DecodeMsg(dc)
			if err != nil {
				return
			}
		case "Deprecated":
			z.Deprecated, err = dc.ReadBool()
			if err != nil {
				return
			}
		case "Comment":
			z.Comment, err = dc.ReadString()
			if err != nil {
				return
			}
		default:
			err = dc.Skip()
			if err != nil {
				return
			}
		}
	}
	return
}
Esempio n. 5
0
// DecodeMsg implements msgp.Decodable
func (z *A) DecodeMsg(dc *msgp.Reader) (err error) {
	var field []byte
	_ = field
	var isz uint32
	isz, err = dc.ReadMapHeader()
	if err != nil {
		return
	}
	for isz > 0 {
		isz--
		field, err = dc.ReadMapKeyPtr()
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "Name":
			z.Name, err = dc.ReadString()
			if err != nil {
				return
			}
		case "BirthDay":
			z.BirthDay, err = dc.ReadInt64()
			if err != nil {
				return
			}
		case "Phone":
			z.Phone, err = dc.ReadString()
			if err != nil {
				return
			}
		case "Siblings":
			z.Siblings, err = dc.ReadInt64()
			if err != nil {
				return
			}
		case "Spouse":
			z.Spouse, err = dc.ReadUint8()
			if err != nil {
				return
			}
		case "Money":
			z.Money, err = dc.ReadFloat64()
			if err != nil {
				return
			}
		default:
			err = dc.Skip()
			if err != nil {
				return
			}
		}
	}
	return
}
Esempio n. 6
0
// DecodeMsg implements msgp.Decodable
func (z *Forward) DecodeMsg(dc *msgp.Reader) (err error) {
	var ssz uint32
	ssz, err = dc.ReadArrayHeader()
	if err != nil {
		return
	}
	if ssz != 3 {
		err = msgp.ArrayError{Wanted: 3, Got: ssz}
		return
	}
	z.Tag, err = dc.ReadString()
	if err != nil {
		return
	}
	var xsz uint32
	xsz, err = dc.ReadArrayHeader()
	if err != nil {
		return
	}
	if cap(z.Entries) >= int(xsz) {
		z.Entries = z.Entries[:xsz]
	} else {
		z.Entries = make([]Entry, xsz)
	}
	for xvk := range z.Entries {
		var ssz uint32
		ssz, err = dc.ReadArrayHeader()
		if err != nil {
			return
		}
		if ssz != 2 {
			err = msgp.ArrayError{Wanted: 2, Got: ssz}
			return
		}
		z.Entries[xvk].Time, err = dc.ReadInt64()
		if err != nil {
			return
		}
		z.Entries[xvk].Record, err = dc.ReadIntf()
		if err != nil {
			return
		}
	}
	z.Option, err = dc.ReadIntf()
	if err != nil {
		return
	}
	return
}
Esempio n. 7
0
// DecodeMsg implements msgp.Decodable
func (z *Snap) DecodeMsg(dc *msgp.Reader) (err error) {
	var field []byte
	_ = field
	var isz uint32
	isz, err = dc.ReadMapHeader()
	if err != nil {
		return
	}
	for isz > 0 {
		isz--
		field, err = dc.ReadMapKeyPtr()
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "LowestTrackableValue":
			z.LowestTrackableValue, err = dc.ReadInt64()
			if err != nil {
				return
			}
		case "HighestTrackableValue":
			z.HighestTrackableValue, err = dc.ReadInt64()
			if err != nil {
				return
			}
		case "SignificantFigures":
			z.SignificantFigures, err = dc.ReadInt64()
			if err != nil {
				return
			}
		case "Counts":
			var xsz uint32
			xsz, err = dc.ReadArrayHeader()
			if err != nil {
				return
			}
			if cap(z.Counts) >= int(xsz) {
				z.Counts = z.Counts[:xsz]
			} else {
				z.Counts = make([]int64, xsz)
			}
			for xvk := range z.Counts {
				z.Counts[xvk], err = dc.ReadInt64()
				if err != nil {
					return
				}
			}
		default:
			err = dc.Skip()
			if err != nil {
				return
			}
		}
	}
	return
}
Esempio n. 8
0
// DecodeMsg implements msgp.Decodable
func (z *Weather) DecodeMsg(dc *msgp.Reader) (err error) {
	var field []byte
	_ = field
	var isz uint32
	isz, err = dc.ReadMapHeader()
	if err != nil {
		return
	}
	for isz > 0 {
		isz--
		field, err = dc.ReadMapKeyPtr()
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "time":
			z.Time, err = dc.ReadTime()
			if err != nil {
				return
			}
		case "size":
			z.Size, err = dc.ReadInt64()
			if err != nil {
				return
			}
		case "type":
			z.Type, err = dc.ReadString()
			if err != nil {
				return
			}
		case "details":
			z.Details, err = dc.ReadBytes(z.Details)
			if err != nil {
				return
			}
		default:
			err = dc.Skip()
			if err != nil {
				return
			}
		}
	}
	return
}
Esempio n. 9
0
// DecodeMsg implements msgp.Decodable
func (z *Entry) DecodeMsg(dc *msgp.Reader) (err error) {
	var ssz uint32
	ssz, err = dc.ReadArrayHeader()
	if err != nil {
		return
	}
	if ssz != 2 {
		err = msgp.ArrayError{Wanted: 2, Got: ssz}
		return
	}
	z.Time, err = dc.ReadInt64()
	if err != nil {
		return
	}
	z.Record, err = dc.ReadIntf()
	if err != nil {
		return
	}
	return
}
Esempio n. 10
0
// DecodeMsg implements msgp.Decodable
func (z *MetricDefinition) DecodeMsg(dc *msgp.Reader) (err error) {
	var field []byte
	_ = field
	var isz uint32
	isz, err = dc.ReadMapHeader()
	if err != nil {
		return
	}
	for isz > 0 {
		isz--
		field, err = dc.ReadMapKeyPtr()
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "Id":
			z.Id, err = dc.ReadString()
			if err != nil {
				return
			}
		case "OrgId":
			z.OrgId, err = dc.ReadInt()
			if err != nil {
				return
			}
		case "Name":
			z.Name, err = dc.ReadString()
			if err != nil {
				return
			}
		case "Metric":
			z.Metric, err = dc.ReadString()
			if err != nil {
				return
			}
		case "Interval":
			z.Interval, err = dc.ReadInt()
			if err != nil {
				return
			}
		case "Unit":
			z.Unit, err = dc.ReadString()
			if err != nil {
				return
			}
		case "TargetType":
			z.TargetType, err = dc.ReadString()
			if err != nil {
				return
			}
		case "Tags":
			var xsz uint32
			xsz, err = dc.ReadArrayHeader()
			if err != nil {
				return
			}
			if cap(z.Tags) >= int(xsz) {
				z.Tags = z.Tags[:xsz]
			} else {
				z.Tags = make([]string, xsz)
			}
			for hct := range z.Tags {
				z.Tags[hct], err = dc.ReadString()
				if err != nil {
					return
				}
			}
		case "LastUpdate":
			z.LastUpdate, err = dc.ReadInt64()
			if err != nil {
				return
			}
		case "Nodes":
			var msz uint32
			msz, err = dc.ReadMapHeader()
			if err != nil {
				return
			}
			if z.Nodes == nil && msz > 0 {
				z.Nodes = make(map[string]string, msz)
			} else if len(z.Nodes) > 0 {
				for key, _ := range z.Nodes {
					delete(z.Nodes, key)
				}
			}
			for msz > 0 {
				msz--
				var cua string
				var xhx string
				cua, err = dc.ReadString()
				if err != nil {
					return
				}
				xhx, err = dc.ReadString()
				if err != nil {
					return
				}
				z.Nodes[cua] = xhx
			}
		case "NodeCount":
			z.NodeCount, err = dc.ReadInt()
			if err != nil {
				return
			}
		default:
			err = dc.Skip()
			if err != nil {
				return
			}
		}
	}
	return
}
Esempio n. 11
0
// DecodeMsg implements msgp.Decodable
func (z *MetricData) DecodeMsg(dc *msgp.Reader) (err error) {
	var field []byte
	_ = field
	var isz uint32
	isz, err = dc.ReadMapHeader()
	if err != nil {
		return
	}
	for isz > 0 {
		isz--
		field, err = dc.ReadMapKeyPtr()
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "OrgId":
			z.OrgId, err = dc.ReadInt()
			if err != nil {
				return
			}
		case "Name":
			z.Name, err = dc.ReadString()
			if err != nil {
				return
			}
		case "Metric":
			z.Metric, err = dc.ReadString()
			if err != nil {
				return
			}
		case "Interval":
			z.Interval, err = dc.ReadInt()
			if err != nil {
				return
			}
		case "Value":
			z.Value, err = dc.ReadFloat64()
			if err != nil {
				return
			}
		case "Unit":
			z.Unit, err = dc.ReadString()
			if err != nil {
				return
			}
		case "Time":
			z.Time, err = dc.ReadInt64()
			if err != nil {
				return
			}
		case "TargetType":
			z.TargetType, err = dc.ReadString()
			if err != nil {
				return
			}
		case "Tags":
			var xsz uint32
			xsz, err = dc.ReadArrayHeader()
			if err != nil {
				return
			}
			if cap(z.Tags) >= int(xsz) {
				z.Tags = z.Tags[:xsz]
			} else {
				z.Tags = make([]string, xsz)
			}
			for xvk := range z.Tags {
				z.Tags[xvk], err = dc.ReadString()
				if err != nil {
					return
				}
			}
		default:
			err = dc.Skip()
			if err != nil {
				return
			}
		}
	}
	return
}
Esempio n. 12
0
// DecodeMsg implements msgp.Decodable
func (z *addHelper32) DecodeMsg(dc *msgp.Reader) (err error) {
	var field []byte
	_ = field
	var zbai uint32
	zbai, err = dc.ReadMapHeader()
	if err != nil {
		return
	}
	for zbai > 0 {
		zbai--
		field, err = dc.ReadMapKeyPtr()
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "runstart":
			z.runstart, err = dc.ReadUint32()
			if err != nil {
				return
			}
		case "runlen":
			z.runlen, err = dc.ReadUint32()
			if err != nil {
				return
			}
		case "actuallyAdded":
			z.actuallyAdded, err = dc.ReadUint32()
			if err != nil {
				return
			}
		case "m":
			var zcmr uint32
			zcmr, err = dc.ReadArrayHeader()
			if err != nil {
				return
			}
			if cap(z.m) >= int(zcmr) {
				z.m = (z.m)[:zcmr]
			} else {
				z.m = make([]interval32, zcmr)
			}
			for zxvk := range z.m {
				var zajw uint32
				zajw, err = dc.ReadMapHeader()
				if err != nil {
					return
				}
				for zajw > 0 {
					zajw--
					field, err = dc.ReadMapKeyPtr()
					if err != nil {
						return
					}
					switch msgp.UnsafeString(field) {
					case "start":
						z.m[zxvk].start, err = dc.ReadUint32()
						if err != nil {
							return
						}
					case "last":
						z.m[zxvk].last, err = dc.ReadUint32()
						if err != nil {
							return
						}
					default:
						err = dc.Skip()
						if err != nil {
							return
						}
					}
				}
			}
		case "rc":
			if dc.IsNil() {
				err = dc.ReadNil()
				if err != nil {
					return
				}
				z.rc = nil
			} else {
				if z.rc == nil {
					z.rc = new(runContainer32)
				}
				var zwht uint32
				zwht, err = dc.ReadMapHeader()
				if err != nil {
					return
				}
				for zwht > 0 {
					zwht--
					field, err = dc.ReadMapKeyPtr()
					if err != nil {
						return
					}
					switch msgp.UnsafeString(field) {
					case "iv":
						var zhct uint32
						zhct, err = dc.ReadArrayHeader()
						if err != nil {
							return
						}
						if cap(z.rc.iv) >= int(zhct) {
							z.rc.iv = (z.rc.iv)[:zhct]
						} else {
							z.rc.iv = make([]interval32, zhct)
						}
						for zbzg := range z.rc.iv {
							var zcua uint32
							zcua, err = dc.ReadMapHeader()
							if err != nil {
								return
							}
							for zcua > 0 {
								zcua--
								field, err = dc.ReadMapKeyPtr()
								if err != nil {
									return
								}
								switch msgp.UnsafeString(field) {
								case "start":
									z.rc.iv[zbzg].start, err = dc.ReadUint32()
									if err != nil {
										return
									}
								case "last":
									z.rc.iv[zbzg].last, err = dc.ReadUint32()
									if err != nil {
										return
									}
								default:
									err = dc.Skip()
									if err != nil {
										return
									}
								}
							}
						}
					case "card":
						z.rc.card, err = dc.ReadInt64()
						if err != nil {
							return
						}
					default:
						err = dc.Skip()
						if err != nil {
							return
						}
					}
				}
			}
		default:
			err = dc.Skip()
			if err != nil {
				return
			}
		}
	}
	return
}
Esempio n. 13
0
// DecodeMsg implements msgp.Decodable
func (z *runContainer32) DecodeMsg(dc *msgp.Reader) (err error) {
	var field []byte
	_ = field
	var zdnj uint32
	zdnj, err = dc.ReadMapHeader()
	if err != nil {
		return
	}
	for zdnj > 0 {
		zdnj--
		field, err = dc.ReadMapKeyPtr()
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "iv":
			var zobc uint32
			zobc, err = dc.ReadArrayHeader()
			if err != nil {
				return
			}
			if cap(z.iv) >= int(zobc) {
				z.iv = (z.iv)[:zobc]
			} else {
				z.iv = make([]interval32, zobc)
			}
			for zxpk := range z.iv {
				var zsnv uint32
				zsnv, err = dc.ReadMapHeader()
				if err != nil {
					return
				}
				for zsnv > 0 {
					zsnv--
					field, err = dc.ReadMapKeyPtr()
					if err != nil {
						return
					}
					switch msgp.UnsafeString(field) {
					case "start":
						z.iv[zxpk].start, err = dc.ReadUint32()
						if err != nil {
							return
						}
					case "last":
						z.iv[zxpk].last, err = dc.ReadUint32()
						if err != nil {
							return
						}
					default:
						err = dc.Skip()
						if err != nil {
							return
						}
					}
				}
			}
		case "card":
			z.card, err = dc.ReadInt64()
			if err != nil {
				return
			}
		default:
			err = dc.Skip()
			if err != nil {
				return
			}
		}
	}
	return
}
Esempio n. 14
0
// DecodeMsg implements msgp.Decodable
func (z *FieldT) DecodeMsg(dc *msgp.Reader) (err error) {
	var field []byte
	_ = field
	var zbai uint32
	zbai, err = dc.ReadMapHeader()
	if err != nil {
		return
	}
	for zbai > 0 {
		zbai--
		field, err = dc.ReadMapKeyPtr()
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "FieldId":
			z.FieldId, err = dc.ReadInt64()
			if err != nil {
				return
			}
		case "Name":
			z.Name, err = dc.ReadString()
			if err != nil {
				return
			}
		case "Ztyp":
			{
				var zcmr int32
				zcmr, err = dc.ReadInt32()
				z.Ztyp = Ztype(zcmr)
			}
			if err != nil {
				return
			}
		case "IsVarArg":
			z.IsVarArg, err = dc.ReadBool()
			if err != nil {
				return
			}
		case "Tags":
			var zajw uint32
			zajw, err = dc.ReadMapHeader()
			if err != nil {
				return
			}
			if z.Tags == nil && zajw > 0 {
				z.Tags = make(map[string]string, zajw)
			} else if len(z.Tags) > 0 {
				for key, _ := range z.Tags {
					delete(z.Tags, key)
				}
			}
			for zajw > 0 {
				zajw--
				var zxvk string
				var zbzg string
				zxvk, err = dc.ReadString()
				if err != nil {
					return
				}
				zbzg, err = dc.ReadString()
				if err != nil {
					return
				}
				z.Tags[zxvk] = zbzg
			}
		case "Deprecated":
			z.Deprecated, err = dc.ReadBool()
			if err != nil {
				return
			}
		case "Comment":
			z.Comment, err = dc.ReadString()
			if err != nil {
				return
			}
		default:
			err = dc.Skip()
			if err != nil {
				return
			}
		}
	}
	return
}
Esempio n. 15
0
// DecodeMsg implements msgp.Decodable
func (z *StructT) DecodeMsg(dc *msgp.Reader) (err error) {
	var field []byte
	_ = field
	var zywj uint32
	zywj, err = dc.ReadMapHeader()
	if err != nil {
		return
	}
	for zywj > 0 {
		zywj--
		field, err = dc.ReadMapKeyPtr()
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "StructId":
			z.StructId, err = dc.ReadInt64()
			if err != nil {
				return
			}
		case "StructName":
			z.StructName, err = dc.ReadString()
			if err != nil {
				return
			}
		case "Fields":
			var zjpj uint32
			zjpj, err = dc.ReadArrayHeader()
			if err != nil {
				return
			}
			if cap(z.Fields) >= int(zjpj) {
				z.Fields = (z.Fields)[:zjpj]
			} else {
				z.Fields = make([]FieldT, zjpj)
			}
			for zyzr := range z.Fields {
				err = z.Fields[zyzr].DecodeMsg(dc)
				if err != nil {
					return
				}
			}
		case "Deprecated":
			z.Deprecated, err = dc.ReadBool()
			if err != nil {
				return
			}
		case "Comment":
			z.Comment, err = dc.ReadString()
			if err != nil {
				return
			}
		default:
			err = dc.Skip()
			if err != nil {
				return
			}
		}
	}
	return
}
Esempio n. 16
0
// DecodeMsg implements msgp.Decodable
func (z *ProbeEvent) DecodeMsg(dc *msgp.Reader) (err error) {
	var field []byte
	_ = field
	var isz uint32
	isz, err = dc.ReadMapHeader()
	if err != nil {
		return
	}
	for isz > 0 {
		isz--
		field, err = dc.ReadMapKeyPtr()
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "Id":
			z.Id, err = dc.ReadString()
			if err != nil {
				return
			}
		case "EventType":
			z.EventType, err = dc.ReadString()
			if err != nil {
				return
			}
		case "OrgId":
			z.OrgId, err = dc.ReadInt64()
			if err != nil {
				return
			}
		case "Severity":
			z.Severity, err = dc.ReadString()
			if err != nil {
				return
			}
		case "Source":
			z.Source, err = dc.ReadString()
			if err != nil {
				return
			}
		case "Timestamp":
			z.Timestamp, err = dc.ReadInt64()
			if err != nil {
				return
			}
		case "Message":
			z.Message, err = dc.ReadString()
			if err != nil {
				return
			}
		case "Tags":
			var msz uint32
			msz, err = dc.ReadMapHeader()
			if err != nil {
				return
			}
			if z.Tags == nil && msz > 0 {
				z.Tags = make(map[string]string, msz)
			} else if len(z.Tags) > 0 {
				for key, _ := range z.Tags {
					delete(z.Tags, key)
				}
			}
			for msz > 0 {
				msz--
				var xvk string
				var bzg string
				xvk, err = dc.ReadString()
				if err != nil {
					return
				}
				bzg, err = dc.ReadString()
				if err != nil {
					return
				}
				z.Tags[xvk] = bzg
			}
		default:
			err = dc.Skip()
			if err != nil {
				return
			}
		}
	}
	return
}
Esempio n. 17
0
// DecodeMsg implements msgp.Decodable
func (z *Incident) DecodeMsg(dc *msgp.Reader) (err error) {
	var field []byte
	_ = field
	var isz uint32
	isz, err = dc.ReadMapHeader()
	if err != nil {
		return
	}
	for isz > 0 {
		isz--
		field, err = dc.ReadMapKeyPtr()
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "event_name":
			z.EventName, err = dc.ReadBytes(z.EventName)
			if err != nil {
				return
			}
		case "time":
			z.Time, err = dc.ReadInt64()
			if err != nil {
				return
			}
		case "id":
			z.Id, err = dc.ReadInt64()
			if err != nil {
				return
			}
		case "active":
			z.Active, err = dc.ReadBool()
			if err != nil {
				return
			}
		case "escalation":
			z.Escalation, err = dc.ReadString()
			if err != nil {
				return
			}
		case "description":
			z.Description, err = dc.ReadString()
			if err != nil {
				return
			}
		case "policy":
			z.Policy, err = dc.ReadString()
			if err != nil {
				return
			}
		case "Status":
			z.Status, err = dc.ReadInt()
			if err != nil {
				return
			}
		case "Event":
			err = z.Event.DecodeMsg(dc)
			if err != nil {
				return
			}
		default:
			err = dc.Skip()
			if err != nil {
				return
			}
		}
	}
	return
}