Documentation ¶
Overview ¶
Package types provides types used in Quazal Rendez-Vous/NEX
Index ¶
- Variables
- func RegisterObjectHolderType(rvType HoldableObject)
- func RegisterVariantType(id UInt8, rvType RVType)
- type AnyObjectHolder
- func (aoh AnyObjectHolder[T]) Copy() RVType
- func (aoh AnyObjectHolder[T]) CopyRef() RVTypePtr
- func (aoh *AnyObjectHolder[T]) Deref() RVType
- func (aoh AnyObjectHolder[T]) Equals(o RVType) bool
- func (aoh *AnyObjectHolder[T]) ExtractFrom(readable Readable) error
- func (aoh AnyObjectHolder[T]) FormatToString(indentationLevel int) string
- func (aoh AnyObjectHolder[T]) String() string
- func (aoh AnyObjectHolder[T]) WriteTo(writable Writable)
- type Bool
- type Buffer
- type ClassVersionContainer
- func (cvc ClassVersionContainer) Copy() RVType
- func (cvc ClassVersionContainer) CopyRef() RVTypePtr
- func (cvc *ClassVersionContainer) Deref() RVType
- func (cvc ClassVersionContainer) Equals(o RVType) bool
- func (cvc *ClassVersionContainer) ExtractFrom(readable Readable) error
- func (cvc ClassVersionContainer) FormatToString(indentationLevel int) string
- func (cvc ClassVersionContainer) String() string
- func (cvc ClassVersionContainer) WriteTo(writable Writable)
- type Data
- func (d Data) Copy() RVType
- func (d Data) CopyRef() RVTypePtr
- func (d Data) DataObjectID() RVType
- func (d *Data) Deref() RVType
- func (d Data) Equals(o RVType) bool
- func (d *Data) ExtractFrom(readable Readable) error
- func (d Data) FormatToString(indentationLevel int) string
- func (d Data) ObjectID() RVType
- func (d Data) String() string
- func (d Data) WriteTo(writable Writable)
- type DataHolder
- type DataInterface
- type DateTime
- func (dt DateTime) Copy() RVType
- func (dt DateTime) CopyRef() RVTypePtr
- func (dt DateTime) Day() int
- func (dt *DateTime) Deref() RVType
- func (dt DateTime) Equals(o RVType) bool
- func (dt *DateTime) ExtractFrom(readable Readable) error
- func (dt DateTime) FormatToString(indentationLevel int) string
- func (dt DateTime) FromTimestamp(timestamp time.Time) DateTime
- func (dt DateTime) Hour() int
- func (dt *DateTime) Make(year, month, day, hour, minute, second int) DateTime
- func (dt DateTime) Minute() int
- func (dt DateTime) Month() time.Month
- func (dt DateTime) Now() DateTime
- func (dt DateTime) Second() int
- func (dt DateTime) Standard() time.Time
- func (dt DateTime) String() string
- func (dt DateTime) WriteTo(writable Writable)
- func (dt DateTime) Year() int
- type Double
- type Float
- type HoldableObject
- type Int16
- type Int32
- type Int64
- type Int8
- type List
- func (l List[T]) Contains(checkValue T) bool
- func (l List[T]) Copy() RVType
- func (l List[T]) CopyRef() RVTypePtr
- func (l *List[T]) Deref() RVType
- func (l List[T]) Equals(o RVType) bool
- func (l *List[T]) ExtractFrom(readable Readable) error
- func (l List[T]) String() string
- func (l List[T]) WriteTo(writable Writable)
- type Map
- func (m Map[K, V]) Copy() RVType
- func (m Map[K, V]) CopyRef() RVTypePtr
- func (m *Map[K, V]) Deref() RVType
- func (m Map[K, V]) Equals(o RVType) bool
- func (m *Map[K, V]) ExtractFrom(readable Readable) error
- func (m Map[K, V]) FormatToString(indentationLevel int) string
- func (m Map[K, V]) String() string
- func (m Map[K, V]) WriteTo(writable Writable)
- type PID
- func (p PID) Copy() RVType
- func (p PID) CopyRef() RVTypePtr
- func (p *PID) Deref() RVType
- func (p PID) Equals(o RVType) bool
- func (p *PID) ExtractFrom(readable Readable) error
- func (p PID) FormatToString(indentationLevel int) string
- func (p PID) String() string
- func (p PID) WriteTo(writable Writable)
- type QBuffer
- type QResult
- func (r QResult) Copy() RVType
- func (r QResult) CopyRef() RVTypePtr
- func (r *QResult) Deref() RVType
- func (r QResult) Equals(o RVType) bool
- func (r *QResult) ExtractFrom(readable Readable) error
- func (r QResult) FormatToString(indentationLevel int) string
- func (r QResult) IsError() bool
- func (r QResult) IsSuccess() bool
- func (r QResult) String() string
- func (r QResult) WriteTo(writable Writable)
- type QUUID
- func (qu QUUID) Copy() RVType
- func (qu QUUID) CopyRef() RVTypePtr
- func (qu *QUUID) Deref() RVType
- func (qu QUUID) Equals(o RVType) bool
- func (qu *QUUID) ExtractFrom(readable Readable) error
- func (qu QUUID) FormatToString(indentationLevel int) string
- func (qu *QUUID) FromString(uuid string) error
- func (qu QUUID) GetStringValue() string
- func (qu QUUID) String() string
- func (qu QUUID) WriteTo(writable Writable)
- type RVConnectionData
- func (rvcd RVConnectionData) Copy() RVType
- func (rvcd RVConnectionData) CopyRef() RVTypePtr
- func (rvcd *RVConnectionData) Deref() RVType
- func (rvcd RVConnectionData) Equals(o RVType) bool
- func (rvcd *RVConnectionData) ExtractFrom(readable Readable) error
- func (rvcd RVConnectionData) FormatToString(indentationLevel int) string
- func (rvcd RVConnectionData) String() string
- func (rvcd RVConnectionData) WriteTo(writable Writable)
- type RVType
- type RVTypePtr
- type Readable
- type ResultRange
- func (rr ResultRange) Copy() RVType
- func (rr ResultRange) CopyRef() RVTypePtr
- func (rr *ResultRange) Deref() RVType
- func (rr ResultRange) Equals(o RVType) bool
- func (rr *ResultRange) ExtractFrom(readable Readable) error
- func (rr ResultRange) FormatToString(indentationLevel int) string
- func (rr ResultRange) String() string
- func (rr ResultRange) WriteTo(writable Writable)
- type StationURL
- func (s StationURL) Address() (string, bool)
- func (s StationURL) ConnectionID() (uint32, bool)
- func (s StationURL) Copy() RVType
- func (s StationURL) CopyRef() RVTypePtr
- func (s *StationURL) Deref() RVType
- func (s StationURL) Equals(o RVType) bool
- func (s *StationURL) ExtractFrom(readable Readable) error
- func (s *StationURL) Format()
- func (s StationURL) FormatToString(indentationLevel int) string
- func (s *StationURL) Get(name string, custom bool) (string, bool)
- func (s StationURL) IsBehindNAT() bool
- func (s StationURL) IsFastProbeResponseEnabled() bool
- func (s StationURL) IsNATPMPSupported() bool
- func (s StationURL) IsProbeRequestInitiationEnabled() bool
- func (s StationURL) IsPublic() bool
- func (s StationURL) IsRelayServerEnabled() bool
- func (s StationURL) IsUPnPSupported() bool
- func (s StationURL) NATFiltering() (constants.NATFilteringProperties, bool)
- func (s StationURL) NATMapping() (constants.NATMappingProperties, bool)
- func (s StationURL) NodeID() (uint16, bool)
- func (s StationURL) ParamValue(name string) (string, bool)
- func (s *StationURL) Parse()
- func (s StationURL) PlatformType() (uint8, bool)
- func (s *StationURL) PortNumber() (uint16, bool)
- func (s StationURL) PrincipalID() (PID, bool)
- func (s StationURL) ProbeRequestID() (uint32, bool)
- func (s StationURL) RVConnectionID() (uint32, bool)
- func (s StationURL) RelayAddress() (string, bool)
- func (s StationURL) RelayPort() (uint16, bool)
- func (s StationURL) RelayServerAddress() (string, bool)
- func (s StationURL) RelayServerPort() (uint16, bool)
- func (s *StationURL) RemoveParam(name string)
- func (s *StationURL) Set(name, value string, custom bool)
- func (s *StationURL) SetAddress(address string)
- func (s *StationURL) SetConnectionID(connectionID uint32)
- func (s *StationURL) SetFastProbeResponse(fast bool)
- func (s *StationURL) SetNATFiltering(filtering constants.NATFilteringProperties)
- func (s *StationURL) SetNATMapping(mapping constants.NATMappingProperties)
- func (s *StationURL) SetNATPMPSupport(supported bool)
- func (s *StationURL) SetNodeID(nodeID uint16)
- func (s *StationURL) SetParamValue(name, value string)
- func (s *StationURL) SetPlatformType(platformType uint8)
- func (s *StationURL) SetPortNumber(port uint16)
- func (s *StationURL) SetPrincipalID(pid PID)
- func (s *StationURL) SetProbeRequestID(probeRequestID uint32)
- func (s *StationURL) SetProbeRequestInitiation(probeinit bool)
- func (s *StationURL) SetRVConnectionID(connectionID uint32)
- func (s *StationURL) SetRelayAddress(address string)
- func (s *StationURL) SetRelayPort(port uint16)
- func (s *StationURL) SetRelayServerAddress(address string)
- func (s *StationURL) SetRelayServerPort(port uint16)
- func (s *StationURL) SetStreamID(streamID uint8)
- func (s *StationURL) SetStreamType(streamType constants.StreamType)
- func (s *StationURL) SetType(flags uint8)
- func (s *StationURL) SetUPnPSupport(supported bool)
- func (s *StationURL) SetURL(url string)
- func (s *StationURL) SetURLType(urlType constants.StationURLType)
- func (s *StationURL) SetUseRelayServer(useRelayServer bool)
- func (s StationURL) StreamID() (uint8, bool)
- func (s StationURL) StreamType() (constants.StreamType, bool)
- func (s StationURL) String() string
- func (s StationURL) Type() (uint8, bool)
- func (s StationURL) URL() string
- func (s StationURL) URLType() constants.StationURLType
- func (s StationURL) WriteTo(writable Writable)
- type String
- type Structure
- type UInt16
- type UInt32
- type UInt64
- type UInt8
- type Variant
- func (v Variant) Copy() RVType
- func (v Variant) CopyRef() RVTypePtr
- func (v *Variant) Deref() RVType
- func (v Variant) Equals(o RVType) bool
- func (v *Variant) ExtractFrom(readable Readable) error
- func (v Variant) FormatToString(indentationLevel int) string
- func (v Variant) String() string
- func (v Variant) WriteTo(writable Writable)
- type Writable
Constants ¶
This section is empty.
Variables ¶
var AnyObjectHolderObjects = make(map[RVType]HoldableObject)
AnyObjectHolderObjects holds a mapping of RVTypes that are accessible in a AnyDataHolder
var VariantTypes = make(map[UInt8]RVType)
VariantTypes holds a mapping of RVTypes that are accessible in a Variant
Functions ¶
func RegisterObjectHolderType ¶ added in v2.1.0
func RegisterObjectHolderType(rvType HoldableObject)
RegisterObjectHolderType registers a RVType to be accessible in a AnyDataHolder
func RegisterVariantType ¶
RegisterVariantType registers a RVType to be accessible in a Variant
Types ¶
type AnyObjectHolder ¶ added in v2.1.0
type AnyObjectHolder[T HoldableObject] struct { Object T }
AnyObjectHolder can hold a reference to any RVType which can be held
func NewAnyObjectHolder ¶ added in v2.1.0
func NewAnyObjectHolder[T HoldableObject]() AnyObjectHolder[T]
NewAnyObjectHolder returns a new AnyObjectHolder
func (AnyObjectHolder[T]) Copy ¶ added in v2.1.0
func (aoh AnyObjectHolder[T]) Copy() RVType
Copy returns a new copied instance of AnyObjectHolder
func (AnyObjectHolder[T]) CopyRef ¶ added in v2.1.0
func (aoh AnyObjectHolder[T]) CopyRef() RVTypePtr
CopyRef copies the current value of the AnyObjectHolder and returns a pointer to the new copy
func (*AnyObjectHolder[T]) Deref ¶ added in v2.1.0
func (aoh *AnyObjectHolder[T]) Deref() RVType
Deref takes a pointer to the AnyObjectHolder and dereferences it to the raw value. Only useful when working with an instance of RVTypePtr
func (AnyObjectHolder[T]) Equals ¶ added in v2.1.0
func (aoh AnyObjectHolder[T]) Equals(o RVType) bool
Equals checks if the passed Structure contains the same data as the current instance
func (*AnyObjectHolder[T]) ExtractFrom ¶ added in v2.1.0
func (aoh *AnyObjectHolder[T]) ExtractFrom(readable Readable) error
ExtractFrom extracts the AnyObjectHolder from the given readable
func (AnyObjectHolder[T]) FormatToString ¶ added in v2.1.0
func (aoh AnyObjectHolder[T]) FormatToString(indentationLevel int) string
FormatToString pretty-prints the struct data using the provided indentation level
func (AnyObjectHolder[T]) String ¶ added in v2.1.0
func (aoh AnyObjectHolder[T]) String() string
String returns a string representation of the struct
func (AnyObjectHolder[T]) WriteTo ¶ added in v2.1.0
func (aoh AnyObjectHolder[T]) WriteTo(writable Writable)
WriteTo writes the AnyObjectHolder to the given writable
type Bool ¶ added in v2.1.0
type Bool bool
Bool is a type alias for the Go basic type bool for use as an RVType
func (Bool) Copy ¶ added in v2.1.0
Copy returns a pointer to a copy of the Bool. Requires type assertion when used
func (Bool) CopyRef ¶ added in v2.1.0
CopyRef copies the current value of the Bool and returns a pointer to the new copy
func (*Bool) Deref ¶ added in v2.1.0
Deref takes a pointer to the Bool and dereferences it to the raw value. Only useful when working with an instance of RVTypePtr
func (Bool) Equals ¶ added in v2.1.0
Equals checks if the input is equal in value to the current instance
func (*Bool) ExtractFrom ¶ added in v2.1.0
ExtractFrom extracts the Bool value from the given readable
type Buffer ¶
type Buffer []byte
Buffer is an implementation of rdv::Buffer. Type alias of []byte. Same as QBuffer but with a uint32 length field.
func (Buffer) Copy ¶
Copy returns a pointer to a copy of the Buffer. Requires type assertion when used
func (Buffer) CopyRef ¶ added in v2.1.0
CopyRef copies the current value of the Buffer and returns a pointer to the new copy
func (*Buffer) Deref ¶ added in v2.1.0
Deref takes a pointer to the Buffer and dereferences it to the raw value. Only useful when working with an instance of RVTypePtr
func (*Buffer) ExtractFrom ¶
ExtractFrom extracts the Buffer from the given readable
type ClassVersionContainer ¶
type ClassVersionContainer struct { Structure ClassVersions Map[String, UInt16] `json:"class_versions" db:"class_versions" bson:"class_versions" xml:"ClassVersions"` }
ClassVersionContainer is an implementation of rdv::ClassVersionContainer. Contains version info for Structures used in verbose RMC messages.
func NewClassVersionContainer ¶
func NewClassVersionContainer() ClassVersionContainer
NewClassVersionContainer returns a new ClassVersionContainer
func (ClassVersionContainer) Copy ¶
func (cvc ClassVersionContainer) Copy() RVType
Copy returns a pointer to a copy of the ClassVersionContainer. Requires type assertion when used
func (ClassVersionContainer) CopyRef ¶ added in v2.1.0
func (cvc ClassVersionContainer) CopyRef() RVTypePtr
CopyRef copies the current value of the ClassVersionContainer and returns a pointer to the new copy
func (*ClassVersionContainer) Deref ¶ added in v2.1.0
func (cvc *ClassVersionContainer) Deref() RVType
Deref takes a pointer to the ClassVersionContainer and dereferences it to the raw value. Only useful when working with an instance of RVTypePtr
func (ClassVersionContainer) Equals ¶
func (cvc ClassVersionContainer) Equals(o RVType) bool
Equals checks if the input is equal in value to the current instance
func (*ClassVersionContainer) ExtractFrom ¶
func (cvc *ClassVersionContainer) ExtractFrom(readable Readable) error
ExtractFrom extracts the ClassVersionContainer from the given readable
func (ClassVersionContainer) FormatToString ¶
func (cvc ClassVersionContainer) FormatToString(indentationLevel int) string
FormatToString pretty-prints the struct data using the provided indentation level
func (ClassVersionContainer) String ¶
func (cvc ClassVersionContainer) String() string
String returns a string representation of the struct
func (ClassVersionContainer) WriteTo ¶
func (cvc ClassVersionContainer) WriteTo(writable Writable)
WriteTo writes the ClassVersionContainer to the given writable
type Data ¶
type Data struct {
Structure
}
Data is an implementation of rdv::Data. This structure has no data, and instead acts as the base class for many other structures.
func (Data) CopyRef ¶ added in v2.1.0
CopyRef copies the current value of the Data and returns a pointer to the new copy
func (Data) DataObjectID ¶ added in v2.1.0
DataObjectID returns the object identifier of the type embedding Data
func (*Data) Deref ¶ added in v2.1.0
Deref takes a pointer to the Data and dereferences it to the raw value. Only useful when working with an instance of RVTypePtr
func (*Data) ExtractFrom ¶
ExtractFrom extracts the Data from the given readable
func (Data) FormatToString ¶
FormatToString pretty-prints the struct data using the provided indentation level
type DataHolder ¶ added in v2.1.0
type DataHolder = AnyObjectHolder[DataInterface]
DataHolder is an AnyObjectHolder for types which embed Data
func NewDataHolder ¶ added in v2.1.0
func NewDataHolder() DataHolder
NewDataHolder returns a new DataHolder
type DataInterface ¶ added in v2.1.0
type DataInterface interface { HoldableObject DataObjectID() RVType // Returns the object identifier of the type embedding Data }
DataInterface defines an interface to track types which have Data anywhere in their parent tree.
type DateTime ¶
type DateTime uint64
DateTime is an implementation of rdv::DateTime. Type alias of uint64. The underlying value is a uint64 bit field containing date and time information.
func NewDateTime ¶
NewDateTime returns a new DateTime instance
func (DateTime) CopyRef ¶ added in v2.1.0
CopyRef copies the current value of the DateTime and returns a pointer to the new copy
func (*DateTime) Deref ¶ added in v2.1.0
Deref takes a pointer to the DateTime and dereferences it to the raw value. Only useful when working with an instance of RVTypePtr
func (*DateTime) ExtractFrom ¶
ExtractFrom extracts the DateTime from the given readable
func (DateTime) FormatToString ¶
FormatToString pretty-prints the struct data using the provided indentation level
func (DateTime) FromTimestamp ¶
FromTimestamp converts a Time timestamp into a NEX DateTime
type Double ¶ added in v2.1.0
type Double float64
Double is a type alias for the Go basic type float64 for use as an RVType
func (Double) Copy ¶ added in v2.1.0
Copy returns a pointer to a copy of the Double. Requires type assertion when used
func (Double) CopyRef ¶ added in v2.1.0
CopyRef copies the current value of the Double and returns a pointer to the new copy
func (*Double) Deref ¶ added in v2.1.0
Deref takes a pointer to the Double and dereferences it to the raw value. Only useful when working with an instance of RVTypePtr
func (Double) Equals ¶ added in v2.1.0
Equals checks if the input is equal in value to the current instance
func (*Double) ExtractFrom ¶ added in v2.1.0
ExtractFrom extracts the Double value from the given readable
type Float ¶ added in v2.1.0
type Float float32
Float is a type alias for the Go basic type float32 for use as an RVType
func (Float) Copy ¶ added in v2.1.0
Copy returns a pointer to a copy of the Float. Requires type assertion when used
func (Float) CopyRef ¶ added in v2.1.0
CopyRef copies the current value of the Float and returns a pointer to the new copy
func (*Float) Deref ¶ added in v2.1.0
Deref takes a pointer to the Float and dereferences it to the raw value. Only useful when working with an instance of RVTypePtr
func (Float) Equals ¶ added in v2.1.0
Equals checks if the input is equal in value to the current instance
func (*Float) ExtractFrom ¶ added in v2.1.0
ExtractFrom extracts the Float value from the given readable
type HoldableObject ¶ added in v2.1.0
type HoldableObject interface { RVType ObjectID() RVType // Returns the object identifier of the type }
HoldableObject defines a common interface for types which can be placed in AnyObjectHolder
type Int16 ¶ added in v2.1.0
type Int16 int16
Int16 is a type alias for the Go basic type int16 for use as an RVType
func (Int16) Copy ¶ added in v2.1.0
Copy returns a pointer to a copy of the Int16. Requires type assertion when used
func (Int16) CopyRef ¶ added in v2.1.0
CopyRef copies the current value of the Int16 and returns a pointer to the new copy
func (*Int16) Deref ¶ added in v2.1.0
Deref takes a pointer to the Int16 and dereferences it to the raw value. Only useful when working with an instance of RVTypePtr
func (Int16) Equals ¶ added in v2.1.0
Equals checks if the input is equal in value to the current instance
func (*Int16) ExtractFrom ¶ added in v2.1.0
ExtractFrom extracts the Int16 value from the given readable
type Int32 ¶ added in v2.1.0
type Int32 int32
Int32 is a type alias for the Go basic type int32 for use as an RVType
func (Int32) Copy ¶ added in v2.1.0
Copy returns a pointer to a copy of the Int32. Requires type assertion when used
func (Int32) CopyRef ¶ added in v2.1.0
CopyRef copies the current value of the Int32 and returns a pointer to the new copy
func (*Int32) Deref ¶ added in v2.1.0
Deref takes a pointer to the Int32 and dereferences it to the raw value. Only useful when working with an instance of RVTypePtr
func (Int32) Equals ¶ added in v2.1.0
Equals checks if the input is equal in value to the current instance
func (*Int32) ExtractFrom ¶ added in v2.1.0
ExtractFrom extracts the Int32 value from the given readable
type Int64 ¶ added in v2.1.0
type Int64 int64
Int64 is a type alias for the Go basic type int64 for use as an RVType
func (Int64) Copy ¶ added in v2.1.0
Copy returns a pointer to a copy of the Int64. Requires type assertion when used
func (Int64) CopyRef ¶ added in v2.1.0
CopyRef copies the current value of the Int64 and returns a pointer to the new copy
func (*Int64) Deref ¶ added in v2.1.0
Deref takes a pointer to the Int64 and dereferences it to the raw value. Only useful when working with an instance of RVTypePtr
func (Int64) Equals ¶ added in v2.1.0
Equals checks if the input is equal in value to the current instance
func (*Int64) ExtractFrom ¶ added in v2.1.0
ExtractFrom extracts the Int64 value from the given readable
type Int8 ¶ added in v2.1.0
type Int8 int8
Int8 is a type alias for the Go basic type int8 for use as an RVType
func (Int8) Copy ¶ added in v2.1.0
Copy returns a pointer to a copy of the Int8. Requires type assertion when used
func (Int8) CopyRef ¶ added in v2.1.0
CopyRef copies the current value of the Int8 and returns a pointer to the new copy
func (*Int8) Deref ¶ added in v2.1.0
Deref takes a pointer to the Int8 and dereferences it to the raw value. Only useful when working with an instance of RVTypePtr
func (Int8) Equals ¶ added in v2.1.0
Equals checks if the input is equal in value to the current instance
func (*Int8) ExtractFrom ¶ added in v2.1.0
ExtractFrom extracts the Int8 value from the given readable
type List ¶
type List[T RVType] []T
List is an implementation of rdv::qList. This data type holds an array of other types.
Unlike Buffer and qBuffer, which use the same data type with differing size field lengths, there does not seem to be an official rdv::List type
func (List[T]) Copy ¶
Copy returns a pointer to a copy of the List. Requires type assertion when used
func (List[T]) CopyRef ¶ added in v2.1.0
CopyRef copies the current value of the List and returns a pointer to the new copy
func (*List[T]) Deref ¶ added in v2.1.0
Deref takes a pointer to the List and dereferences it to the raw value. Only useful when working with an instance of RVTypePtr
func (*List[T]) ExtractFrom ¶
ExtractFrom extracts the List from the given readable
type Map ¶
type Map[K comparable, V RVType] map[K]V
Map represents a Quazal Rendez-Vous/NEX Map type. Type alias of map[K]V. There is not an official type in either the rdv or nn::nex namespaces. May have any RVType as both a key and value. If either they key or value types are not an RVType, they are ignored.
Incompatible with RVType pointers!
func NewMap ¶
func NewMap[K comparable, V RVType]() Map[K, V]
NewMap returns a new Map of the provided type
func (Map[K, V]) Copy ¶
Copy returns a pointer to a copy of the Map. Requires type assertion when used
func (Map[K, V]) CopyRef ¶ added in v2.1.0
CopyRef copies the current value of the Map and returns a pointer to the new copy
func (*Map[K, V]) Deref ¶ added in v2.1.0
Deref takes a pointer to the Map and dereferences it to the raw value. Only useful when working with an instance of RVTypePtr
func (*Map[K, V]) ExtractFrom ¶
ExtractFrom extracts the Map from the given readable
func (Map[K, V]) FormatToString ¶
FormatToString pretty-prints the struct data using the provided indentation level
type PID ¶
type PID uint64
PID represents a unique number to identify a user. Type alias of uint64. The true size of this value depends on the client version. Legacy clients (Wii U/3DS) use a uint32, whereas modern clients (Nintendo Switch) use a uint64.
func (PID) CopyRef ¶ added in v2.1.0
CopyRef copies the current value of the PID and returns a pointer to the new copy
func (*PID) Deref ¶ added in v2.1.0
Deref takes a pointer to the PID and dereferences it to the raw value. Only useful when working with an instance of RVTypePtr
func (*PID) ExtractFrom ¶
ExtractFrom extracts the PID from the given readable
func (PID) FormatToString ¶
FormatToString pretty-prints the struct data using the provided indentation level
type QBuffer ¶
type QBuffer []byte
QBuffer is an implementation of rdv::qBuffer. Type alias of []byte. Same as Buffer but with a uint16 length field.
func (QBuffer) Copy ¶
Copy returns a pointer to a copy of the qBuffer. Requires type assertion when used
func (QBuffer) CopyRef ¶ added in v2.1.0
CopyRef copies the current value of the QBuffer and returns a pointer to the new copy
func (*QBuffer) Deref ¶ added in v2.1.0
Deref takes a pointer to the QBuffer and dereferences it to the raw value. Only useful when working with an instance of RVTypePtr
func (*QBuffer) ExtractFrom ¶
ExtractFrom extracts the QBuffer from the given readable
type QResult ¶
type QResult uint32
QResult is an implementation of rdv::qResult. Type alias of uint32. Determines the result of an operation. If the MSB is set the result is an error, otherwise success
func NewQResultError ¶
NewQResultError returns a new QResult set as an error
func NewQResultSuccess ¶
NewQResultSuccess returns a new QResult set as a success
func (QResult) Copy ¶
Copy returns a pointer to a copy of the QResult. Requires type assertion when used
func (QResult) CopyRef ¶ added in v2.1.0
CopyRef copies the current value of the QResult and returns a pointer to the new copy
func (*QResult) Deref ¶ added in v2.1.0
Deref takes a pointer to the QResult and dereferences it to the raw value. Only useful when working with an instance of RVTypePtr
func (*QResult) ExtractFrom ¶
ExtractFrom extracts the QResult from the given readable
func (QResult) FormatToString ¶
FormatToString pretty-prints the struct data using the provided indentation level
type QUUID ¶
type QUUID []byte
QUUID is an implementation of rdv::qUUID. Type alias of []byte. Encodes a UUID in little-endian byte order.
func (QUUID) CopyRef ¶ added in v2.1.0
CopyRef copies the current value of the QUUID and returns a pointer to the new copy
func (*QUUID) Deref ¶ added in v2.1.0
Deref takes a pointer to the QUUID and dereferences it to the raw value. Only useful when working with an instance of RVTypePtr
func (QUUID) Equals ¶
Equals checks if the passed Structure contains the same data as the current instance
func (*QUUID) ExtractFrom ¶
ExtractFrom extracts the QUUID from the given readable
func (QUUID) FormatToString ¶
FormatToString pretty-prints the struct data using the provided indentation level
func (*QUUID) FromString ¶
FromString converts a UUID string to a qUUID
func (QUUID) GetStringValue ¶
GetStringValue returns the UUID encoded in the qUUID
type RVConnectionData ¶
type RVConnectionData struct { Structure StationURL StationURL `json:"station_url" db:"station_url" bson:"station_url" xml:"StationURL"` SpecialProtocols List[UInt8] `json:"special_protocols" db:"special_protocols" bson:"special_protocols" xml:"SpecialProtocols"` StationURLSpecialProtocols StationURL `` /* 141-byte string literal not displayed */ Time DateTime `json:"time" db:"time" bson:"time" xml:"Time"` }
RVConnectionData is an implementation of rdv::RVConnectionData. Contains the locations and data of Rendez-Vous connection.
func NewRVConnectionData ¶
func NewRVConnectionData() RVConnectionData
NewRVConnectionData returns a new RVConnectionData
func (RVConnectionData) Copy ¶
func (rvcd RVConnectionData) Copy() RVType
Copy returns a new copied instance of RVConnectionData
func (RVConnectionData) CopyRef ¶ added in v2.1.0
func (rvcd RVConnectionData) CopyRef() RVTypePtr
CopyRef copies the current value of the RVConnectionData and returns a pointer to the new copy
func (*RVConnectionData) Deref ¶ added in v2.1.0
func (rvcd *RVConnectionData) Deref() RVType
Deref takes a pointer to the RVConnectionData and dereferences it to the raw value. Only useful when working with an instance of RVTypePtr
func (RVConnectionData) Equals ¶
func (rvcd RVConnectionData) Equals(o RVType) bool
Equals checks if the input is equal in value to the current instance
func (*RVConnectionData) ExtractFrom ¶
func (rvcd *RVConnectionData) ExtractFrom(readable Readable) error
ExtractFrom extracts the RVConnectionData from the given readable
func (RVConnectionData) FormatToString ¶
func (rvcd RVConnectionData) FormatToString(indentationLevel int) string
FormatToString pretty-prints the struct data using the provided indentation level
func (RVConnectionData) String ¶
func (rvcd RVConnectionData) String() string
String returns a string representation of the struct
func (RVConnectionData) WriteTo ¶
func (rvcd RVConnectionData) WriteTo(writable Writable)
WriteTo writes the RVConnectionData to the given writable
type RVType ¶
type RVType interface { WriteTo(writable Writable) // Writes the type data to the given Writable stream Copy() RVType // Returns a non-pointer copy of the type data. Complex types are deeply copied CopyRef() RVTypePtr // Returns a pointer to a copy of the type data. Complex types are deeply copied. Useful for obtaining a pointer without reflection, though limited to copies Equals(other RVType) bool // Checks if the input type is strictly equal to the current type }
RVType represents a Quazal Rendez-Vous/NEX type. This includes primitives and custom types.
type RVTypePtr ¶ added in v2.1.0
type RVTypePtr interface { RVType ExtractFrom(readable Readable) error // Reads the type data to the given Readable stream Deref() RVType // Returns the raw type data from a pointer. Useful for ensuring you have raw data without reflection }
RVTypePtr represents a pointer to an RVType. Used to separate pointer receivers for easier type checking.
type Readable ¶
type Readable interface { StringLengthSize() int // Returns the size of the length field for rdv::String types. Only 2 and 4 are valid PIDSize() int // Returns the size of the length fields for nn::nex::PID types. Only 4 and 8 are valid UseStructureHeader() bool // Returns whether or not Structure types should use a header Remaining() uint64 // Returns the number of bytes left unread in the buffer ReadRemaining() []byte // Reads the remaining data from the buffer Read(length uint64) ([]byte, error) // Reads up to length bytes of data from the buffer. Returns an error if the read failed, such as if there was not enough data to read ReadUInt8() (uint8, error) // Reads a primitive Go uint8. Returns an error if the read failed, such as if there was not enough data to read ReadUInt16LE() (uint16, error) // Reads a primitive Go uint16. Returns an error if the read failed, such as if there was not enough data to read ReadUInt32LE() (uint32, error) // Reads a primitive Go uint32. Returns an error if the read failed, such as if there was not enough data to read ReadUInt64LE() (uint64, error) // Reads a primitive Go uint64. Returns an error if the read failed, such as if there was not enough data to read ReadInt8() (int8, error) // Reads a primitive Go int8. Returns an error if the read failed, such as if there was not enough data to read ReadInt16LE() (int16, error) // Reads a primitive Go int16. Returns an error if the read failed, such as if there was not enough data to read ReadInt32LE() (int32, error) // Reads a primitive Go int32. Returns an error if the read failed, such as if there was not enough data to read ReadInt64LE() (int64, error) // Reads a primitive Go int64. Returns an error if the read failed, such as if there was not enough data to read ReadFloat32LE() (float32, error) // Reads a primitive Go float32. Returns an error if the read failed, such as if there was not enough data to read ReadFloat64LE() (float64, error) // Reads a primitive Go float64. Returns an error if the read failed, such as if there was not enough data to read ReadBool() (bool, error) // Reads a primitive Go bool. Returns an error if the read failed, such as if there was not enough data to read }
Readable represents a struct that types can read from
type ResultRange ¶
type ResultRange struct { Structure Offset UInt32 `json:"offset" db:"offset" bson:"offset" xml:"Offset"` // * Offset into the dataset Length UInt32 `json:"length" db:"length" bson:"length" xml:"Length"` // * Number of items to return }
ResultRange is an implementation of rdv::ResultRange. Holds information about how to make queries which may return large data.
func (ResultRange) Copy ¶
func (rr ResultRange) Copy() RVType
Copy returns a new copied instance of ResultRange
func (ResultRange) CopyRef ¶ added in v2.1.0
func (rr ResultRange) CopyRef() RVTypePtr
CopyRef copies the current value of the ResultRange and returns a pointer to the new copy
func (*ResultRange) Deref ¶ added in v2.1.0
func (rr *ResultRange) Deref() RVType
Deref takes a pointer to the ResultRange and dereferences it to the raw value. Only useful when working with an instance of RVTypePtr
func (ResultRange) Equals ¶
func (rr ResultRange) Equals(o RVType) bool
Equals checks if the input is equal in value to the current instance
func (*ResultRange) ExtractFrom ¶
func (rr *ResultRange) ExtractFrom(readable Readable) error
ExtractFrom extracts the ResultRange from the given readable
func (ResultRange) FormatToString ¶
func (rr ResultRange) FormatToString(indentationLevel int) string
FormatToString pretty-prints the struct data using the provided indentation level
func (ResultRange) String ¶
func (rr ResultRange) String() string
String returns a string representation of the struct
func (ResultRange) WriteTo ¶
func (rr ResultRange) WriteTo(writable Writable)
WriteTo writes the ResultRange to the given writable
type StationURL ¶
type StationURL struct {
// contains filtered or unexported fields
}
StationURL is an implementation of rdv::StationURL.
Contains location of a station to connect to, with data about how to connect.
func NewStationURL ¶
func NewStationURL(url String) StationURL
NewStationURL returns a new StationURL
func (StationURL) Address ¶
func (s StationURL) Address() (string, bool)
Address gets the stations IP address.
Originally called nn::nex::StationURL::GetAddress
func (StationURL) ConnectionID ¶
func (s StationURL) ConnectionID() (uint32, bool)
ConnectionID gets the stations connection ID.
Returns a bool indicating if the parameter existed or not.
Originally called nn::nex::StationURL::GetConnectionID
func (StationURL) Copy ¶
func (s StationURL) Copy() RVType
Copy returns a new copied instance of StationURL
func (StationURL) CopyRef ¶ added in v2.1.0
func (s StationURL) CopyRef() RVTypePtr
CopyRef copies the current value of the StationURL and returns a pointer to the new copy
func (*StationURL) Deref ¶ added in v2.1.0
func (s *StationURL) Deref() RVType
Deref takes a pointer to the StationURL and dereferences it to the raw value. Only useful when working with an instance of RVTypePtr
func (StationURL) Equals ¶
func (s StationURL) Equals(o RVType) bool
Equals checks if the input is equal in value to the current instance
func (*StationURL) ExtractFrom ¶
func (s *StationURL) ExtractFrom(readable Readable) error
ExtractFrom extracts the StationURL from the given readable
func (*StationURL) Format ¶ added in v2.1.0
func (s *StationURL) Format()
Format encodes the StationURL into a string
func (StationURL) FormatToString ¶
func (s StationURL) FormatToString(indentationLevel int) string
FormatToString pretty-prints the struct data using the provided indentation level
func (*StationURL) Get ¶ added in v2.1.0
func (s *StationURL) Get(name string, custom bool) (string, bool)
Get returns the value of the requested param.
Returns the string value and a bool indicating if the value existed or not.
"custom" determines whether or not the parameter is a standard parameter or an application-specific parameter
func (StationURL) IsBehindNAT ¶
func (s StationURL) IsBehindNAT() bool
IsBehindNAT checks if the user is behind NAT
func (StationURL) IsFastProbeResponseEnabled ¶
func (s StationURL) IsFastProbeResponseEnabled() bool
IsFastProbeResponseEnabled checks if fast probe response is enabled
Originally called nn::nex::StationURL::GetFastProbeResponse
func (StationURL) IsNATPMPSupported ¶
func (s StationURL) IsNATPMPSupported() bool
IsNATPMPSupported checks whether PMP is enabled on the station.
Originally called nn::nex::StationURL::GetNatPMPSupport
func (StationURL) IsProbeRequestInitiationEnabled ¶
func (s StationURL) IsProbeRequestInitiationEnabled() bool
IsProbeRequestInitiationEnabled checks wheteher probing should be initiated.
Originally called nn::nex::StationURL::GetProbeRequestInitiation
func (StationURL) IsPublic ¶
func (s StationURL) IsPublic() bool
IsPublic checks if the station is a public address
func (StationURL) IsRelayServerEnabled ¶
func (s StationURL) IsRelayServerEnabled() bool
IsRelayServerEnabled checks whether the connection should use a relay server.
Originally called nn::nex::StationURL::GetUseRelayServer
func (StationURL) IsUPnPSupported ¶
func (s StationURL) IsUPnPSupported() bool
IsUPnPSupported checks whether UPnP is enabled on the station.
Originally called nn::nex::StationURL::GetUPnPSupport
func (StationURL) NATFiltering ¶
func (s StationURL) NATFiltering() (constants.NATFilteringProperties, bool)
NATFiltering gets the clients NAT filtering properties.
Returns a bool indicating if the parameter existed or not.
Originally called nn::nex::StationURL::GetNATFiltering
func (StationURL) NATMapping ¶
func (s StationURL) NATMapping() (constants.NATMappingProperties, bool)
NATMapping gets the clients NAT mapping properties.
Returns a bool indicating if the parameter existed or not.
Originally called nn::nex::StationURL::GetNATMapping
func (StationURL) NodeID ¶
func (s StationURL) NodeID() (uint16, bool)
NodeID gets the stations node ID.
Returns a bool indicating if the parameter existed or not.
Originally called nn::nex::StationURL::GetNodeId
func (StationURL) ParamValue ¶
func (s StationURL) ParamValue(name string) (string, bool)
ParamValue returns the value of the requested param.
Returns the string value and a bool indicating if the value existed or not.
Originally called nn::nex::StationURL::GetParamValue
func (*StationURL) Parse ¶ added in v2.1.0
func (s *StationURL) Parse()
Parse parses the StationURL data from a string
func (StationURL) PlatformType ¶
func (s StationURL) PlatformType() (uint8, bool)
PlatformType gets the stations target platform. Legal values vary by developer and platforms.
Returns a bool indicating if the parameter existed or not.
Originally called nn::nex::StationURL::GetPlatformType
func (*StationURL) PortNumber ¶
func (s *StationURL) PortNumber() (uint16, bool)
PortNumber gets the stations port.
Returns a bool indicating if the parameter existed or not.
Originally called nn::nex::StationURL::GetPortNumber
func (StationURL) PrincipalID ¶
func (s StationURL) PrincipalID() (PID, bool)
PrincipalID gets the stations target PID.
Returns a bool indicating if the parameter existed or not.
Originally called nn::nex::StationURL::GetPrincipalID
func (StationURL) ProbeRequestID ¶
func (s StationURL) ProbeRequestID() (uint32, bool)
ProbeRequestID gets the probe request ID.
Returns a bool indicating if the parameter existed or not.
Originally called nn::nex::StationURL::GetProbeRequestID
func (StationURL) RVConnectionID ¶
func (s StationURL) RVConnectionID() (uint32, bool)
RVConnectionID gets the stations Rendez-Vous connection ID.
Returns a bool indicating if the parameter existed or not.
Originally called nn::nex::StationURL::GetRVConnectionID
func (StationURL) RelayAddress ¶
func (s StationURL) RelayAddress() (string, bool)
RelayAddress gets the address for the relay
Originally called nn::nex::StationURL::GetRelayAddress
func (StationURL) RelayPort ¶
func (s StationURL) RelayPort() (uint16, bool)
RelayPort gets the stations relay port.
Returns a bool indicating if the parameter existed or not.
Originally called nn::nex::StationURL::GetRelayPort
func (StationURL) RelayServerAddress ¶
func (s StationURL) RelayServerAddress() (string, bool)
RelayServerAddress gets the address for the relay server
Originally called nn::nex::StationURL::GetRelayServerAddress
func (StationURL) RelayServerPort ¶
func (s StationURL) RelayServerPort() (uint16, bool)
RelayServerPort gets the stations relay server port.
Returns a bool indicating if the parameter existed or not.
Originally called nn::nex::StationURL::GetRelayServerPort
func (*StationURL) RemoveParam ¶
func (s *StationURL) RemoveParam(name string)
RemoveParam removes a StationURL parameter.
Originally called nn::nex::StationURL::Remove
func (*StationURL) Set ¶ added in v2.1.0
func (s *StationURL) Set(name, value string, custom bool)
Set sets a StationURL parameter.
"custom" determines whether or not the parameter is a standard parameter or an application-specific parameter
func (*StationURL) SetAddress ¶
func (s *StationURL) SetAddress(address string)
SetAddress sets the stations IP address
func (*StationURL) SetConnectionID ¶
func (s *StationURL) SetConnectionID(connectionID uint32)
SetConnectionID sets the stations connection ID
Unsure how this differs from the Rendez-Vous connection ID
func (*StationURL) SetFastProbeResponse ¶
func (s *StationURL) SetFastProbeResponse(fast bool)
SetFastProbeResponse sets whether fast probe response should be enabled or not
func (*StationURL) SetNATFiltering ¶
func (s *StationURL) SetNATFiltering(filtering constants.NATFilteringProperties)
SetNATFiltering sets the clients NAT filtering properties
func (*StationURL) SetNATMapping ¶
func (s *StationURL) SetNATMapping(mapping constants.NATMappingProperties)
SetNATMapping sets the clients NAT mapping properties
func (*StationURL) SetNATPMPSupport ¶
func (s *StationURL) SetNATPMPSupport(supported bool)
SetNATPMPSupport sets whether PMP should be enabled or not.
Originally called nn::nex::StationURL::SetNatPMPSupport
func (*StationURL) SetNodeID ¶
func (s *StationURL) SetNodeID(nodeID uint16)
SetNodeID sets the stations node ID
Originally called nn::nex::StationURL::SetNodeId
func (*StationURL) SetParamValue ¶
func (s *StationURL) SetParamValue(name, value string)
SetParamValue sets a StationURL parameter
func (*StationURL) SetPlatformType ¶
func (s *StationURL) SetPlatformType(platformType uint8)
SetPlatformType sets the stations platform type
func (*StationURL) SetPortNumber ¶
func (s *StationURL) SetPortNumber(port uint16)
SetPortNumber sets the stations port
func (*StationURL) SetPrincipalID ¶
func (s *StationURL) SetPrincipalID(pid PID)
SetPrincipalID sets the stations target PID
func (*StationURL) SetProbeRequestID ¶
func (s *StationURL) SetProbeRequestID(probeRequestID uint32)
SetProbeRequestID sets the probe request ID
func (*StationURL) SetProbeRequestInitiation ¶
func (s *StationURL) SetProbeRequestInitiation(probeinit bool)
SetProbeRequestInitiation sets whether probing should begin or not
func (*StationURL) SetRVConnectionID ¶
func (s *StationURL) SetRVConnectionID(connectionID uint32)
SetRVConnectionID sets the stations Rendez-Vous connection ID
Unsure how this differs from the connection ID
func (*StationURL) SetRelayAddress ¶
func (s *StationURL) SetRelayAddress(address string)
SetRelayAddress gets the address for the relay
func (*StationURL) SetRelayPort ¶
func (s *StationURL) SetRelayPort(port uint16)
SetRelayPort sets the port for the relay
func (*StationURL) SetRelayServerAddress ¶
func (s *StationURL) SetRelayServerAddress(address string)
SetRelayServerAddress sets the address for the relay server
func (*StationURL) SetRelayServerPort ¶
func (s *StationURL) SetRelayServerPort(port uint16)
SetRelayServerPort sets the port for the relay server
func (*StationURL) SetStreamID ¶
func (s *StationURL) SetStreamID(streamID uint8)
SetStreamID sets the stations stream ID
See VirtualPort
func (*StationURL) SetStreamType ¶
func (s *StationURL) SetStreamType(streamType constants.StreamType)
SetStreamType sets the stations stream type
See VirtualPort
func (*StationURL) SetType ¶
func (s *StationURL) SetType(flags uint8)
SetType sets the stations type flags
func (*StationURL) SetUPnPSupport ¶
func (s *StationURL) SetUPnPSupport(supported bool)
SetUPnPSupport sets whether UPnP should be enabled or not
func (*StationURL) SetURL ¶ added in v2.1.0
func (s *StationURL) SetURL(url string)
SetURL sets the internal url string used for parsing
func (*StationURL) SetURLType ¶
func (s *StationURL) SetURLType(urlType constants.StationURLType)
SetURLType sets the stations URL scheme type
func (*StationURL) SetUseRelayServer ¶
func (s *StationURL) SetUseRelayServer(useRelayServer bool)
SetUseRelayServer sets whether or not a relay server should be used
func (StationURL) StreamID ¶
func (s StationURL) StreamID() (uint8, bool)
StreamID gets the stations stream ID.
See VirtualPort.
Returns a bool indicating if the parameter existed or not.
Originally called nn::nex::StationURL::GetStreamID
func (StationURL) StreamType ¶
func (s StationURL) StreamType() (constants.StreamType, bool)
StreamType gets the stations stream type.
See VirtualPort.
Returns a bool indicating if the parameter existed or not.
Originally called nn::nex::StationURL::GetStreamType
func (StationURL) String ¶
func (s StationURL) String() string
String returns a string representation of the struct
func (StationURL) Type ¶
func (s StationURL) Type() (uint8, bool)
Type gets the stations type flags.
Returns a bool indicating if the parameter existed or not.
Originally called nn::nex::StationURL::GetType
func (StationURL) URL ¶ added in v2.1.0
func (s StationURL) URL() string
URL returns the string formatted URL.
Originally called nn::nex::StationURL::GetURL
func (StationURL) URLType ¶
func (s StationURL) URLType() constants.StationURLType
URLType returns the stations scheme type
Originally called nn::nex::StationURL::GetURLType
func (StationURL) WriteTo ¶
func (s StationURL) WriteTo(writable Writable)
WriteTo writes the StationURL to the given writable
type String ¶
type String string
String is an implementation of rdv::String. Type alias of string
func (String) Copy ¶
Copy returns a pointer to a copy of the String. Requires type assertion when used
func (String) CopyRef ¶ added in v2.1.0
CopyRef copies the current value of the String and returns a pointer to the new copy
func (*String) Deref ¶ added in v2.1.0
Deref takes a pointer to the String and dereferences it to the raw value. Only useful when working with an instance of RVTypePtr
func (*String) ExtractFrom ¶
ExtractFrom extracts the String from the given readable
type Structure ¶
type Structure struct {
StructureVersion uint8 `json:"structure_version" db:"structure_version" bson:"structure_version" xml:"StructureVersion"`
}
Structure represents a Quazal Rendez-Vous/NEX Structure (custom class) base struct.
func (*Structure) ExtractHeaderFrom ¶
ExtractHeaderFrom extracts the structure header from the given readable
func (Structure) WriteHeaderTo ¶
WriteHeaderTo writes the structure header to the given writable
type UInt16 ¶ added in v2.1.0
type UInt16 uint16
UInt16 is a type alias for the Go basic type uint16 for use as an RVType
func (UInt16) Copy ¶ added in v2.1.0
Copy returns a pointer to a copy of the UInt16. Requires type assertion when used
func (UInt16) CopyRef ¶ added in v2.1.0
CopyRef copies the current value of the UInt16 and returns a pointer to the new copy
func (*UInt16) Deref ¶ added in v2.1.0
Deref takes a pointer to the UInt16 and dereferences it to the raw value. Only useful when working with an instance of RVTypePtr
func (UInt16) Equals ¶ added in v2.1.0
Equals checks if the input is equal in value to the current instance
func (*UInt16) ExtractFrom ¶ added in v2.1.0
ExtractFrom extracts the UInt16 value from the given readable
type UInt32 ¶ added in v2.1.0
type UInt32 uint32
UInt32 is a type alias for the Go basic type uint32 for use as an RVType
func (UInt32) Copy ¶ added in v2.1.0
Copy returns a pointer to a copy of the UInt32. Requires type assertion when used
func (UInt32) CopyRef ¶ added in v2.1.0
CopyRef copies the current value of the UInt32 and returns a pointer to the new copy
func (*UInt32) Deref ¶ added in v2.1.0
Deref takes a pointer to the UInt32 and dereferences it to the raw value. Only useful when working with an instance of RVTypePtr
func (UInt32) Equals ¶ added in v2.1.0
Equals checks if the input is equal in value to the current instance
func (*UInt32) ExtractFrom ¶ added in v2.1.0
ExtractFrom extracts the UInt32 value from the given readable
type UInt64 ¶ added in v2.1.0
type UInt64 uint64
UInt64 is a type alias for the Go basic type uint64 for use as an RVType
func (UInt64) Copy ¶ added in v2.1.0
Copy returns a pointer to a copy of the UInt64. Requires type assertion when used
func (UInt64) CopyRef ¶ added in v2.1.0
CopyRef copies the current value of the UInt64 and returns a pointer to the new copy
func (*UInt64) Deref ¶ added in v2.1.0
Deref takes a pointer to the UInt64 and dereferences it to the raw value. Only useful when working with an instance of RVTypePtr
func (UInt64) Equals ¶ added in v2.1.0
Equals checks if the input is equal in value to the current instance
func (*UInt64) ExtractFrom ¶ added in v2.1.0
ExtractFrom extracts the UInt64 value from the given readable
type UInt8 ¶ added in v2.1.0
type UInt8 uint8
UInt8 is a type alias for the Go basic type uint8 for use as an RVType
func (UInt8) Copy ¶ added in v2.1.0
Copy returns a pointer to a copy of the UInt8. Requires type assertion when used
func (UInt8) CopyRef ¶ added in v2.1.0
CopyRef copies the current value of the UInt8 and returns a pointer to the new copy
func (*UInt8) Deref ¶ added in v2.1.0
Deref takes a pointer to the UInt8 and dereferences it to the raw value. Only useful when working with an instance of RVTypePtr
func (UInt8) Equals ¶ added in v2.1.0
Equals checks if the input is equal in value to the current instance
func (*UInt8) ExtractFrom ¶ added in v2.1.0
ExtractFrom extracts the UInt8 value from the given readable
type Variant ¶
type Variant struct { TypeID UInt8 `json:"type_id" db:"type_id" bson:"type_id" xml:"TypeID"` Type RVType `json:"type" db:"type" bson:"type" xml:"Type"` }
Variant is an implementation of rdv::Variant. This type can hold many other types, denoted by a type ID.
func (Variant) Copy ¶
Copy returns a pointer to a copy of the Variant. Requires type assertion when used
func (Variant) CopyRef ¶ added in v2.1.0
CopyRef copies the current value of the Variant and returns a pointer to the new copy
func (*Variant) Deref ¶ added in v2.1.0
Deref takes a pointer to the Variant and dereferences it to the raw value. Only useful when working with an instance of RVTypePtr
func (*Variant) ExtractFrom ¶
ExtractFrom extracts the Variant from the given readable
func (Variant) FormatToString ¶
FormatToString pretty-prints the struct data using the provided indentation level
type Writable ¶
type Writable interface { StringLengthSize() int // Returns the size of the length field for rdv::String types. Only 2 and 4 are valid PIDSize() int // Returns the size of the length fields for nn::nex::PID types. Only 4 and 8 are valid UseStructureHeader() bool // Returns whether or not Structure types should use a header CopyNew() Writable // Returns a new Writable with the same settings, but an empty buffer Write(data []byte) // Writes the provided data to the buffer WriteUInt8(value uint8) // Writes a primitive Go uint8 WriteUInt16LE(value uint16) // Writes a primitive Go uint16 WriteUInt32LE(value uint32) // Writes a primitive Go uint32 WriteUInt64LE(value uint64) // Writes a primitive Go uint64 WriteInt8(value int8) // Writes a primitive Go int8 WriteInt16LE(value int16) // Writes a primitive Go int16 WriteInt32LE(value int32) // Writes a primitive Go int32 WriteInt64LE(value int64) // Writes a primitive Go int64 WriteFloat32LE(value float32) // Writes a primitive Go float32 WriteFloat64LE(value float64) // Writes a primitive Go float64 WriteBool(value bool) // Writes a primitive Go bool Bytes() []byte // Returns the data written to the buffer }
Writable represents a struct that types can write to
Source Files ¶
- any_object_holder.go
- bool.go
- buffer.go
- class_version_container.go
- data.go
- data_holder.go
- datetime.go
- double.go
- float.go
- int16.go
- int32.go
- int64.go
- int8.go
- list.go
- map.go
- pid.go
- qbuffer.go
- qresult.go
- quuid.go
- readable.go
- result_range.go
- rv_connection_data.go
- rv_type.go
- station_url.go
- string.go
- structure.go
- uint16.go
- uint32.go
- uint64.go
- uint8.go
- variant.go
- writable.go