当前位置: 首页>>代码示例>>Golang>>正文


Golang codec.GenHelperDecoder函数代码示例

本文整理汇总了Golang中github.com/ugorji/go/codec.GenHelperDecoder函数的典型用法代码示例。如果您正苦于以下问题:Golang GenHelperDecoder函数的具体用法?Golang GenHelperDecoder怎么用?Golang GenHelperDecoder使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了GenHelperDecoder函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: codecDecodeSelfFromMap

func (x *TokenReviewSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	var yys39Slc = z.DecScratchBuffer() // default slice to decode into
	_ = yys39Slc
	var yyhl39 bool = l >= 0
	for yyj39 := 0; ; yyj39++ {
		if yyhl39 {
			if yyj39 >= l {
				break
			}
		} else {
			if r.CheckBreak() {
				break
			}
		}
		z.DecSendContainerState(codecSelfer_containerMapKey1234)
		yys39Slc = r.DecodeBytes(yys39Slc, true, true)
		yys39 := string(yys39Slc)
		z.DecSendContainerState(codecSelfer_containerMapValue1234)
		switch yys39 {
		case "token":
			if r.TryDecodeAsNil() {
				x.Token = ""
			} else {
				x.Token = string(r.DecodeString())
			}
		default:
			z.DecStructFieldNotFound(-1, yys39)
		} // end switch yys39
	} // end for yyj39
	z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
开发者ID:ncdc,项目名称:kubernetes,代码行数:34,代码来源:types.generated.go

示例2: CodecDecodeSelf

func (x *StorageClassList) CodecDecodeSelf(d *codec1978.Decoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	yym50 := z.DecBinary()
	_ = yym50
	if false {
	} else if z.HasExtensions() && z.DecExt(x) {
	} else {
		yyct51 := r.ContainerType()
		if yyct51 == codecSelferValueTypeMap1234 {
			yyl51 := r.ReadMapStart()
			if yyl51 == 0 {
				z.DecSendContainerState(codecSelfer_containerMapEnd1234)
			} else {
				x.codecDecodeSelfFromMap(yyl51, d)
			}
		} else if yyct51 == codecSelferValueTypeArray1234 {
			yyl51 := r.ReadArrayStart()
			if yyl51 == 0 {
				z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
			} else {
				x.codecDecodeSelfFromArray(yyl51, d)
			}
		} else {
			panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
		}
	}
}
开发者ID:juanluisvaladas,项目名称:origin,代码行数:29,代码来源:types.generated.go

示例3: CodecDecodeSelf

func (x *Response) CodecDecodeSelf(d *codec1978.Decoder) {
	var h codecSelfer1819
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	yym8 := z.DecBinary()
	_ = yym8
	if false {
	} else if z.HasExtensions() && z.DecExt(x) {
	} else {
		if r.IsContainerType(codecSelferValueTypeMap1819) {
			yyl9 := r.ReadMapStart()
			if yyl9 == 0 {
				r.ReadEnd()
			} else {
				x.codecDecodeSelfFromMap(yyl9, d)
			}
		} else if r.IsContainerType(codecSelferValueTypeArray1819) {
			yyl9 := r.ReadArrayStart()
			if yyl9 == 0 {
				r.ReadEnd()
			} else {
				x.codecDecodeSelfFromArray(yyl9, d)
			}
		} else {
			panic(codecSelferOnlyMapOrArrayEncodeToStructErr1819)
		}
	}
}
开发者ID:resouer,项目名称:contrib,代码行数:28,代码来源:keys.generated.go

示例4: CodecDecodeSelf

func (x *User) CodecDecodeSelf(d *codec1978.Decoder) {
	var h codecSelfer5734
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	yym9 := z.DecBinary()
	_ = yym9
	if false {
	} else if z.HasExtensions() && z.DecExt(x) {
	} else {
		yyct10 := r.ContainerType()
		if yyct10 == codecSelferValueTypeMap5734 {
			yyl10 := r.ReadMapStart()
			if yyl10 == 0 {
				z.DecSendContainerState(codecSelfer_containerMapEnd5734)
			} else {
				x.codecDecodeSelfFromMap(yyl10, d)
			}
		} else if yyct10 == codecSelferValueTypeArray5734 {
			yyl10 := r.ReadArrayStart()
			if yyl10 == 0 {
				z.DecSendContainerState(codecSelfer_containerArrayEnd5734)
			} else {
				x.codecDecodeSelfFromArray(yyl10, d)
			}
		} else {
			panic(codecSelferOnlyMapOrArrayEncodeToStructErr5734)
		}
	}
}
开发者ID:ymonk,项目名称:go-in-practice,代码行数:29,代码来源:user_generated.go

示例5: codecDecodeSelfFromMap

func (x *TestTypeStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	var yys3Slc = z.DecScratchBuffer() // default slice to decode into
	_ = yys3Slc
	var yyhl3 bool = l >= 0
	for yyj3 := 0; ; yyj3++ {
		if yyhl3 {
			if yyj3 >= l {
				break
			}
		} else {
			if r.CheckBreak() {
				break
			}
		}
		z.DecSendContainerState(codecSelfer_containerMapKey1234)
		yys3Slc = r.DecodeBytes(yys3Slc, true, true)
		yys3 := string(yys3Slc)
		z.DecSendContainerState(codecSelfer_containerMapValue1234)
		switch yys3 {
		case "Blah":
			if r.TryDecodeAsNil() {
				x.Blah = ""
			} else {
				x.Blah = string(r.DecodeString())
			}
		default:
			z.DecStructFieldNotFound(-1, yys3)
		} // end switch yys3
	} // end for yyj3
	z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
开发者ID:rosskukulinski,项目名称:kubernetes,代码行数:34,代码来源:types.generated.go

示例6: codecDecodeSelfFromMap

func (x *PodDisruptionBudgetSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	var yys3Slc = z.DecScratchBuffer() // default slice to decode into
	_ = yys3Slc
	var yyhl3 bool = l >= 0
	for yyj3 := 0; ; yyj3++ {
		if yyhl3 {
			if yyj3 >= l {
				break
			}
		} else {
			if r.CheckBreak() {
				break
			}
		}
		z.DecSendContainerState(codecSelfer_containerMapKey1234)
		yys3Slc = r.DecodeBytes(yys3Slc, true, true)
		yys3 := string(yys3Slc)
		z.DecSendContainerState(codecSelfer_containerMapValue1234)
		switch yys3 {
		case "minAvailable":
			if r.TryDecodeAsNil() {
				x.MinAvailable = pkg1_intstr.IntOrString{}
			} else {
				yyv4 := &x.MinAvailable
				yym5 := z.DecBinary()
				_ = yym5
				if false {
				} else if z.HasExtensions() && z.DecExt(yyv4) {
				} else if !yym5 && z.IsJSONHandle() {
					z.DecJSONUnmarshal(yyv4)
				} else {
					z.DecFallback(yyv4, false)
				}
			}
		case "selector":
			if r.TryDecodeAsNil() {
				if x.Selector != nil {
					x.Selector = nil
				}
			} else {
				if x.Selector == nil {
					x.Selector = new(pkg2_unversioned.LabelSelector)
				}
				yym7 := z.DecBinary()
				_ = yym7
				if false {
				} else if z.HasExtensions() && z.DecExt(x.Selector) {
				} else {
					z.DecFallback(x.Selector, false)
				}
			}
		default:
			z.DecStructFieldNotFound(-1, yys3)
		} // end switch yys3
	} // end for yyj3
	z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
开发者ID:matthewrudy,项目名称:kubernetes,代码行数:60,代码来源:types.generated.go

示例7: CodecDecodeSelf

func (x *PodDisruptionBudgetStatus) CodecDecodeSelf(d *codec1978.Decoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	yym37 := z.DecBinary()
	_ = yym37
	if false {
	} else if z.HasExtensions() && z.DecExt(x) {
	} else {
		yyct38 := r.ContainerType()
		if yyct38 == codecSelferValueTypeMap1234 {
			yyl38 := r.ReadMapStart()
			if yyl38 == 0 {
				z.DecSendContainerState(codecSelfer_containerMapEnd1234)
			} else {
				x.codecDecodeSelfFromMap(yyl38, d)
			}
		} else if yyct38 == codecSelferValueTypeArray1234 {
			yyl38 := r.ReadArrayStart()
			if yyl38 == 0 {
				z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
			} else {
				x.codecDecodeSelfFromArray(yyl38, d)
			}
		} else {
			panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
		}
	}
}
开发者ID:ncdc,项目名称:kubernetes,代码行数:29,代码来源:types.generated.go

示例8: codecDecodeSelfFromMap

func (x *APIServiceStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	var yys91Slc = z.DecScratchBuffer() // default slice to decode into
	_ = yys91Slc
	var yyhl91 bool = l >= 0
	for yyj91 := 0; ; yyj91++ {
		if yyhl91 {
			if yyj91 >= l {
				break
			}
		} else {
			if r.CheckBreak() {
				break
			}
		}
		z.DecSendContainerState(codecSelfer_containerMapKey1234)
		yys91Slc = r.DecodeBytes(yys91Slc, true, true)
		yys91 := string(yys91Slc)
		z.DecSendContainerState(codecSelfer_containerMapValue1234)
		switch yys91 {
		default:
			z.DecStructFieldNotFound(-1, yys91)
		} // end switch yys91
	} // end for yyj91
	z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
开发者ID:alex-mohr,项目名称:kubernetes,代码行数:28,代码来源:types.generated.go

示例9: CodecDecodeSelf

func (x *SimpleGetOptions) CodecDecodeSelf(d *codec1978.Decoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	yym84 := z.DecBinary()
	_ = yym84
	if false {
	} else if z.HasExtensions() && z.DecExt(x) {
	} else {
		if r.IsContainerType(codecSelferValueTypeMap1234) {
			yyl85 := r.ReadMapStart()
			if yyl85 == 0 {
				r.ReadEnd()
			} else {
				x.codecDecodeSelfFromMap(yyl85, d)
			}
		} else if r.IsContainerType(codecSelferValueTypeArray1234) {
			yyl85 := r.ReadArrayStart()
			if yyl85 == 0 {
				r.ReadEnd()
			} else {
				x.codecDecodeSelfFromArray(yyl85, d)
			}
		} else {
			panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
		}
	}
}
开发者ID:kuenzaa,项目名称:hypernetes,代码行数:28,代码来源:types.generated.go

示例10: CodecDecodeSelf

func (x *Node) CodecDecodeSelf(d *codec1978.Decoder) {
	var h codecSelfer1819
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	yym1 := z.DecBinary()
	_ = yym1
	if false {
	} else if z.HasExtensions() && z.DecExt(x) {
	} else {
		yyct2 := r.ContainerType()
		if yyct2 == codecSelferValueTypeMap1819 {
			yyl2 := r.ReadMapStart()
			if yyl2 == 0 {
				z.DecSendContainerState(codecSelfer_containerMapEnd1819)
			} else {
				x.codecDecodeSelfFromMap(yyl2, d)
			}
		} else if yyct2 == codecSelferValueTypeArray1819 {
			yyl2 := r.ReadArrayStart()
			if yyl2 == 0 {
				z.DecSendContainerState(codecSelfer_containerArrayEnd1819)
			} else {
				x.codecDecodeSelfFromArray(yyl2, d)
			}
		} else {
			panic(codecSelferOnlyMapOrArrayEncodeToStructErr1819)
		}
	}
}
开发者ID:hongchaodeng,项目名称:etcd,代码行数:29,代码来源:keys.generated.go

示例11: CodecDecodeSelf

func (x *LeaderElectionConfiguration) CodecDecodeSelf(d *codec1978.Decoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	yym195 := z.DecBinary()
	_ = yym195
	if false {
	} else if z.HasExtensions() && z.DecExt(x) {
	} else {
		yyct196 := r.ContainerType()
		if yyct196 == codecSelferValueTypeMap1234 {
			yyl196 := r.ReadMapStart()
			if yyl196 == 0 {
				z.DecSendContainerState(codecSelfer_containerMapEnd1234)
			} else {
				x.codecDecodeSelfFromMap(yyl196, d)
			}
		} else if yyct196 == codecSelferValueTypeArray1234 {
			yyl196 := r.ReadArrayStart()
			if yyl196 == 0 {
				z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
			} else {
				x.codecDecodeSelfFromArray(yyl196, d)
			}
		} else {
			panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
		}
	}
}
开发者ID:jpgbus,项目名称:kubernetes,代码行数:29,代码来源:types.generated.go

示例12: CodecDecodeSelf

func (x *CertificateSigningRequestSpec) CodecDecodeSelf(d *codec1978.Decoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	yym46 := z.DecBinary()
	_ = yym46
	if false {
	} else if z.HasExtensions() && z.DecExt(x) {
	} else {
		yyct47 := r.ContainerType()
		if yyct47 == codecSelferValueTypeMap1234 {
			yyl47 := r.ReadMapStart()
			if yyl47 == 0 {
				z.DecSendContainerState(codecSelfer_containerMapEnd1234)
			} else {
				x.codecDecodeSelfFromMap(yyl47, d)
			}
		} else if yyct47 == codecSelferValueTypeArray1234 {
			yyl47 := r.ReadArrayStart()
			if yyl47 == 0 {
				z.DecSendContainerState(codecSelfer_containerArrayEnd1234)
			} else {
				x.codecDecodeSelfFromArray(yyl47, d)
			}
		} else {
			panic(codecSelferOnlyMapOrArrayEncodeToStructErr1234)
		}
	}
}
开发者ID:eljefedelrodeodeljefe,项目名称:kubernetes,代码行数:29,代码来源:types.generated.go

示例13: codecDecodeSelfFromMap

func (x *TestType) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	var yys19Slc = z.DecScratchBuffer() // default slice to decode into
	_ = yys19Slc
	var yyhl19 bool = l >= 0
	for yyj19 := 0; ; yyj19++ {
		if yyhl19 {
			if yyj19 >= l {
				break
			}
		} else {
			if r.CheckBreak() {
				break
			}
		}
		z.DecSendContainerState(codecSelfer_containerMapKey1234)
		yys19Slc = r.DecodeBytes(yys19Slc, true, true)
		yys19 := string(yys19Slc)
		z.DecSendContainerState(codecSelfer_containerMapValue1234)
		switch yys19 {
		case "metadata":
			if r.TryDecodeAsNil() {
				x.ObjectMeta = pkg2_api.ObjectMeta{}
			} else {
				yyv20 := &x.ObjectMeta
				yym21 := z.DecBinary()
				_ = yym21
				if false {
				} else if z.HasExtensions() && z.DecExt(yyv20) {
				} else {
					z.DecFallback(yyv20, false)
				}
			}
		case "status":
			if r.TryDecodeAsNil() {
				x.Status = TestTypeStatus{}
			} else {
				yyv22 := &x.Status
				yyv22.CodecDecodeSelf(d)
			}
		case "kind":
			if r.TryDecodeAsNil() {
				x.Kind = ""
			} else {
				x.Kind = string(r.DecodeString())
			}
		case "apiVersion":
			if r.TryDecodeAsNil() {
				x.APIVersion = ""
			} else {
				x.APIVersion = string(r.DecodeString())
			}
		default:
			z.DecStructFieldNotFound(-1, yys19)
		} // end switch yys19
	} // end for yyj19
	z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
开发者ID:pault84,项目名称:kubernetes,代码行数:60,代码来源:types.generated.go

示例14: codecDecodeSelfFromMap

func (x *ImageReviewContainerSpec) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	var yys64Slc = z.DecScratchBuffer() // default slice to decode into
	_ = yys64Slc
	var yyhl64 bool = l >= 0
	for yyj64 := 0; ; yyj64++ {
		if yyhl64 {
			if yyj64 >= l {
				break
			}
		} else {
			if r.CheckBreak() {
				break
			}
		}
		z.DecSendContainerState(codecSelfer_containerMapKey1234)
		yys64Slc = r.DecodeBytes(yys64Slc, true, true)
		yys64 := string(yys64Slc)
		z.DecSendContainerState(codecSelfer_containerMapValue1234)
		switch yys64 {
		case "image":
			if r.TryDecodeAsNil() {
				x.Image = ""
			} else {
				x.Image = string(r.DecodeString())
			}
		default:
			z.DecStructFieldNotFound(-1, yys64)
		} // end switch yys64
	} // end for yyj64
	z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
开发者ID:ncdc,项目名称:kubernetes,代码行数:34,代码来源:types.generated.go

示例15: codecDecodeSelfFromMap

func (x *TokenReviewStatus) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
	var h codecSelfer1234
	z, r := codec1978.GenHelperDecoder(d)
	_, _, _ = h, z, r
	var yys3Slc = z.DecScratchBuffer() // default slice to decode into
	_ = yys3Slc
	var yyhl3 bool = l >= 0
	for yyj3 := 0; ; yyj3++ {
		if yyhl3 {
			if yyj3 >= l {
				break
			}
		} else {
			if r.CheckBreak() {
				break
			}
		}
		z.DecSendContainerState(codecSelfer_containerMapKey1234)
		yys3Slc = r.DecodeBytes(yys3Slc, true, true)
		yys3 := string(yys3Slc)
		z.DecSendContainerState(codecSelfer_containerMapValue1234)
		switch yys3 {
		case "authenticated":
			if r.TryDecodeAsNil() {
				x.Authenticated = false
			} else {
				yyv4 := &x.Authenticated
				yym5 := z.DecBinary()
				_ = yym5
				if false {
				} else {
					*((*bool)(yyv4)) = r.DecodeBool()
				}
			}
		case "user":
			if r.TryDecodeAsNil() {
				x.User = UserInfo{}
			} else {
				yyv6 := &x.User
				yyv6.CodecDecodeSelf(d)
			}
		case "error":
			if r.TryDecodeAsNil() {
				x.Error = ""
			} else {
				yyv7 := &x.Error
				yym8 := z.DecBinary()
				_ = yym8
				if false {
				} else {
					*((*string)(yyv7)) = r.DecodeString()
				}
			}
		default:
			z.DecStructFieldNotFound(-1, yys3)
		} // end switch yys3
	} // end for yyj3
	z.DecSendContainerState(codecSelfer_containerMapEnd1234)
}
开发者ID:kubernetes,项目名称:kubernetes,代码行数:59,代码来源:types.generated.go


注:本文中的github.com/ugorji/go/codec.GenHelperDecoder函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。