~samwhited/xmpp

xmpp/muc/affiliation_string.go -rw-r--r-- 1.6 KiB
c9743d9fSam Whited docs: update changelog to include deprecations 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// Code generated by "stringer -type=Affiliation,Role,Privileges -linecomment"; DO NOT EDIT.

package muc

import "strconv"

const _Affiliation_name = "noneowneradminmemberoutcast"

var _Affiliation_index = [...]uint8{0, 4, 9, 14, 20, 27}

func (i Affiliation) String() string {
	if i >= Affiliation(len(_Affiliation_index)-1) {
		return "Affiliation(" + strconv.FormatInt(int64(i), 10) + ")"
	}
	return _Affiliation_name[_Affiliation_index[i]:_Affiliation_index[i+1]]
}

const _Role_name = "nonemoderatorparticipantvisitor"

var _Role_index = [...]uint8{0, 4, 13, 24, 31}

func (i Role) String() string {
	if i >= Role(len(_Role_index)-1) {
		return "Role(" + strconv.FormatInt(int64(i), 10) + ")"
	}
	return _Role_name[_Role_index[i]:_Role_index[i+1]]
}

const _Privileges_name = "presentreceive-messagesreceive-presencebroadcast-presencechange-availabilitychange-nicksend-private-messagesend-invitessend-messagesmodify-subjectkickgrant-voicerevoke-voice"

var _Privileges_map = map[Privileges]string{
	1:    _Privileges_name[0:7],
	2:    _Privileges_name[7:23],
	4:    _Privileges_name[23:39],
	8:    _Privileges_name[39:57],
	16:   _Privileges_name[57:76],
	32:   _Privileges_name[76:87],
	64:   _Privileges_name[87:107],
	128:  _Privileges_name[107:119],
	256:  _Privileges_name[119:132],
	512:  _Privileges_name[132:146],
	1024: _Privileges_name[146:150],
	2048: _Privileges_name[150:161],
	4096: _Privileges_name[161:173],
}

func (i Privileges) String() string {
	if str, ok := _Privileges_map[i]; ok {
		return str
	}
	return "Privileges(" + strconv.FormatInt(int64(i), 10) + ")"
}