package
8.0.2
Repository: https://github.com/apache/trafficcontrol.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

AESDecrypt takes in a 16, 24, or 32 byte AES key (128, 192, 256 bit encryption respectively) and encrypted text.
AESEncrypt takes in a 16, 24, or 32 byte AES key (128, 192, 256 bit encryption respectively) and plain text.
BoolPtr returns a pointer to the given boolean.
BytesLenSplit splits the given byte array into an n-length arrays.
No description provided by the author
CIDRIsSubset returns whether na is a subset (possibly improper) of nb.
Coalesce coalesces the given pointer to a concrete value.
CoalesceCIDRs coalesces cidrs into a smaller set of CIDRs, by combining overlapping networks into networks of size coalesceMaskLen, if there are at least coalesceNumber cidrs in the larger mask.
CoalesceIPs combines ips into CIDRs, by combining overlapping networks into networks of size coalesceMaskLen, if there are at least coalesceNumber IPs in the larger mask.
CoalesceToDefault coalesces a pointer to the type to which it points.
No description provided by the author
ConvertTimeFormat converts the input time to the supplied format.
CopyIfNotNil makes a deep copy of p - unless it's nil, in which case it just returns nil.
CopyMap makes a "deep-ish" copy of the map passed to it.
No description provided by the author
FirstIP returns the first IP in the CIDR.
FloatPtr returns a pointer to the given 64-bit floating-point number.
HashInts returns a SHA512 hash of ints.
Int64Ptr returns a pointer to the given 64-bit integer.
InterfacePtr returns a pointer to the given empty interface.
IntPtr returns a pointer to the given integer.
IntSliceToMap creates an int set from an array.
No description provided by the author
No description provided by the author
IPToCIDR returns the CIDR containing just the given IP.
No description provided by the author
No description provided by the author
No description provided by the author
LastIP returns the last IP in the CIDR.
No description provided by the author
No description provided by the author
Ptr returns a pointer to the given value.
RangeStr returns the hyphenated range of IPs.
RemoveStrDuplicates removes duplicates from strings, considering a map of already-seen duplicates.
RemoveStrFromArray removes a specific string from a string slice.
SliceToSet converts a slice to a map whose keys are the slice members, that is, a set.
Stacktrace is a helper function which returns the current stacktrace.
StrInArray returns whether s is one of the strings in strs.
StripAllWhitespace returns s with all whitespace removed, as defined by unicode.IsSpace.
StrPtr returns a pointer to the given string.
TimePtr returns a pointer to the given time.Time value.
ToNumeric returns a float for any numeric type, and false if the interface does not hold a numeric type.
Uint64Ptr returns a pointer to the given 64-bit unsigned integer.
UInt64Ptr returns a pointer to the given 64-bit unsigned integer.
UIntPtr returns a pointer to the given unsigned integer.
ValidateAESKey takes in a byte slice and tests if it's a valid AES key (16, 24, or 32 bytes).

# Constants

No description provided by the author
ConstantBackoffDuration is a fallback duration that may be used by an application along with NewConstantBackoff().
DefaultFactor may be used by applications for the factor argument.
No description provided by the author

# Structs

BodyInterceptor fulfills the Writer interface, but records the body and doesn't actually write.
Interceptor implements http.ResponseWriter.
JSONNameOrIDStr is designed to handle backwards-compatibility for old Perl endpoints which accept both.

# Interfaces

No description provided by the author

# Type aliases

JSONIntStr unmarshals JSON strings or numbers into an int.