Documentation ¶
Overview ¶
Diameter AVP data formats.
Index ¶
- Variables
- type Address
- type DecoderFunc
- type DiameterIdentity
- type DiameterURI
- type Enumerated
- type Float32
- type Float64
- type Format
- func Decode(Format FormatId, b []byte) (Format, error)
- func DecodeAddress(b []byte) (Format, error)
- func DecodeDiameterIdentity(b []byte) (Format, error)
- func DecodeDiameterURI(b []byte) (Format, error)
- func DecodeEnumerated(b []byte) (Format, error)
- func DecodeFloat32(b []byte) (Format, error)
- func DecodeFloat64(b []byte) (Format, error)
- func DecodeGrouped(b []byte) (Format, error)
- func DecodeIPFilterRule(b []byte) (Format, error)
- func DecodeIPv4(b []byte) (Format, error)
- func DecodeInteger32(b []byte) (Format, error)
- func DecodeInteger64(b []byte) (Format, error)
- func DecodeOctetString(b []byte) (Format, error)
- func DecodeTime(b []byte) (Format, error)
- func DecodeUTF8String(b []byte) (Format, error)
- func DecodeUnsigned32(b []byte) (Format, error)
- func DecodeUnsigned64(b []byte) (Format, error)
- type FormatId
- 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]FormatId{ "Address": AddressFormat, "DiameterIdentity": DiameterIdentityFormat, "DiameterURI": DiameterURIFormat, "Enumerated": EnumeratedFormat, "Float32": Float32Format, "Float64": Float64Format, "Grouped": GroupedFormat, "IPFilterRule": IPFilterRuleFormat, "IPv4": IPv4Format, "Integer32": Integer32Format, "Integer64": Integer64Format, "OctetString": OctetStringFormat, "Time": TimeFormat, "UTF8String": UTF8StringFormat, "Unsigned32": Unsigned32Format, "Unsigned64": Unsigned64Format, }
View Source
var Decoder = map[FormatId]DecoderFunc{ AddressFormat: DecodeAddress, DiameterIdentityFormat: DecodeDiameterIdentity, DiameterURIFormat: DecodeDiameterURI, EnumeratedFormat: DecodeEnumerated, Float32Format: DecodeFloat32, Float64Format: DecodeFloat64, GroupedFormat: DecodeGrouped, IPFilterRuleFormat: DecodeIPFilterRule, IPv4Format: DecodeIPv4, Integer32Format: DecodeInteger32, Integer64Format: DecodeInteger64, OctetStringFormat: DecodeOctetString, TimeFormat: DecodeTime, UTF8StringFormat: DecodeUTF8String, Unsigned32Format: DecodeUnsigned32, Unsigned64Format: DecodeUnsigned64, }
Functions ¶
This section is empty.
Types ¶
type Address ¶
Address Diameter Format.
type DecoderFunc ¶
type DiameterIdentity ¶
type DiameterIdentity OctetString
DiameterIdentity Diameter Format.
func (DiameterIdentity) Format ¶
func (s DiameterIdentity) Format() FormatId
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
type DiameterURI ¶
type DiameterURI OctetString
DiameterURI Diameter Format.
func (DiameterURI) Format ¶
func (s DiameterURI) Format() FormatId
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
type Enumerated ¶
type Enumerated Integer32
Enumerated Diameter Format.
func (Enumerated) Format ¶
func (n Enumerated) Format() FormatId
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
type Format ¶
type Format interface { Serialize() []byte Len() int Padding() int Format() FormatId String() string }
Format is an interface for supporting multiple AVP data formats.
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 IPFilterRule ¶
type IPFilterRule OctetString
IPFilterRule Diameter Format.
func (IPFilterRule) Format ¶
func (s IPFilterRule) Format() FormatId
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
type OctetString ¶
type OctetString string
OctetString Diameter Format.
func (OctetString) Format ¶
func (s OctetString) Format() FormatId
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
type UTF8String ¶
type UTF8String OctetString
UTF8String Diameter Format.
func (UTF8String) Format ¶
func (s UTF8String) Format() FormatId
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
type Unsigned32 ¶
type Unsigned32 uint32
Unsigned32 Diameter Format.
func (Unsigned32) Format ¶
func (n Unsigned32) Format() FormatId
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
type Unsigned64 ¶
type Unsigned64 uint64
Unsigned64 Diameter Format.
func (Unsigned64) Format ¶
func (n Unsigned64) Format() FormatId
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
Click to show internal directories.
Click to hide internal directories.