~samwhited/xmpp

xmpp/sessionstate_string.go -rw-r--r-- 857 bytes
37f589e6Sam Whited dial: simplify dialing and update docs 4 days ago
                                                                                
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
// Code generated by "stringer -type=SessionState"; DO NOT EDIT.

package xmpp

import "strconv"

const (
	_SessionState_name_0 = "SecureAuthn"
	_SessionState_name_1 = "Ready"
	_SessionState_name_2 = "Received"
	_SessionState_name_3 = "OutputStreamClosed"
	_SessionState_name_4 = "InputStreamClosed"
	_SessionState_name_5 = "S2S"
)

var (
	_SessionState_index_0 = [...]uint8{0, 6, 11}
)

func (i SessionState) String() string {
	switch {
	case 1 <= i && i <= 2:
		i -= 1
		return _SessionState_name_0[_SessionState_index_0[i]:_SessionState_index_0[i+1]]
	case i == 4:
		return _SessionState_name_1
	case i == 8:
		return _SessionState_name_2
	case i == 16:
		return _SessionState_name_3
	case i == 32:
		return _SessionState_name_4
	case i == 64:
		return _SessionState_name_5
	default:
		return "SessionState(" + strconv.FormatInt(int64(i), 10) + ")"
	}
}