Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/oschwald/maxminddb-golang
/ functions
Functions
386 in github.com/oschwald/maxminddb-golang
⨍
Functions
386
◇
Types & classes
99
Method
Error
()
mmap_stub.go:11
Method
Error
()
internal/mmdberrors/errors.go:54
Function
ExampleContextualError
Example showing the API in action.
internal/decoder/error_context_test.go:100
Function
ExampleDecoder_PeekKind
ExampleDecoder_PeekKind demonstrates how to use PeekKind for look-ahead parsing without consuming values.
internal/decoder/decoder_test.go:664
Function
ExampleKind_IsContainer
ExampleKind_IsContainer demonstrates container type detection.
internal/decoder/kind_test.go:150
Function
ExampleKind_IsScalar
ExampleKind_IsScalar demonstrates scalar type detection.
internal/decoder/kind_test.go:169
Function
ExampleKind_String
ExampleKind_String demonstrates human-readable Kind names.
internal/decoder/kind_test.go:134
Function
ExampleReader_Lookup_interface
This example demonstrates how to decode to an any.
example_test.go:38
Function
ExampleReader_Lookup_struct
This example shows how to decode to a struct.
example_test.go:13
Function
ExampleReader_Networks
This example demonstrates how to iterate over all networks in the database.
example_test.go:59
Function
ExampleReader_NetworksWithin
This example demonstrates how to iterate over all networks in the database which are contained within an arbitrary network.
example_test.go:140
Function
ExampleReader_Verify
This example demonstrates how to validate a MaxMind DB file and access metadata.
example_test.go:106
Function
ExampleSkipEmptyValues
This example demonstrates how to use SkipEmptyValues to iterate only over networks that have actual data, skipping those with empty maps or arrays.
example_test.go:177
Function
ExampleUnmarshaler
This example demonstrates how to use the Unmarshaler interface for custom decoding. Types implementing Unmarshaler automatically use custom decoding l
example_test.go:329
Function
FuzzDatabase
FuzzDatabase tests MMDB file parsing and IP address lookups. This targets file format parsing, database initialization, and lookup operations.
fuzz_test.go:17
Function
FuzzDecode
FuzzDecode tests the ReflectionDecoder.Decode method with fuzzed data. This targets data section parsing and reflection-based decoding logic.
fuzz_test.go:253
Function
FuzzDecodePath
FuzzDecodePath tests path-based decoding with fuzzed path segments. This targets edge cases in path traversal logic.
fuzz_test.go:103
Function
FuzzLookup
FuzzLookup tests IP address lookups without decoding results. This isolates the tree traversal and lookup logic from data decoding.
fuzz_test.go:53
Function
FuzzNetworks
FuzzNetworks tests the Networks() iterator with malformed databases. This focuses specifically on tree traversal and iteration logic.
fuzz_test.go:214
Method
Is
(target error)
mmap_stub.go:15
Function
NewDecoder
NewDecoder creates a new Decoder with the given buffer, offset, and options. Error messages include contextual offset information.
mmdbdata/type.go:16
Function
TestBadDataFixtures
(t *testing.T)
bad_data_test.go:11
Function
TestBool
(t *testing.T)
internal/decoder/reflection_test.go:17
Function
TestBoundsChecking
TestBoundsChecking verifies that buffer access is properly bounds-checked to prevent panics on malformed databases.
internal/decoder/decoder_test.go:489
Function
TestBrokenDoubleDatabase
(t *testing.T)
reader_test.go:931
Function
TestByte
(t *testing.T)
internal/decoder/reflection_test.go:463
Function
TestComplexStructWithNestingAndPointer
(t *testing.T)
reader_test.go:529
Function
TestContextualErrorIntegration
(t *testing.T)
internal/decoder/error_context_test.go:116
Function
TestCustomUnmarshaler
Test custom unmarshaling through Reader.Lookup.
reader_test.go:1414
Function
TestCustomUnmarshalerWithIterator
TestCustomUnmarshalerWithIterator tests that custom unmarshalers using iterators work correctly in struct fields. This reproduces the original "no nex
internal/decoder/nested_unmarshaler_test.go:317
Function
TestDecodeAllocatesTopLevelPointerTarget
(t *testing.T)
internal/decoder/reflection_test.go:177
Function
TestDecodeBool
(t *testing.T)
internal/decoder/decoder_test.go:31
Function
TestDecodeByte
(t *testing.T)
internal/decoder/decoder_test.go:325
Function
TestDecodeCtrlData
TestDecodeCtrlData verifies all four size-encoding paths (inline, +29, +285, +65821) plus the extended-kind path. Each path also has a truncated-buffe
internal/decoder/data_decoder_test.go:14
Function
TestDecodeCtrlDataTruncated
TestDecodeCtrlDataTruncated exercises the bounds checks: each case has just enough bytes to start decoding but not enough to read the trailing size or
internal/decoder/data_decoder_test.go:95
Function
TestDecodeDouble
(t *testing.T)
internal/decoder/decoder_test.go:49
Function
TestDecodeFloat
(t *testing.T)
internal/decoder/decoder_test.go:76
Function
TestDecodeInt32
(t *testing.T)
internal/decoder/decoder_test.go:104
Function
TestDecodeKeyFastPathBoundary
TestDecodeKeyFastPathBoundary covers the 28/29-character boundary between decodeKey's inline fast path (size < 29) and its slow path (size >= 29). An
internal/decoder/data_decoder_test.go:121
Function
TestDecodeKeyFollowsPointer
TestDecodeKeyFollowsPointer verifies that a pointer control byte at the key position bypasses the fast path and is followed to the target string. A re
internal/decoder/data_decoder_test.go:166
Function
TestDecodeMap
(t *testing.T)
internal/decoder/decoder_test.go:131
Function
TestDecodePath
(t *testing.T)
reader_test.go:362
Function
TestDecodePointerKeyFastExtendedSize
TestDecodePointerKeyFastExtendedSize verifies that a pointer targeting a string whose size requires the extended encoding (size byte >= 29) is handled
internal/decoder/data_decoder_test.go:253
Function
TestDecodePointerKeyFastNonStringTarget
TestDecodePointerKeyFastNonStringTarget verifies that a pointer to a non-KindString target bails out of the fast path. A regression that accepted any
internal/decoder/data_decoder_test.go:233
Function
TestDecodePointerKeyFastPointerSizes
TestDecodePointerKeyFastPointerSizes exercises decodePointerKeyFast for pointer sizes 2 and 4. Size 1 is covered by TestDecodeKeyFollowsPointer; size
internal/decoder/data_decoder_test.go:190
Function
TestDecodeReturnsErrorOnInvalidStructTag
(t *testing.T)
internal/decoder/tag_validation_test.go:99
Function
TestDecodeSlice
(t *testing.T)
internal/decoder/decoder_test.go:230
Function
TestDecodeSliceClearsReusedElements
(t *testing.T)
internal/decoder/reflection_test.go:236
Function
TestDecodeSliceClearsTailPointers
TestDecodeSliceClearsTailPointers is the pointer-element analog of TestDecodeSliceClearsTailReferences. For []*T the slice element IS the GC root, so
internal/decoder/reflection_test.go:344
Function
TestDecodeSliceClearsTailReferences
TestDecodeSliceClearsTailReferences exercises the second Clear in decodeSlice (the tail clear when the new slice is shorter than the previous one). Wh
internal/decoder/reflection_test.go:279
Function
TestDecodeSliceReusesBackingArray
TestDecodeSliceReusesBackingArray confirms the perf invariant of the reuse path: a second decode into the same destination must reuse the existing bac
internal/decoder/reflection_test.go:403
Function
TestDecodeString
(t *testing.T)
internal/decoder/decoder_test.go:313
Function
TestDecodeUint128
(t *testing.T)
internal/decoder/decoder_test.go:416
Function
TestDecodeUint16
(t *testing.T)
internal/decoder/decoder_test.go:352
Function
TestDecodeUint32
(t *testing.T)
internal/decoder/decoder_test.go:372
Function
TestDecodeUint64
(t *testing.T)
internal/decoder/decoder_test.go:394
Function
TestDecoder
(t *testing.T)
reader_test.go:310
Function
TestDecoderOptions
(t *testing.T)
internal/decoder/decoder_test.go:704
Function
TestDecodingToInterface
(t *testing.T)
reader_test.go:252
Function
TestDecodingToNonPointer
(t *testing.T)
reader_test.go:964
Function
TestDecodingUint16IntoInt
(t *testing.T)
reader_test.go:664
Function
TestDouble
(t *testing.T)
internal/decoder/reflection_test.go:26
Function
TestEmbeddedPointerSupport
TestEmbeddedPointerSupport tests support for embedded pointer types.
internal/decoder/field_precedence_test.go:78
Function
TestEmbeddedStructAsInterface
(t *testing.T)
reader_test.go:459
Function
TestFallbackToReflection
TestFallbackToReflection verifies that types without UnmarshalMaxMindDB still work.
reader_test.go:1500
Function
TestFastDecodePointerFieldDoesNotAllocateOnTypeError
(t *testing.T)
internal/decoder/reflection_test.go:162
Function
TestFastPathPreservesUnmarshalerForNamedTypes
TestFastPathPreservesUnmarshalerForNamedTypes guards every fast-path kind against a regression where decodeStruct's isFastType short-circuit runs befo
internal/decoder/nested_unmarshaler_test.go:487
Function
TestFieldCaching
TestFieldCaching tests the field caching mechanism works with new precedence rules.
internal/decoder/field_precedence_test.go:104
Function
TestFieldPrecedenceRules
TestFieldPrecedenceRules tests json/v2 style field precedence behavior.
internal/decoder/field_precedence_test.go:13
Function
TestFloat
(t *testing.T)
internal/decoder/reflection_test.go:40
Function
TestGeoIPNetworksWithin
(t *testing.T)
traverse_test.go:365
Function
TestInt32
(t *testing.T)
internal/decoder/reflection_test.go:55
Function
TestIntegerOverflowProtection
(t *testing.T)
reader_test.go:1546
Function
TestInvalidNodeCountDatabase
(t *testing.T)
reader_test.go:945
Function
TestIpv6inIpv4
(t *testing.T)
reader_test.go:677
Function
TestIsEmptyValueAtFollowsPointers
(t *testing.T)
internal/decoder/reflection_test.go:190
Function
TestIsEmptyValueAtRejectsPointerCycle
(t *testing.T)
internal/decoder/reflection_test.go:201
Function
TestKind_Classification
(t *testing.T)
internal/decoder/kind_test.go:102
Function
TestKind_IsContainer
(t *testing.T)
internal/decoder/kind_test.go:42
Function
TestKind_IsScalar
(t *testing.T)
internal/decoder/kind_test.go:70
Function
TestKind_String
(t *testing.T)
internal/decoder/kind_test.go:10
Function
TestLookupIPv4OnlyDB
TestLookupIPv4OnlyDB exercises the IPv4 specialized walks against IPv4-only databases (ipv4StartBitDepth=96, ipv4Start=0). The mixed-DB parity test gu
reader_test.go:807
Function
TestLookupIPv4VsIPv6Mixed
TestLookupIPv4VsIPv6Mixed guards the specialized IPv4 tree walks in traverseTree24, traverseTree28, and traverseTree32 against drift from the generic
reader_test.go:732
Function
TestLookupNetwork
(t *testing.T)
reader_test.go:106
Function
TestLookupRejectsDataPointersOutsideDataSection
(t *testing.T)
reader_data_pointer_test.go:12
Function
TestMap
(t *testing.T)
internal/decoder/reflection_test.go:212
Function
TestMetadataBuildTime
(t *testing.T)
reader_test.go:1522
Function
TestMetadataPointer
(t *testing.T)
reader_test.go:263
Function
TestMissingDatabase
(t *testing.T)
reader_test.go:952
Function
TestNegativeInt32DoesNotDecodeIntoUint
(t *testing.T)
internal/decoder/reflection_test.go:73
Function
TestNestedMapDecode
See GitHub #115.
reader_test.go:561
Function
TestNestedOffsetDecode
(t *testing.T)
reader_test.go:621
Function
TestNestedUnmarshaler
TestNestedUnmarshaler tests that UnmarshalMaxMindDB is called for nested struct fields.
internal/decoder/nested_unmarshaler_test.go:27
Function
TestNestedUnmarshalerInMap
TestNestedUnmarshalerInMap tests UnmarshalMaxMindDB for map values.
internal/decoder/nested_unmarshaler_test.go:256
Function
TestNestedUnmarshalerInSlice
TestNestedUnmarshalerInSlice tests UnmarshalMaxMindDB for slice elements.
internal/decoder/nested_unmarshaler_test.go:197
Function
TestNestedUnmarshalerPointer
TestNestedUnmarshalerPointer tests UnmarshalMaxMindDB with pointer fields.
internal/decoder/nested_unmarshaler_test.go:142
Function
TestNetworks
(t *testing.T)
traverse_test.go:16
Function
TestNetworksWithInvalidSearchTree
(t *testing.T)
traverse_test.go:42
Function
TestNetworksWithin
(t *testing.T)
traverse_test.go:302
Function
TestNetworksWithinInvalidPrefix
(t *testing.T)
reader_test.go:1619
← previous
next →
201–300 of 386, ranked by callers