-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
5,397 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
// ************************************************************ | ||
// DO NOT EDIT. | ||
// THIS FILE IS AUTO-GENERATED BY codecgen. | ||
// ************************************************************ | ||
|
||
package v1alpha1 | ||
|
||
import ( | ||
"errors" | ||
"fmt" | ||
"reflect" | ||
"runtime" | ||
|
||
codec1978 "github.com/ugorji/go/codec" | ||
) | ||
|
||
const ( | ||
// ----- content types ---- | ||
codecSelferC_UTF81206 = 1 | ||
codecSelferC_RAW1206 = 0 | ||
// ----- value types used ---- | ||
codecSelferValueTypeArray1206 = 10 | ||
codecSelferValueTypeMap1206 = 9 | ||
// ----- containerStateValues ---- | ||
codecSelfer_containerMapKey1206 = 2 | ||
codecSelfer_containerMapValue1206 = 3 | ||
codecSelfer_containerMapEnd1206 = 4 | ||
codecSelfer_containerArrayElem1206 = 6 | ||
codecSelfer_containerArrayEnd1206 = 7 | ||
) | ||
|
||
var ( | ||
codecSelferBitsize1206 = uint8(reflect.TypeOf(uint(0)).Bits()) | ||
codecSelferOnlyMapOrArrayEncodeToStructErr1206 = errors.New(`only encoded map or array can be decoded into a struct`) | ||
) | ||
|
||
type codecSelfer1206 struct{} | ||
|
||
func init() { | ||
if codec1978.GenVersion != 5 { | ||
_, file, _, _ := runtime.Caller(0) | ||
err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", | ||
5, codec1978.GenVersion, file) | ||
panic(err) | ||
} | ||
if false { // reference the types, but skip this branch at build/run time | ||
} | ||
} | ||
|
||
func (x PrefixType) CodecEncodeSelf(e *codec1978.Encoder) { | ||
var h codecSelfer1206 | ||
z, r := codec1978.GenHelperEncoder(e) | ||
_, _, _ = h, z, r | ||
yym1 := z.EncBinary() | ||
_ = yym1 | ||
if false { | ||
} else if z.HasExtensions() && z.EncExt(x) { | ||
} else if !yym1 && z.IsJSONHandle() { | ||
z.EncJSONMarshal(x) | ||
} else { | ||
r.EncodeInt(int64(x)) | ||
} | ||
} | ||
|
||
func (x *PrefixType) CodecDecodeSelf(d *codec1978.Decoder) { | ||
var h codecSelfer1206 | ||
z, r := codec1978.GenHelperDecoder(d) | ||
_, _, _ = h, z, r | ||
yym1 := z.DecBinary() | ||
_ = yym1 | ||
if false { | ||
} else if z.HasExtensions() && z.DecExt(x) { | ||
} else if !yym1 && z.IsJSONHandle() { | ||
z.DecJSONUnmarshal(x) | ||
} else { | ||
*((*int)(x)) = int(r.DecodeInt(codecSelferBitsize1206)) | ||
} | ||
} |
Oops, something went wrong.