Documentation
¶
Index ¶
- func CompareTwoByteSlices(s1, s2 []byte) bool
- func ConvertClientTypeByteToStr(b byte) string
- func ConvertClientTypeStrToByte(CType string) (byte, error)
- func ConvertProtoByteToStr(b byte) string
- func ConvertProtoStrToByte(proto string) (byte, error)
- func ConvertSignatureMethodByteToStr(b byte) string
- func ElementInSlice(elm byte, slice []byte) bool
- func IsIPv6(ip string) (bool, error)
- func PortCanBeZero(protocol byte) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareTwoByteSlices ¶
Returns true if the two byte slices match identically.
func ConvertProtoByteToStr ¶
The opposite of ConvertProtoStrToByte - converts a byte to a string. If there is no mapping we will return an empty string.
func ConvertProtoStrToByte ¶
Returns the byte value of the protocol according to: https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml. If unsupported protocol, we will return an error.
func ConvertSignatureMethodByteToStr ¶
Converts a signature method constant to a string.
func ElementInSlice ¶
Checks if byte element is present in the byte slice, returns a boolean.
func IsIPv6 ¶
Returns if the ip parameter string is an IPv6 address. In case there is no error, false signifies that it is an IPv4 address and true signifies that is is an IPv6 address.
func PortCanBeZero ¶
Returns if the port can be equal to zero for the specified protocol.
Types ¶
This section is empty.