Ejemplo n.º 1
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
}
Ejemplo n.º 2
0
// DecodeMsg implements msgp.Decodable
func (z *CacheRegistry) DecodeMsg(dc *msgp.Reader) (err error) {
	var field []byte
	_ = field
	var xvk uint32
	xvk, err = dc.ReadMapHeader()
	if err != nil {
		return
	}
	for xvk > 0 {
		xvk--
		field, err = dc.ReadMapKeyPtr()
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "CacheKey":
			z.CacheKey, err = dc.ReadString()
			if err != nil {
				return
			}
		case "Payload":
			z.Payload, err = dc.ReadIntf()
			if err != nil {
				return
			}
		case "StoreTTL":
			z.StoreTTL, err = dc.ReadFloat64()
			if err != nil {
				return
			}
		case "CacheTime":
			z.CacheTime, err = dc.ReadTime()
			if err != nil {
				return
			}
		case "HasValue":
			z.HasValue, err = dc.ReadBool()
			if err != nil {
				return
			}
		case "TypeName":
			z.TypeName, err = dc.ReadString()
			if err != nil {
				return
			}
		default:
			err = dc.Skip()
			if err != nil {
				return
			}
		}
	}
	return
}
Ejemplo n.º 3
0
// DecodeMsg implements msgp.Decodable
func (z *InterfaceT) DecodeMsg(dc *msgp.Reader) (err error) {
	var field []byte
	_ = field
	var zlqf uint32
	zlqf, err = dc.ReadMapHeader()
	if err != nil {
		return
	}
	for zlqf > 0 {
		zlqf--
		field, err = dc.ReadMapKeyPtr()
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "Methods":
			var zdaf uint32
			zdaf, err = dc.ReadArrayHeader()
			if err != nil {
				return
			}
			if cap(z.Methods) >= int(zdaf) {
				z.Methods = (z.Methods)[:zdaf]
			} else {
				z.Methods = make([]MethodT, zdaf)
			}
			for zxhx := range z.Methods {
				err = z.Methods[zxhx].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
}
Ejemplo n.º 4
0
// DecodeMsg implements msgp.Decodable
func (z *roaringArray) DecodeMsg(dc *msgp.Reader) (err error) {
	var field []byte
	_ = field
	var zlqf uint32
	zlqf, err = dc.ReadMapHeader()
	if err != nil {
		return
	}
	for zlqf > 0 {
		zlqf--
		field, err = dc.ReadMapKeyPtr()
		if err != nil {
			return
		}
		switch msgp.UnsafeString(field) {
		case "keys":
			var zdaf uint32
			zdaf, err = dc.ReadArrayHeader()
			if err != nil {
				return
			}
			if cap(z.keys) >= int(zdaf) {
				z.keys = (z.keys)[:zdaf]
			} else {
				z.keys = make([]uint16, zdaf)
			}
			for zhct := range z.keys {
				z.keys[zhct], err = dc.ReadUint16()
				if err != nil {
					return
				}
			}
		case "needCopyOnWrite":
			var zpks uint32
			zpks, err = dc.ReadArrayHeader()
			if err != nil {
				return
			}
			if cap(z.needCopyOnWrite) >= int(zpks) {
				z.needCopyOnWrite = (z.needCopyOnWrite)[:zpks]
			} else {
				z.needCopyOnWrite = make([]bool, zpks)
			}
			for zcua := range z.needCopyOnWrite {
				z.needCopyOnWrite[zcua], err = dc.ReadBool()
				if err != nil {
					return
				}
			}
		case "copyOnWrite":
			z.copyOnWrite, err = dc.ReadBool()
			if err != nil {
				return
			}
		case "conserz":
			var zjfb uint32
			zjfb, err = dc.ReadArrayHeader()
			if err != nil {
				return
			}
			if cap(z.conserz) >= int(zjfb) {
				z.conserz = (z.conserz)[:zjfb]
			} else {
				z.conserz = make([]containerSerz, zjfb)
			}
			for zxhx := range z.conserz {
				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 "t":
						{
							var zeff uint8
							zeff, err = dc.ReadUint8()
							z.conserz[zxhx].t = contype(zeff)
						}
						if err != nil {
							return
						}
					case "r":
						err = z.conserz[zxhx].r.DecodeMsg(dc)
						if err != nil {
							return
						}
					default:
						err = dc.Skip()
						if err != nil {
							return
						}
					}
				}
			}
		default:
			err = dc.Skip()
			if err != nil {
				return
			}
		}
	}
	return
}
Ejemplo n.º 5
0
// DecodeMsg implements msgp.Decodable
func (z *SchemaT) 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 "PkgPath":
			z.PkgPath, err = dc.ReadString()
			if err != nil {
				return
			}
		case "Structs":
			var zobc uint32
			zobc, err = dc.ReadArrayHeader()
			if err != nil {
				return
			}
			if cap(z.Structs) >= int(zobc) {
				z.Structs = (z.Structs)[:zobc]
			} else {
				z.Structs = make([]StructT, zobc)
			}
			for zrsw := range z.Structs {
				err = z.Structs[zrsw].DecodeMsg(dc)
				if err != nil {
					return
				}
			}
		case "Interfaces":
			var zsnv uint32
			zsnv, err = dc.ReadArrayHeader()
			if err != nil {
				return
			}
			if cap(z.Interfaces) >= int(zsnv) {
				z.Interfaces = (z.Interfaces)[:zsnv]
			} else {
				z.Interfaces = make([]InterfaceT, zsnv)
			}
			for zxpk := range z.Interfaces {
				err = z.Interfaces[zxpk].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
}
Ejemplo n.º 6
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
}
Ejemplo n.º 7
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
}
Ejemplo n.º 8
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
}