Documentation ¶
Overview ¶
pack/unpack fixed length variable
Index ¶
- Constants
- Variables
- func AddrEqual(x, y interface{}) bool
- func ConvertSliceValueType(destTyp reflect.Type, v reflect.Value) (reflect.Value, error)
- func CopyMap(inMapValue, outMapValue reflect.Value) error
- func CopySlice(inSlice, outSlice reflect.Value) error
- func EncNull(b []byte) []byte
- func EnsureInterface(in interface{}, err error) (interface{}, error)
- func EnsurePackValue(in interface{}) reflect.Value
- func EnsureRawAny(in interface{}) interface{}
- func EnsureRawValue(in interface{}) reflect.Value
- func GetGoType(o interface{}) string
- func PackFloat64(v float64) []byte
- func PackInt16(v int16) []byte
- func PackInt32(v int32) []byte
- func PackInt64(v int64) []byte
- func PackInt8(v int8, b []byte) []byte
- func PackPtr(v reflect.Value) reflect.Value
- func PackPtrInterface(s interface{}, value reflect.Value) interface{}
- func PackUint16(v uint16) []byte
- func ReflectResponse(in interface{}, out interface{}) error
- func RegisterJavaEnum(o POJOEnum) int
- func RegisterPOJO(o POJO) int
- func RegisterPOJOMapping(javaClassName string, o interface{}) int
- func RegisterPOJOs(os ...POJO) []int
- func SetCollectionSerialize(collection JavaCollectionObject)
- func SetJavaSqlTimeSerialize(time java_sql_time.JavaSqlTime)
- func SetSerializer(javaClassName string, codec Serializer)
- func SetSlice(dest reflect.Value, objects interface{}) error
- func SetTagIdentifier(s string)
- func SetValue(dest, v reflect.Value)
- func Slice(s string) (b []byte)
- func SprintHex(b []byte) (rs string)
- func ToMapStringString(origin map[interface{}]interface{}) map[string]string
- func UnRegisterPOJOs(os ...POJO) []int
- func UnpackFloat64(b []byte) float64
- func UnpackInt16(b []byte) int16
- func UnpackInt32(b []byte) int32
- func UnpackInt64(b []byte) int64
- func UnpackPtr(v reflect.Value) reflect.Value
- func UnpackPtrType(typ reflect.Type) reflect.Type
- func UnpackPtrValue(v reflect.Value) reflect.Value
- func UnpackUint16(b []byte) uint16
- type BooleanArray
- type ByteArray
- type CharacterArray
- type ClassInfo
- type DecimalSerializer
- type Decoder
- func (d *Decoder) Buffered() int
- func (d *Decoder) Clean()
- func (d *Decoder) Decode() (interface{}, error)
- func (d *Decoder) DecodeValue() (interface{}, error)
- func (d *Decoder) Discard(n int) (int, error)
- func (d *Decoder) FindClassInfo(javaName string) *ClassInfo
- func (d *Decoder) ReadByte() (byte, error)
- func (d *Decoder) Reset(b []byte) *Decoder
- type DoubleArray
- type DubboHeader
- type Encoder
- func (e *Encoder) Append(buf []byte)
- func (e *Encoder) Buffer() []byte
- func (e *Encoder) Clean()
- func (e *Encoder) Encode(v interface{}) error
- func (e *Encoder) EncodeMapAsClass(className string, m map[string]interface{}) error
- func (e *Encoder) EncodeMapAsObject(clsDef *ClassInfo, m map[string]interface{}) error
- func (e *Encoder) EncodeMapClass(m map[string]interface{}) error
- func (e *Encoder) ReuseBufferClean()
- type FloatArray
- type HessianCodec
- type IntegerArray
- type IntegerSerializer
- type JavaCollectionObject
- type JavaCollectionSerializer
- type JavaEnum
- type JavaEnumClass
- type JavaSqlTimeSerializer
- type LongArray
- type Object
- type POJO
- type POJOEnum
- type POJORegistry
- type PackageType
- type Param
- type Request
- type Response
- type Serializer
- type Service
- type ShortArray
- type TypeRefs
- type UnknownException
Constants ¶
const ( TAG_READ = int32(-1) ASCII_GAP = 32 CHUNK_SIZE = 4096 BC_BINARY = byte('B') // final chunk BC_BINARY_CHUNK = byte('A') // non-final chunk BC_BINARY_DIRECT = byte(0x20) // 1-byte length binary BINARY_DIRECT_MAX = byte(0x0f) BC_BINARY_SHORT = byte(0x34) // 2-byte length binary BINARY_SHORT_MAX = 0x3ff // 0-1023 binary BC_DATE = byte(0x4a) // 64-bit millisecond UTC date BC_DATE_MINUTE = byte(0x4b) // 32-bit minute UTC date BC_DOUBLE = byte('D') // IEEE 64-bit double BC_DOUBLE_ZERO = byte(0x5b) BC_DOUBLE_ONE = byte(0x5c) BC_DOUBLE_BYTE = byte(0x5d) BC_DOUBLE_SHORT = byte(0x5e) BC_DOUBLE_MILL = byte(0x5f) BC_FALSE = byte('F') // boolean false BC_INT = byte('I') // 32-bit int INT_DIRECT_MIN = -0x10 INT_DIRECT_MAX = byte(0x2f) BC_INT_ZERO = byte(0x90) INT_BYTE_MIN = -0x800 INT_BYTE_MAX = 0x7ff BC_INT_BYTE_ZERO = byte(0xc8) BC_END = byte('Z') INT_SHORT_MIN = -0x40000 INT_SHORT_MAX = 0x3ffff BC_INT_SHORT_ZERO = byte(0xd4) BC_LIST_VARIABLE = byte(0x55) BC_LIST_FIXED = byte('V') BC_LIST_VARIABLE_UNTYPED = byte(0x57) BC_LIST_FIXED_UNTYPED = byte(0x58) BC_LIST_DIRECT = byte(0x70) BC_LIST_DIRECT_UNTYPED = byte(0x78) LIST_DIRECT_MAX = byte(0x7) BC_LONG = byte('L') // 64-bit signed integer LONG_DIRECT_MIN = -0x08 LONG_DIRECT_MAX = byte(0x0f) BC_LONG_ZERO = byte(0xe0) LONG_BYTE_MIN = -0x800 LONG_BYTE_MAX = 0x7ff BC_LONG_BYTE_ZERO = byte(0xf8) LONG_SHORT_MIN = -0x40000 LONG_SHORT_MAX = 0x3ffff BC_LONG_SHORT_ZERO = byte(0x3c) BC_LONG_INT = byte(0x59) BC_MAP = byte('M') BC_MAP_UNTYPED = byte('H') BC_NULL = byte('N') // x4e BC_OBJECT = byte('O') BC_OBJECT_DEF = byte('C') BC_OBJECT_DIRECT = byte(0x60) OBJECT_DIRECT_MAX = byte(0x0f) BC_REF = byte(0x51) BC_STRING = byte('S') // final string BC_STRING_CHUNK = byte('R') // non-final string BC_STRING_DIRECT = byte(0x00) STRING_DIRECT_MAX = byte(0x1f) BC_STRING_SHORT = byte(0x30) STRING_SHORT_MAX = 0x3ff BC_TRUE = byte('T') P_PACKET_CHUNK = byte(0x4f) P_PACKET = byte('P') P_PACKET_DIRECT = byte(0x80) PACKET_DIRECT_MAX = byte(0x7f) P_PACKET_SHORT = byte(0x70) PACKET_SHORT_MAX = 0xfff ARRAY_STRING = "[string" ARRAY_INT = "[int" ARRAY_DOUBLE = "[double" ARRAY_FLOAT = "[float" ARRAY_BOOL = "[boolean" ARRAY_LONG = "[long" PATH_KEY = "path" GROUP_KEY = "group" INTERFACE_KEY = "interface" VERSION_KEY = "version" TIMEOUT_KEY = "timeout" STRING_NIL = "" STRING_TRUE = "true" STRING_FALSE = "false" STRING_ZERO = "0.0" STRING_ONE = "1.0" )
constants
const ( Response_OK byte = 20 Response_CLIENT_TIMEOUT byte = 30 Response_SERVER_TIMEOUT byte = 31 Response_BAD_REQUEST byte = 40 Response_BAD_RESPONSE byte = 50 Response_SERVICE_NOT_FOUND byte = 60 Response_SERVICE_ERROR byte = 70 Response_SERVER_ERROR byte = 80 Response_CLIENT_ERROR byte = 90 // According to "java dubbo" There are two cases of response: // 1. with attachments // 2. no attachments RESPONSE_WITH_EXCEPTION int32 = 0 RESPONSE_VALUE int32 = 1 RESPONSE_NULL_VALUE int32 = 2 RESPONSE_WITH_EXCEPTION_WITH_ATTACHMENTS int32 = 3 RESPONSE_VALUE_WITH_ATTACHMENTS int32 = 4 RESPONSE_NULL_VALUE_WITH_ATTACHMENTS int32 = 5 )
Response related consts
const ( // header length. HEADER_LENGTH = 16 // magic header MAGIC = uint16(0xdabb) MAGIC_HIGH = byte(0xda) MAGIC_LOW = byte(0xbb) // message flag. FLAG_REQUEST = byte(0x80) FLAG_TWOWAY = byte(0x40) FLAG_EVENT = byte(0x20) // for heartbeat SERIAL_MASK = 0x1f DUBBO_VERSION = "2.5.4" DUBBO_VERSION_KEY = "dubbo" DEFAULT_DUBBO_PROTOCOL_VERSION = "2.0.2" // Dubbo RPC protocol version, for compatibility, it must not be between 2.0.10 ~ 2.6.2 LOWEST_VERSION_FOR_RESPONSE_ATTACHMENT = 2000200 DEFAULT_LEN = 8388608 // 8 * 1024 * 1024 default body max length )
*
- the dubbo protocol header length is 16 Bytes.
- the first 2 Bytes is magic code '0xdabb'
- the next 1 Byte is message flags, in which its 16-20 bit is serial id, 21 for event, 22 for two way, 23 for request/response flag
- the next 1 Bytes is response state.
- the next 8 Bytes is package DI.
- the next 4 Bytes is package length. *
const ( JAVA_IDENT_REGEX = "(?:[_$a-zA-Z][_$a-zA-Z0-9]*)" CLASS_DESC = "(?:L" + JAVA_IDENT_REGEX + "(?:\\/" + JAVA_IDENT_REGEX + ")*;)" ARRAY_DESC = "(?:\\[+(?:(?:[VZBCDFIJS])|" + CLASS_DESC + "))" DESC_REGEX = "(?:(?:[VZBCDFIJS])|" + CLASS_DESC + "|" + ARRAY_DESC + ")" )
regular
const ( PackageError = PackageType(0x01) PackageRequest = PackageType(0x02) PackageResponse = PackageType(0x04) PackageHeartbeat = PackageType(0x08) PackageRequest_TwoWay = PackageType(0x10) PackageResponse_Exception = PackageType(0x20) PackageType_BitSize = 0x2f )
enum part
const ( // Zero : byte zero Zero = byte(0x00) )
Variables ¶
var ( DubboRequestHeaderBytesTwoWay = [HEADER_LENGTH]byte{MAGIC_HIGH, MAGIC_LOW, FLAG_REQUEST | FLAG_TWOWAY} DubboRequestHeaderBytes = [HEADER_LENGTH]byte{MAGIC_HIGH, MAGIC_LOW, FLAG_REQUEST} DubboResponseHeaderBytes = [HEADER_LENGTH]byte{MAGIC_HIGH, MAGIC_LOW, Zero, Response_OK} DubboRequestHeartbeatHeader = [HEADER_LENGTH]byte{MAGIC_HIGH, MAGIC_LOW, FLAG_REQUEST | FLAG_TWOWAY | FLAG_EVENT} DubboResponseHeartbeatHeader = [HEADER_LENGTH]byte{MAGIC_HIGH, MAGIC_LOW, FLAG_EVENT} )
Dubbo request response related consts
var ( ErrHeaderNotEnough = perrors.New("header buffer too short") ErrBodyNotEnough = perrors.New("body buffer too short") ErrJavaException = perrors.New("got java exception") ErrIllegalPackage = perrors.New("illegal package!") )
Error part
var ( ErrNotEnoughBuf = perrors.Errorf("not enough buf") ErrIllegalRefIndex = perrors.Errorf("illegal ref index") )
Error part
var DescRegex, _ = regexp.Compile(DESC_REGEX)
DescRegex ...
var ZeroDate = time.Time{}
Functions ¶
func ConvertSliceValueType ¶
ConvertSliceValueType convert to slice of destination type
func EncNull ¶ added in v1.7.0
/////////////////////////////////////// Null ///////////////////////////////////////
func EnsureInterface ¶
EnsureInterface get value of reflect.Value return original value if not reflect.Value
func EnsurePackValue ¶
EnsurePackValue pack the interface with value
func EnsureRawAny ¶ added in v1.10.2
func EnsureRawAny(in interface{}) interface{}
EnsureRawAny unpack if in is a reflect.Value or a ref holder.
func EnsureRawValue ¶
EnsureRawValue pack the interface with value, and make sure it's not a ref holder
func GetGoType ¶ added in v1.9.5
func GetGoType(o interface{}) string
GetGoType get the raw go type name with package.
func PackFloat64 ¶
PackFloat64 packs float64 to byte array [10].pack('G').bytes => [64, 36, 0, 0, 0, 0, 0, 0] PackFloat64 invokes go's official math library function Float64bits.
func PackInt64 ¶
PackInt64 packs int64 to byte array [10].pack('q>').bytes => [0, 0, 0, 0, 0, 0, 0, 10]
func PackPtrInterface ¶ added in v1.9.5
PackPtrInterface pack struct interface to pointer interface
func PackUint16 ¶
PackUint16 packs uint16 to byte array [10].pack('N').bytes => [0, 0, 0, 10]
func ReflectResponse ¶
func ReflectResponse(in interface{}, out interface{}) error
ReflectResponse reflect return value TODO response object should not be copied again to another object, it should be the exact type of the object
func RegisterJavaEnum ¶
RegisterJavaEnum Register a value type JavaEnum variable.
func RegisterPOJO ¶
RegisterPOJO Register a POJO instance. The return value is -1 if @o has been registered.
func RegisterPOJOMapping ¶ added in v1.7.0
RegisterPOJOMapping Register a POJO instance. The return value is -1 if @o has been registered.
func RegisterPOJOs ¶
RegisterPOJOs register a POJO instance arr @os. The return value is @os's mathching index array, in which "-1" means its matching POJO has been registered.
func SetCollectionSerialize ¶ added in v1.5.0
func SetCollectionSerialize(collection JavaCollectionObject)
func SetJavaSqlTimeSerialize ¶ added in v1.6.3
func SetJavaSqlTimeSerialize(time java_sql_time.JavaSqlTime)
SetJavaSqlTimeSerialize register serializer for java.sql.Time & java.sql.Date
func SetSerializer ¶
func SetSerializer(javaClassName string, codec Serializer)
func SetTagIdentifier ¶
func SetTagIdentifier(s string)
SetTagIdentifier for customize struct filed tag of hessian, your can use it like:
hessian.SetTagIdentifier("json") type MyUser struct { UserFullName string `json:"user_full_name"` FamilyPhoneNumber string // default convert to => familyPhoneNumber } var user MyUser hessian.NewEncoder().Encode(user)
func SetValue ¶
SetValue set the value to dest. It will auto check the Ptr pack level and unpack/pack to the right level. It make sure success to set value
func ToMapStringString ¶ added in v1.3.0
func UnRegisterPOJOs ¶ added in v1.7.0
UnRegisterPOJOs unregister POJO instances. It is easy for test.
func UnpackFloat64 ¶
UnpackFloat64 unpacks float64 from byte array Double (0,8).unpack('G)
func UnpackInt16 ¶
UnpackInt16 unpacks int16 from byte array (0,2).unpack('n')
func UnpackInt32 ¶
UnpackInt32 unpacks int32 from byte array (0,4).unpack('N')
func UnpackInt64 ¶
UnpackInt64 unpacks int64 from byte array long (0,8).unpack('q>')
func UnpackPtrType ¶
UnpackPtrType unpack pointer type to original type
func UnpackPtrValue ¶
UnpackPtrValue unpack pointer value to original value return the pointer if its elem is zero value, because lots of operations on zero value is invalid
func UnpackUint16 ¶
UnpackUint16 unpacks int16 from byte array (0,2).unpack('n')
Types ¶
type BooleanArray ¶ added in v1.9.4
type BooleanArray struct {
Values []bool
}
BooleanArray Boolean[] Deprecated: it will not be supported in next major version, being replaced by a slice type instead.
func (*BooleanArray) JavaClassName ¶ added in v1.9.4
func (*BooleanArray) JavaClassName() string
nolint
type ByteArray ¶ added in v1.9.4
type ByteArray struct {
Values []uint8
}
ByteArray Byte[] Deprecated: it will not be supported in next major version, being replaced by a slice type instead.
type CharacterArray ¶ added in v1.9.4
type CharacterArray struct {
Values string
}
CharacterArray Character[] Deprecated: it will not be supported in next major version, being replaced by a slice type instead.
func (*CharacterArray) JavaClassName ¶ added in v1.9.4
func (*CharacterArray) JavaClassName() string
nolint
type ClassInfo ¶ added in v1.11.0
type ClassInfo struct {
// contains filtered or unexported fields
}
type Decoder ¶
type Decoder struct { // In strict mode, a class data can be decoded only when the class is registered, otherwise error returned. // In non-strict mode, a class data will be decoded to a map when the class is not registered. // The default is non-strict mode, user can change it as required. Strict bool // contains filtered or unexported fields }
Decoder struct
func NewCheapDecoderWithSkip ¶ added in v1.6.0
NewCheapDecoderWithSkip generate a decoder instance with skip, only for cache pool, before decode Reset should be called. For example, with pooling use, will effectively improve performance
var hessianPool = &sync.Pool{ New: func() interface{} { return hessian.NewCheapDecoderWithSkip([]byte{}) }, } decoder := hessianPool.Get().(*hessian.Decoder) fill decode data decoder.Reset(data[:]) decode anything ... hessianPool.Put(decoder)
func NewDecoderSize ¶ added in v1.6.0
NewDecoderSize generate a decoder instance.
func NewDecoderWithSkip ¶ added in v1.3.0
NewDecoderWithSkip generate a decoder instance with skip.
func NewStrictDecoder ¶ added in v1.11.0
NewStrictDecoder generates a strict mode decoder instance. In strict mode, all target class must be registered.
func (*Decoder) Clean ¶ added in v1.8.0
func (d *Decoder) Clean()
Clean clean the Decoder (room) for a new object decoding. Notice it won't reset reader buffer and will continue to read data from it.
func (*Decoder) DecodeValue ¶
DecodeValue parse hessian data, the return value maybe a reflection value when it's a map, list, object, or ref.
func (*Decoder) FindClassInfo ¶ added in v1.11.0
FindClassInfo find ClassInfo for the given name in decoder class info list.
type DoubleArray ¶ added in v1.9.4
type DoubleArray struct {
Values []float64
}
DoubleArray Double[] Deprecated: it will not be supported in next major version, being replaced by a slice type instead.
func (*DoubleArray) JavaClassName ¶ added in v1.9.4
func (*DoubleArray) JavaClassName() string
nolint
type DubboHeader ¶
type DubboHeader struct { SerialID byte Type PackageType ID int64 BodyLen int ResponseStatus byte }
DubboHeader dubbo header
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
Encoder struct
func (*Encoder) Clean ¶ added in v1.8.0
func (e *Encoder) Clean()
Clean clean the Encoder (room) for a new object encoding.
func (*Encoder) Encode ¶
Encode If @v can not be encoded, the return value is nil. At present only struct may can not be encoded.
func (*Encoder) EncodeMapAsClass ¶ added in v1.11.0
EncodeMapAsClass encode a map as object of given class name.
func (*Encoder) EncodeMapAsObject ¶ added in v1.11.0
EncodeMapAsObject encode a map as the given class defined object. Sometimes a class may not being registered in hessian, but it can be decoded from serialized data, and the ClassInfo can be found in Decoder by calling Decoder.FindClassInfo.
func (*Encoder) EncodeMapClass ¶ added in v1.11.0
EncodeMapClass encode a map as object, which MUST contains a key _class and its value is the target class name.
func (*Encoder) ReuseBufferClean ¶ added in v1.9.3
func (e *Encoder) ReuseBufferClean()
ReuseBufferClean reuse the Encoder for a new object encoding. it reuse allocated buffer and reduce memory-allocation.
type FloatArray ¶ added in v1.9.4
type FloatArray struct {
Values []float32
}
FloatArray Float[] Deprecated: it will not be supported in next major version, being replaced by a slice type instead.
type HessianCodec ¶
type HessianCodec struct {
// contains filtered or unexported fields
}
HessianCodec defines hessian codec
func NewHessianCodec ¶
func NewHessianCodec(reader *bufio.Reader) *HessianCodec
NewHessianCodec generate a new hessian codec instance
func NewHessianCodecCustom ¶ added in v1.3.0
func NewHessianCodecCustom(pkgType PackageType, reader *bufio.Reader, bodyLen int) *HessianCodec
NewHessianCodecCustom generate a new hessian codec instance.
func (*HessianCodec) ReadAttachments ¶ added in v1.3.0
func (h *HessianCodec) ReadAttachments() (map[string]string, error)
ReadAttachments ignore body, but only read attachments
func (*HessianCodec) ReadBody ¶
func (h *HessianCodec) ReadBody(rspObj interface{}) error
ReadBody uses hessian codec to read response body
func (*HessianCodec) ReadHeader ¶
func (h *HessianCodec) ReadHeader(header *DubboHeader) error
ReadHeader uses hessian codec to read dubbo header
func (*HessianCodec) Write ¶
func (h *HessianCodec) Write(service Service, header DubboHeader, body interface{}) ([]byte, error)
type IntegerArray ¶ added in v1.9.4
type IntegerArray struct {
Values []int32
}
IntegerArray Integer[]. Deprecated: it will not be supported in next major version, being replaced by a slice type instead.
func (*IntegerArray) JavaClassName ¶ added in v1.9.4
func (*IntegerArray) JavaClassName() string
nolint
type IntegerSerializer ¶ added in v1.4.0
type IntegerSerializer struct{}
type JavaCollectionObject ¶ added in v1.5.0
type JavaCollectionObject interface { Get() []interface{} Set([]interface{}) JavaClassName() string }
type JavaCollectionSerializer ¶ added in v1.5.0
type JavaCollectionSerializer struct{}
type JavaEnum ¶
type JavaEnum int32
JavaEnum type
const ( InvalidJavaEnum JavaEnum = -1 ClassKey = "_class" )
invalid consts
type JavaEnumClass ¶
type JavaEnumClass struct {
// contains filtered or unexported fields
}
JavaEnumClass struct
type JavaSqlTimeSerializer ¶ added in v1.6.3
type JavaSqlTimeSerializer struct{}
JavaSqlTimeSerializer used to encode & decode java.sql.Time & java.sql.Date
type LongArray ¶ added in v1.9.4
type LongArray struct {
Values []int64
}
LongArray Long[] Deprecated: it will not be supported in next major version, being replaced by a slice type instead.
type POJO ¶
type POJO interface {
JavaClassName() string // got a go struct's Java Class package name which should be a POJO class.
}
POJO interface !!! Pls attention that Every field name should be upper case. Otherwise the app may panic.
type POJORegistry ¶
POJORegistry pojo registry struct
type Param ¶ added in v1.10.0
Param interface !!! Pls attention that Every field name should be upper case. specifies the Java method parameter type. if this interface is not implemented, the pojo javaClassName is used as the method parameter type by default
type Request ¶
func EnsureRequest ¶
func EnsureRequest(body interface{}) *Request
func NewRequest ¶
NewRequest create a new Request
type Response ¶
Response dubbo response
func EnsureResponse ¶
func EnsureResponse(body interface{}) *Response
EnsureResponse check body type, make sure it's a Response or package it as a Response
type Serializer ¶
type Serializer interface { EncObject(*Encoder, POJO) error DecObject(*Decoder, reflect.Type, *ClassInfo) (interface{}, error) }
func GetSerializer ¶
func GetSerializer(javaClassName string) (Serializer, bool)
type Service ¶
type Service struct { Path string Interface string Group string Version string Method string Timeout time.Duration // request timeout }
Service defines service instance
type ShortArray ¶ added in v1.9.4
type ShortArray struct {
Values []int16
}
ShortArray Short[] Deprecated: it will not be supported in next major version, being replaced by a slice type instead.
type TypeRefs ¶
type TypeRefs struct {
// contains filtered or unexported fields
}
/////////////////////////////////////// typeRefs ///////////////////////////////////////
type UnknownException ¶ added in v1.6.1
type UnknownException struct { SerialVersionUID int64 DetailMessage string SuppressedExceptions []java_exception.Throwabler StackTrace []java_exception.StackTraceElement Cause java_exception.Throwabler // contains filtered or unexported fields }
func (UnknownException) Error ¶ added in v1.6.1
func (e UnknownException) Error() string
Error output error message
func (UnknownException) GetStackTrace ¶ added in v1.6.1
func (e UnknownException) GetStackTrace() []java_exception.StackTraceElement
equals to getStackTrace in java
func (UnknownException) JavaClassName ¶ added in v1.6.1
func (e UnknownException) JavaClassName() string
JavaClassName java fully qualified path
Source Files ¶
- array.go
- binary.go
- boolean.go
- codec.go
- const.go
- date.go
- decode.go
- doc.go
- double.go
- encode.go
- hessian.go
- int.go
- java8_time.go
- java_collection.go
- java_exception.go
- java_sql_time.go
- java_unknown_exception.go
- java_util.go
- list.go
- long.go
- map.go
- null.go
- object.go
- param.go
- pojo.go
- ref.go
- request.go
- response.go
- serialize.go
- string.go
Directories ¶
Path | Synopsis |
---|---|
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.
|
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. |
testcases
|
|
tools
|
|