Documentation
¶
Overview ¶
Package messages provides native Go structs for Mumble protocol messages. Field layout and wire encoding match the Mumble spec for client compatibility. See docs/protocol/control-messages.md.
Index ¶
- Constants
- type ACL
- type Authenticate
- type BanEntry
- type BanList
- type ChannelRemove
- type ChannelState
- type CodecVersion
- type ContextAction
- type ContextActionModify
- type CryptSetup
- type DenyType
- type Message
- type PermissionDenied
- type PermissionQuery
- type Ping
- type PluginDataTransmission
- type QueryUsers
- type Reject
- type RejectType
- type RequestBlob
- type ServerConfig
- type ServerSync
- type SuggestConfig
- type TextMessage
- type UserList
- type UserRemove
- type UserState
- type UserStats
- type Version
- type VoiceTarget
- type VoiceTargetTarget
- type VolumeAdjustment
Constants ¶
const ( UserStateSetSession uint32 = 1 << 0 UserStateSetActor uint32 = 1 << 1 UserStateSetName uint32 = 1 << 2 UserStateSetUserID uint32 = 1 << 3 UserStateSetChannelID uint32 = 1 << 4 UserStateSetMute uint32 = 1 << 5 UserStateSetDeaf uint32 = 1 << 6 UserStateSetSuppress uint32 = 1 << 7 UserStateSetSelfMute uint32 = 1 << 8 UserStateSetSelfDeaf uint32 = 1 << 9 UserStateSetTexture uint32 = 1 << 10 UserStateSetPluginContext uint32 = 1 << 11 UserStateSetPluginIdentity uint32 = 1 << 12 UserStateSetComment uint32 = 1 << 13 )
UserState field presence bits (which fields were present in the wire data).
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authenticate ¶
type Authenticate struct {
Username string
Password string
Tokens []string
CeltVersions []int32
Opus bool
ClientType int32
}
Authenticate (type 2).
func (*Authenticate) Marshal ¶
func (m *Authenticate) Marshal() ([]byte, error)
func (*Authenticate) Unmarshal ¶
func (m *Authenticate) Unmarshal(data []byte) error
type BanEntry ¶
type BanEntry struct {
Address []byte
Mask uint32
Name string
Hash string
Reason string
Start string
Duration uint32
}
BanEntry (embedded in BanList).
type ChannelRemove ¶
type ChannelRemove struct {
ChannelID uint32
}
ChannelRemove (type 6).
func (*ChannelRemove) Marshal ¶
func (m *ChannelRemove) Marshal() ([]byte, error)
func (*ChannelRemove) Unmarshal ¶
func (m *ChannelRemove) Unmarshal(data []byte) error
type ChannelState ¶
type ChannelState struct {
ChannelID uint32
Parent uint32
HasParent bool // if true, parent field is sent on wire; root omits parent
Name string
Links []uint32
Description string
LinksAdd []uint32
LinksRemove []uint32
Temporary bool
Position int32
DescriptionHash []byte
MaxUsers uint32
IsEnterRestricted bool
CanEnter bool
}
ChannelState (type 7).
func (*ChannelState) Marshal ¶
func (m *ChannelState) Marshal() ([]byte, error)
func (*ChannelState) Unmarshal ¶
func (m *ChannelState) Unmarshal(data []byte) error
type CodecVersion ¶
CodecVersion (type 21).
func (*CodecVersion) Marshal ¶
func (m *CodecVersion) Marshal() ([]byte, error)
func (*CodecVersion) Unmarshal ¶
func (m *CodecVersion) Unmarshal(data []byte) error
type ContextAction ¶
ContextAction (type 17).
func (*ContextAction) Marshal ¶
func (m *ContextAction) Marshal() ([]byte, error)
func (*ContextAction) Unmarshal ¶
func (m *ContextAction) Unmarshal(data []byte) error
type ContextActionModify ¶
ContextActionModify (type 16) - minimal stub for server-sent.
func (*ContextActionModify) Marshal ¶
func (m *ContextActionModify) Marshal() ([]byte, error)
func (*ContextActionModify) Unmarshal ¶
func (m *ContextActionModify) Unmarshal(data []byte) error
type CryptSetup ¶
CryptSetup (type 15).
func (*CryptSetup) Marshal ¶
func (m *CryptSetup) Marshal() ([]byte, error)
func (*CryptSetup) Unmarshal ¶
func (m *CryptSetup) Unmarshal(data []byte) error
type DenyType ¶
type DenyType uint32
const ( DenyText DenyType = 0 DenyPermission DenyType = 1 DenySuperUser DenyType = 2 DenyChannelName DenyType = 3 DenyTextTooLong DenyType = 4 DenyH9K DenyType = 5 DenyTemporaryChannel DenyType = 6 DenyMissingCertificate DenyType = 7 DenyUserName DenyType = 8 DenyChannelFull DenyType = 9 DenyNestingLimit DenyType = 10 DenyChannelCountLimit DenyType = 11 DenyChannelListenerLimit DenyType = 12 DenyUserListenerLimit DenyType = 13 )
type PermissionDenied ¶
type PermissionDenied struct {
Permission uint32
ChannelID uint32
Session uint32
Reason string
Type DenyType
Name string
}
PermissionDenied (type 12).
func (*PermissionDenied) Marshal ¶
func (m *PermissionDenied) Marshal() ([]byte, error)
func (*PermissionDenied) Unmarshal ¶
func (m *PermissionDenied) Unmarshal(data []byte) error
type PermissionQuery ¶
PermissionQuery (type 20).
func (*PermissionQuery) Marshal ¶
func (m *PermissionQuery) Marshal() ([]byte, error)
func (*PermissionQuery) Unmarshal ¶
func (m *PermissionQuery) Unmarshal(data []byte) error
type Ping ¶
type Ping struct {
Timestamp uint64
Good uint32
Late uint32
Lost uint32
Resync uint32
UDPPackets uint32
TCPPackets uint32
UDPPingAvg float32
UDPPingVar float32
TCPPingAvg float32
TCPPingVar float32
}
Ping (type 3).
type PluginDataTransmission ¶
type PluginDataTransmission struct {
SenderSession uint32
ReceiverSessions []uint32
Data []byte
DataID string
}
PluginDataTransmission (type 26).
func (*PluginDataTransmission) Marshal ¶
func (m *PluginDataTransmission) Marshal() ([]byte, error)
func (*PluginDataTransmission) Unmarshal ¶
func (m *PluginDataTransmission) Unmarshal(data []byte) error
type QueryUsers ¶
QueryUsers (type 14).
func (*QueryUsers) Marshal ¶
func (m *QueryUsers) Marshal() ([]byte, error)
func (*QueryUsers) Unmarshal ¶
func (m *QueryUsers) Unmarshal(data []byte) error
type RejectType ¶
type RejectType uint32
Enums
const ( RejectNone RejectType = 0 RejectWrongVersion RejectType = 1 RejectInvalidUsername RejectType = 2 RejectWrongUserPW RejectType = 3 RejectWrongServerPW RejectType = 4 RejectUsernameInUse RejectType = 5 RejectServerFull RejectType = 6 RejectNoCertificate RejectType = 7 RejectAuthenticatorFail RejectType = 8 RejectNoNewConnections RejectType = 9 )
type RequestBlob ¶
type RequestBlob struct {
SessionTexture []uint32
SessionComment []uint32
ChannelDescription []uint32
}
RequestBlob (type 23).
func (*RequestBlob) Marshal ¶
func (m *RequestBlob) Marshal() ([]byte, error)
func (*RequestBlob) Unmarshal ¶
func (m *RequestBlob) Unmarshal(data []byte) error
type ServerConfig ¶
type ServerConfig struct {
MaxBandwidth uint32
WelcomeText string
AllowHTML bool
MessageLength uint32
ImageMessageLength uint32
MaxUsers uint32
RecordingAllowed bool
}
ServerConfig (type 24).
func (*ServerConfig) Marshal ¶
func (m *ServerConfig) Marshal() ([]byte, error)
func (*ServerConfig) Unmarshal ¶
func (m *ServerConfig) Unmarshal(data []byte) error
type ServerSync ¶
ServerSync (type 5).
func (*ServerSync) Marshal ¶
func (m *ServerSync) Marshal() ([]byte, error)
func (*ServerSync) Unmarshal ¶
func (m *ServerSync) Unmarshal(data []byte) error
type SuggestConfig ¶
SuggestConfig (type 25).
func (*SuggestConfig) Marshal ¶
func (m *SuggestConfig) Marshal() ([]byte, error)
func (*SuggestConfig) Unmarshal ¶
func (m *SuggestConfig) Unmarshal(data []byte) error
type TextMessage ¶
type TextMessage struct {
Actor uint32
Session []uint32
ChannelID []uint32
TreeID []uint32
Message string
}
TextMessage (type 11).
func (*TextMessage) Marshal ¶
func (m *TextMessage) Marshal() ([]byte, error)
func (*TextMessage) Unmarshal ¶
func (m *TextMessage) Unmarshal(data []byte) error
type UserRemove ¶
UserRemove (type 8).
func (*UserRemove) Marshal ¶
func (m *UserRemove) Marshal() ([]byte, error)
func (*UserRemove) Unmarshal ¶
func (m *UserRemove) Unmarshal(data []byte) error
type UserState ¶
type UserState struct {
Session uint32
Actor uint32
Name string
UserID uint32
ChannelID uint32
Mute bool
Deaf bool
Suppress bool
SelfMute bool
SelfDeaf bool
Texture []byte
PluginContext []byte
PluginIdentity string
Comment string
Hash string
CommentHash []byte
TextureHash []byte
PrioritySpeaker bool
Recording bool
TemporaryAccessTokens []string
ListeningChannelAdd []uint32
ListeningChannelRemove []uint32
ListeningVolumeAdjustment []VolumeAdjustment
// SetFields indicates which fields were present in the wire data during Unmarshal.
// Used by handlers to avoid overwriting with default zero values.
SetFields uint32
}
UserState (type 9).
type Version ¶
type Version struct {
VersionV1 uint32
VersionV2 uint64
Release string
OS string
OSVersion string
CryptoModes uint32 // bitmask: bit0=lite, bit1=legacy, bit2=secure
}
Version (type 0). Field nums from Mumble.proto.
type VoiceTarget ¶
type VoiceTarget struct {
ID uint32
Targets []VoiceTargetTarget
}
VoiceTarget (type 19).
func (*VoiceTarget) Marshal ¶
func (m *VoiceTarget) Marshal() ([]byte, error)
func (*VoiceTarget) Unmarshal ¶
func (m *VoiceTarget) Unmarshal(data []byte) error
type VoiceTargetTarget ¶
type VolumeAdjustment ¶
UserState.VolumeAdjustment