Skip to content

Commit

Permalink
Generate ugorji stuff (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
tamalsaha authored Oct 2, 2017
1 parent a92313c commit 87b78d7
Show file tree
Hide file tree
Showing 3 changed files with 5,397 additions and 0 deletions.
78 changes: 78 additions & 0 deletions apis/stash/v1alpha1/prefix_type.generated.go
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))
}
}
Loading

0 comments on commit 87b78d7

Please sign in to comment.