forked from hprose/hprose-golang
/
result_mode.go
48 lines (44 loc) · 1.62 KB
/
result_mode.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/**********************************************************\
| |
| hprose |
| |
| Official WebSite: http://www.hprose.com/ |
| http://www.hprose.org/ |
| |
\**********************************************************/
/**********************************************************\
* *
* rpc/result_mode.go *
* *
* hprose ResultMode enum for Go. *
* *
* LastModified: Sep 10, 2016 *
* Author: Ma Bingyao <andot@hprose.com> *
* *
\**********************************************************/
package rpc
// ResultMode is result mode
type ResultMode int
const (
// Normal is default mode
Normal = ResultMode(iota)
// Serialized means the result is serialized
Serialized
// Raw means the result is the raw bytes data
Raw
// RawWithEndTag means the result is the raw bytes data with the end tag
RawWithEndTag
)
func (mode ResultMode) String() string {
switch mode {
case Normal:
return "Normal"
case Serialized:
return "Serialized"
case Raw:
return "Raw"
case RawWithEndTag:
return "RawWithEndTag"
}
panic("unknown value of ResultMode")
}