Documentation ¶
Index ¶
- Variables
- type AccountID
- type AccountType
- type ChatInstanceID
- type ID
- func (id ID) ChatToClan() error
- func (id ID) ClanToChat() error
- func (id ID) GetAccountID() AccountID
- func (id ID) GetAccountType() AccountType
- func (id ID) GetInstanceID() InstanceID
- func (id ID) GetUniverseID() UniverseID
- func (id *ID) SetAccountID(accountID AccountID)
- func (id *ID) SetAccountType(accountType AccountType)
- func (id *ID) SetInstanceID(instanceID InstanceID)
- func (id *ID) SetUniverseID(universeID UniverseID)
- func (id ID) String() string
- type InstanceID
- type UniverseID
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidPlayerID = errors.New("invalid player id") ErrInvalidClanID = errors.New("invalid clan id") ErrInvalidChatID = errors.New("invalid chat id") ErrInvalidGroupID = errors.New("invalid group id") )
View Source
var ( RegexpPlayerID1 = regexp.MustCompile(`^STEAM_([0-5]):([01]):(\d+)$`) // Universe ID, Lowest bit, Highest bit RegexpPlayerID3 = regexp.MustCompile(`^\[?([a-zA-Z])\:([0-5])\:(\d+)\]?$`) // Account type character, Universe ID, Account ID RegexpPlayerID3I = regexp.MustCompile(`^\[?([a-zA-Z])\:([0-5])\:(\d+)\:(\d+)\]?$`) // Account type character, Universe ID, Account ID, Instance ID RegexpPlayerID32 = regexp.MustCompile(`^\d{1,16}$`) // Account ID RegexpPlayerID64 = regexp.MustCompile(`^\d{17}$`) // ID )
noinspection RegExpRedundantEscape
View Source
var ( RegexpGroupID64 = regexp.MustCompile(`^\d{18}$`) // ID RegexpGroupID = regexp.MustCompile(`^\d{1,17}$`) // Account ID )
View Source
var CharacterToAccountType = map[string]AccountType{ "I": AccountTypeInvalid, "U": AccountTypeIndividual, "M": AccountTypeMultiseat, "G": AccountTypeGameServer, "A": AccountTypeAnonGameServer, "P": AccountTypePending, "C": AccountTypeContentServer, "g": AccountTypeClan, "T": AccountTypeChat, "c": AccountTypeChat, "L": AccountTypeChat, "a": AccountTypeAnonUser, }
Functions ¶
This section is empty.
Types ¶
type AccountType ¶
type AccountType uint8
const ( AccountTypeInvalid AccountType = 0 AccountTypeIndividual AccountType = 1 AccountTypeMultiseat AccountType = 2 AccountTypeGameServer AccountType = 3 AccountTypeAnonGameServer AccountType = 4 AccountTypePending AccountType = 5 AccountTypeContentServer AccountType = 6 AccountTypeClan AccountType = 7 AccountTypeChat AccountType = 8 AccountTypeConsoleUser AccountType = 9 AccountTypeAnonUser AccountType = 10 AccountTypeMax AccountType = 11 )
noinspection GoUnusedConst
type ChatInstanceID ¶
type ChatInstanceID InstanceID
const ( ChatInstanceClan ChatInstanceID = 0x100000 >> 1 ChatInstanceLobby ChatInstanceID = 0x100000 >> 2 ChatInstanceMMSLobby ChatInstanceID = 0x100000 >> 3 )
noinspection GoUnusedConst
type ID ¶
type ID uint64
func NewID ¶
func NewID(universe UniverseID, accountType AccountType, instance InstanceID, accountId AccountID) (id ID)
func ParseGroupID ¶
func ParsePlayerID ¶
func (ID) ChatToClan ¶
func (*ID) SetAccountID ¶
func (*ID) SetAccountType ¶
func (id *ID) SetAccountType(accountType AccountType)
func (*ID) SetInstanceID ¶
func (id *ID) SetInstanceID(instanceID InstanceID)
func (*ID) SetUniverseID ¶
func (id *ID) SetUniverseID(universeID UniverseID)
type InstanceID ¶
type InstanceID uint32
const ( InstanceAll InstanceID = 0 InstanceDesktop InstanceID = 1 InstanceConsole InstanceID = 2 InstanceWeb InstanceID = 3 )
noinspection GoUnusedConst
type UniverseID ¶
type UniverseID uint8
const ( UniverseInvalid UniverseID = 0 UniversePublic UniverseID = 1 UniverseBeta UniverseID = 2 UniverseInternal UniverseID = 3 UniverseDev UniverseID = 4 UniverseMax UniverseID = 5 )
noinspection GoUnusedConst
Click to show internal directories.
Click to hide internal directories.