| 1 | package encodingscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/ |
| 2 | |
| 3 | import ( |
| 4 | "fmtscip-go gomod github.com/golang/go/src go1.14 fmt/" |
| 5 | "reflectscip-go gomod github.com/golang/go/src go1.14 reflect/" |
| 6 | "stringsscip-go gomod github.com/golang/go/src go1.14 strings/" |
| 7 | ) |
| 8 | |
| 9 | type MarshalerErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/MarshalerError# struct { |
| 10 | Typescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/MarshalerError#Type. reflectscip-go gomod github.com/golang/go/src go1.14 reflect/.Typescip-go gomod github.com/golang/go/src go1.14 reflect/Type# |
| 11 | Errscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/MarshalerError#Err. error |
| 12 | } |
| 13 | |
| 14 | func (e *MarshalerErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/MarshalerError#) Errorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/MarshalerError#Error().() string { |
| 15 | return "rethinkdb: error calling MarshalRQL for type " + e.Typescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/MarshalerError#Type..Stringscip-go gomod github.com/golang/go/src go1.14 reflect/Type#String().() + ": " + e.Errscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/MarshalerError#Err..Error() |
| 16 | } |
| 17 | |
| 18 | type InvalidUnmarshalErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/InvalidUnmarshalError# struct { |
| 19 | Typescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/InvalidUnmarshalError#Type. reflectscip-go gomod github.com/golang/go/src go1.14 reflect/.Typescip-go gomod github.com/golang/go/src go1.14 reflect/Type# |
| 20 | } |
| 21 | |
| 22 | func (e *InvalidUnmarshalErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/InvalidUnmarshalError#) Errorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/InvalidUnmarshalError#Error().() string { |
| 23 | if e.Typescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/InvalidUnmarshalError#Type. == nil { |
| 24 | return "rethinkdb: UnmarshalRQL(nil)" |
| 25 | } |
| 26 | |
| 27 | if e.Typescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/InvalidUnmarshalError#Type..Kindscip-go gomod github.com/golang/go/src go1.14 reflect/Type#Kind().() != reflectscip-go gomod github.com/golang/go/src go1.14 reflect/.Ptrscip-go gomod github.com/golang/go/src go1.14 reflect/Ptr. { |
| 28 | return "rethinkdb: UnmarshalRQL(non-pointer " + e.Typescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/InvalidUnmarshalError#Type..Stringscip-go gomod github.com/golang/go/src go1.14 reflect/Type#String().() + ")" |
| 29 | } |
| 30 | return "rethinkdb: UnmarshalRQL(nil " + e.Typescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/InvalidUnmarshalError#Type..Stringscip-go gomod github.com/golang/go/src go1.14 reflect/Type#String().() + ")" |
| 31 | } |
| 32 | |
| 33 | // An InvalidTypeError describes a value that was |
| 34 | // not appropriate for a value of a specific Go type. |
| 35 | type DecodeTypeErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/DecodeTypeError# struct { |
| 36 | DestTypescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/DecodeTypeError#DestType., SrcTypescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/DecodeTypeError#SrcType. reflectscip-go gomod github.com/golang/go/src go1.14 reflect/.Typescip-go gomod github.com/golang/go/src go1.14 reflect/Type# |
| 37 | Reasonscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/DecodeTypeError#Reason. string |
| 38 | } |
| 39 | |
| 40 | func (e *DecodeTypeErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/DecodeTypeError#) Errorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/DecodeTypeError#Error().() string { |
| 41 | if e.Reasonscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/DecodeTypeError#Reason. != "" { |
| 42 | return "rethinkdb: could not decode type " + e.SrcTypescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/DecodeTypeError#SrcType..Stringscip-go gomod github.com/golang/go/src go1.14 reflect/Type#String().() + " into Go value of type " + e.DestTypescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/DecodeTypeError#DestType..Stringscip-go gomod github.com/golang/go/src go1.14 reflect/Type#String().() + ": " + e.Reasonscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/DecodeTypeError#Reason. |
| 43 | } else { |
| 44 | return "rethinkdb: could not decode type " + e.SrcTypescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/DecodeTypeError#SrcType..Stringscip-go gomod github.com/golang/go/src go1.14 reflect/Type#String().() + " into Go value of type " + e.DestTypescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/DecodeTypeError#DestType..Stringscip-go gomod github.com/golang/go/src go1.14 reflect/Type#String().() |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | // An UnsupportedTypeError is returned by Marshal when attempting |
| 49 | // to encode an unsupported value type. |
| 50 | type UnsupportedTypeErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/UnsupportedTypeError# struct { |
| 51 | Typescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/UnsupportedTypeError#Type. reflectscip-go gomod github.com/golang/go/src go1.14 reflect/.Typescip-go gomod github.com/golang/go/src go1.14 reflect/Type# |
| 52 | } |
| 53 | |
| 54 | func (e *UnsupportedTypeErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/UnsupportedTypeError#) Errorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/UnsupportedTypeError#Error().() string { |
| 55 | return "rethinkdb: unsupported type: " + e.Typescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/UnsupportedTypeError#Type..Stringscip-go gomod github.com/golang/go/src go1.14 reflect/Type#String().() |
| 56 | } |
| 57 | |
| 58 | // An UnsupportedTypeError is returned by Marshal when attempting |
| 59 | // to encode an unexpected value type. |
| 60 | type UnexpectedTypeErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/UnexpectedTypeError# struct { |
| 61 | DestTypescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/UnexpectedTypeError#DestType., SrcTypescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/UnexpectedTypeError#SrcType. reflectscip-go gomod github.com/golang/go/src go1.14 reflect/.Typescip-go gomod github.com/golang/go/src go1.14 reflect/Type# |
| 62 | } |
| 63 | |
| 64 | func (e *UnexpectedTypeErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/UnexpectedTypeError#) Errorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/UnexpectedTypeError#Error().() string { |
| 65 | return "rethinkdb: expected type: " + e.DestTypescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/UnexpectedTypeError#DestType..Stringscip-go gomod github.com/golang/go/src go1.14 reflect/Type#String().() + ", got " + e.SrcTypescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/UnexpectedTypeError#SrcType..Stringscip-go gomod github.com/golang/go/src go1.14 reflect/Type#String().() |
| 66 | } |
| 67 | |
| 68 | type UnsupportedValueErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/UnsupportedValueError# struct { |
| 69 | Valuescip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/UnsupportedValueError#Value. reflectscip-go gomod github.com/golang/go/src go1.14 reflect/.Valuescip-go gomod github.com/golang/go/src go1.14 reflect/Value# |
| 70 | Strscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/UnsupportedValueError#Str. string |
| 71 | } |
| 72 | |
| 73 | func (e *UnsupportedValueErrorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/UnsupportedValueError#) Errorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/UnsupportedValueError#Error().() string { |
| 74 | return "rethinkdb: unsupported value: " + e.Strscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/UnsupportedValueError#Str. |
| 75 | } |
| 76 | |
| 77 | // Error implements the error interface and can represents multiple |
| 78 | // errors that occur in the course of a single decode. |
| 79 | type Errorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/Error# struct { |
| 80 | Errorsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/Error#Errors. []string |
| 81 | } |
| 82 | |
| 83 | func (e *Errorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/Error#) Errorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/Error#Error().() string { |
| 84 | points := make([]string, len(e.Errorsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/Error#Errors.)) |
| 85 | for i, err := range e.Errorsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/Error#Errors. { |
| 86 | points[i] = fmtscip-go gomod github.com/golang/go/src go1.14 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.14 fmt/Sprintf().("* %s", err) |
| 87 | } |
| 88 | |
| 89 | return fmtscip-go gomod github.com/golang/go/src go1.14 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.14 fmt/Sprintf().( |
| 90 | "%d error(s) decoding:\n\n%s", |
| 91 | len(e.Errorsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/Error#Errors.), stringsscip-go gomod github.com/golang/go/src go1.14 strings/.Joinscip-go gomod github.com/golang/go/src go1.14 strings/Join().(points, "\n")) |
| 92 | } |
| 93 | |
| 94 | func appendErrorsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/appendErrors().(errors []string, err error) []string { |
| 95 | switch e := err.(type) { |
| 96 | case *Errorscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/Error#: |
| 97 | return append(errors, e.Errorsscip-go gomod gopkg.in/rethinkdb/rethinkdb-go.v6 . `gopkg.in/rethinkdb/rethinkdb-go.v6/encoding`/Error#Errors....) |
| 98 | default: |
| 99 | return append(errors, e.Error()) |
| 100 | } |
| 101 | } |