Documentation ¶
Overview ¶
Diameter data types.
Index ¶
- Variables
- type Address
- type DataType
- func Decode(datatype DataTypeId, b []byte) (DataType, error)
- func DecodeAddress(b []byte) (DataType, error)
- func DecodeDiameterIdentity(b []byte) (DataType, error)
- func DecodeDiameterURI(b []byte) (DataType, error)
- func DecodeEnumerated(b []byte) (DataType, error)
- func DecodeFloat32(b []byte) (DataType, error)
- func DecodeFloat64(b []byte) (DataType, error)
- func DecodeGrouped(b []byte) (DataType, error)
- func DecodeIPFilterRule(b []byte) (DataType, error)
- func DecodeIPv4(b []byte) (DataType, error)
- func DecodeInteger32(b []byte) (DataType, error)
- func DecodeInteger64(b []byte) (DataType, error)
- func DecodeOctetString(b []byte) (DataType, error)
- func DecodeTime(b []byte) (DataType, error)
- func DecodeUTF8String(b []byte) (DataType, error)
- func DecodeUnsigned32(b []byte) (DataType, error)
- func DecodeUnsigned64(b []byte) (DataType, error)
- type DataTypeId
- type DecoderFunc
- type DiameterIdentity
- type DiameterURI
- type Enumerated
- type Float32
- type Float64
- type Grouped
- type IPFilterRule
- type IPv4
- type Integer32
- type Integer64
- type OctetString
- type Time
- type UTF8String
- type Unsigned32
- type Unsigned64
Constants ¶
This section is empty.
Variables ¶
View Source
var Available = map[string]DataTypeId{ "Address": AddressType, "DiameterIdentity": DiameterIdentityType, "DiameterURI": DiameterURIType, "Enumerated": EnumeratedType, "Float32": Float32Type, "Float64": Float64Type, "Grouped": GroupedType, "IPFilterRule": IPFilterRuleType, "IPv4": IPv4Type, "Integer32": Integer32Type, "Integer64": Integer64Type, "OctetString": OctetStringType, "Time": TimeType, "UTF8String": UTF8StringType, "Unsigned32": Unsigned32Type, "Unsigned64": Unsigned64Type, }
View Source
var Decoder = map[DataTypeId]DecoderFunc{ AddressType: DecodeAddress, DiameterIdentityType: DecodeDiameterIdentity, DiameterURIType: DecodeDiameterURI, EnumeratedType: DecodeEnumerated, Float32Type: DecodeFloat32, Float64Type: DecodeFloat64, GroupedType: DecodeGrouped, IPFilterRuleType: DecodeIPFilterRule, IPv4Type: DecodeIPv4, Integer32Type: DecodeInteger32, Integer64Type: DecodeInteger64, OctetStringType: DecodeOctetString, TimeType: DecodeTime, UTF8StringType: DecodeUTF8String, Unsigned32Type: DecodeUnsigned32, Unsigned64Type: DecodeUnsigned64, }
Functions ¶
This section is empty.
Types ¶
type Address ¶
Address Diameter Type.
func (Address) Serialize ¶
Serialize returns the byte representation of the Diameter Address. Example:
ip := net.IP(addr.Serialize())
func (Address) Type ¶
func (addr Address) Type() DataTypeId
type DataType ¶
type DataType interface { Serialize() []byte Len() int Padding() int Type() DataTypeId String() string }
func DecodeAddress ¶
DecodeAddress decodes the byte representation of a Diameter Address. Example:
b := Address(net.ParseIP("10.0.0.1"))
func DecodeDiameterIdentity ¶
func DecodeDiameterURI ¶
func DecodeEnumerated ¶
func DecodeFloat32 ¶
func DecodeFloat64 ¶
func DecodeGrouped ¶
func DecodeIPFilterRule ¶
func DecodeIPv4 ¶
func DecodeInteger32 ¶
func DecodeInteger64 ¶
func DecodeOctetString ¶
func DecodeTime ¶
func DecodeUTF8String ¶
func DecodeUnsigned32 ¶
func DecodeUnsigned64 ¶
type DataTypeId ¶
type DataTypeId int
const ( UnknownType DataTypeId = iota AddressType DiameterIdentityType DiameterURIType EnumeratedType Float32Type Float64Type GroupedType IPFilterRuleType IPv4Type Integer32Type Integer64Type OctetStringType TimeType UTF8StringType Unsigned32Type Unsigned64Type )
type DecoderFunc ¶
type DiameterIdentity ¶
type DiameterIdentity OctetString
DiameterIdentity Diameter Type.
func (DiameterIdentity) Len ¶
func (s DiameterIdentity) Len() int
func (DiameterIdentity) Padding ¶
func (s DiameterIdentity) Padding() int
func (DiameterIdentity) Serialize ¶
func (s DiameterIdentity) Serialize() []byte
func (DiameterIdentity) String ¶
func (s DiameterIdentity) String() string
func (DiameterIdentity) Type ¶
func (s DiameterIdentity) Type() DataTypeId
type DiameterURI ¶
type DiameterURI OctetString
DiameterURI Diameter Type.
func (DiameterURI) Len ¶
func (s DiameterURI) Len() int
func (DiameterURI) Padding ¶
func (s DiameterURI) Padding() int
func (DiameterURI) Serialize ¶
func (s DiameterURI) Serialize() []byte
func (DiameterURI) String ¶
func (s DiameterURI) String() string
func (DiameterURI) Type ¶
func (s DiameterURI) Type() DataTypeId
type Enumerated ¶
type Enumerated Integer32
Enumerated Diameter Type
func (Enumerated) Len ¶
func (n Enumerated) Len() int
func (Enumerated) Padding ¶
func (n Enumerated) Padding() int
func (Enumerated) Serialize ¶
func (n Enumerated) Serialize() []byte
func (Enumerated) String ¶
func (n Enumerated) String() string
func (Enumerated) Type ¶
func (n Enumerated) Type() DataTypeId
type Float32 ¶
type Float32 float32
Float32 Diameter Type
func (Float32) Type ¶
func (n Float32) Type() DataTypeId
type Float64 ¶
type Float64 float64
Float64 Diameter Type
func (Float64) Type ¶
func (n Float64) Type() DataTypeId
type Grouped ¶
type Grouped []byte
Grouped Diameter Type
func (Grouped) Type ¶
func (g Grouped) Type() DataTypeId
type IPFilterRule ¶
type IPFilterRule OctetString
IPFilterRule Diameter Type.
func (IPFilterRule) Len ¶
func (s IPFilterRule) Len() int
func (IPFilterRule) Padding ¶
func (s IPFilterRule) Padding() int
func (IPFilterRule) Serialize ¶
func (s IPFilterRule) Serialize() []byte
func (IPFilterRule) String ¶
func (s IPFilterRule) String() string
func (IPFilterRule) Type ¶
func (s IPFilterRule) Type() DataTypeId
type IPv4 ¶
IPv4 Diameter Type for Framed-IP-Address AVP.
func (IPv4) Type ¶
func (ip IPv4) Type() DataTypeId
type Integer32 ¶
type Integer32 int32
Integer32 Diameter Type
func (Integer32) Type ¶
func (n Integer32) Type() DataTypeId
type Integer64 ¶
type Integer64 int64
Integer64 Diameter Type
func (Integer64) Type ¶
func (n Integer64) Type() DataTypeId
type OctetString ¶
type OctetString string
OctetString Diameter Type.
func (OctetString) Len ¶
func (s OctetString) Len() int
func (OctetString) Padding ¶
func (s OctetString) Padding() int
func (OctetString) Serialize ¶
func (s OctetString) Serialize() []byte
func (OctetString) String ¶
func (s OctetString) String() string
func (OctetString) Type ¶
func (s OctetString) Type() DataTypeId
type UTF8String ¶
type UTF8String OctetString
UTF8String Diameter Type.
func (UTF8String) Len ¶
func (s UTF8String) Len() int
func (UTF8String) Padding ¶
func (s UTF8String) Padding() int
func (UTF8String) Serialize ¶
func (s UTF8String) Serialize() []byte
func (UTF8String) String ¶
func (s UTF8String) String() string
func (UTF8String) Type ¶
func (s UTF8String) Type() DataTypeId
type Unsigned32 ¶
type Unsigned32 uint32
Unsigned32 Diameter Type
func (Unsigned32) Len ¶
func (n Unsigned32) Len() int
func (Unsigned32) Padding ¶
func (n Unsigned32) Padding() int
func (Unsigned32) Serialize ¶
func (n Unsigned32) Serialize() []byte
func (Unsigned32) String ¶
func (n Unsigned32) String() string
func (Unsigned32) Type ¶
func (n Unsigned32) Type() DataTypeId
type Unsigned64 ¶
type Unsigned64 uint64
Unsigned64 Diameter Type
func (Unsigned64) Len ¶
func (n Unsigned64) Len() int
func (Unsigned64) Padding ¶
func (n Unsigned64) Padding() int
func (Unsigned64) Serialize ¶
func (n Unsigned64) Serialize() []byte
func (Unsigned64) String ¶
func (n Unsigned64) String() string
func (Unsigned64) Type ¶
func (n Unsigned64) Type() DataTypeId
Click to show internal directories.
Click to hide internal directories.