MCPcopy Create free account

hub / github.com/oschwald/maxminddb-golang / functions

Functions386 in github.com/oschwald/maxminddb-golang

MethodError
()
mmap_stub.go:11
MethodError
()
internal/mmdberrors/errors.go:54
FunctionExampleContextualError
Example showing the API in action.
internal/decoder/error_context_test.go:100
FunctionExampleDecoder_PeekKind
ExampleDecoder_PeekKind demonstrates how to use PeekKind for look-ahead parsing without consuming values.
internal/decoder/decoder_test.go:664
FunctionExampleKind_IsContainer
ExampleKind_IsContainer demonstrates container type detection.
internal/decoder/kind_test.go:150
FunctionExampleKind_IsScalar
ExampleKind_IsScalar demonstrates scalar type detection.
internal/decoder/kind_test.go:169
FunctionExampleKind_String
ExampleKind_String demonstrates human-readable Kind names.
internal/decoder/kind_test.go:134
FunctionExampleReader_Lookup_interface
This example demonstrates how to decode to an any.
example_test.go:38
FunctionExampleReader_Lookup_struct
This example shows how to decode to a struct.
example_test.go:13
FunctionExampleReader_Networks
This example demonstrates how to iterate over all networks in the database.
example_test.go:59
FunctionExampleReader_NetworksWithin
This example demonstrates how to iterate over all networks in the database which are contained within an arbitrary network.
example_test.go:140
FunctionExampleReader_Verify
This example demonstrates how to validate a MaxMind DB file and access metadata.
example_test.go:106
FunctionExampleSkipEmptyValues
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
FunctionExampleUnmarshaler
This example demonstrates how to use the Unmarshaler interface for custom decoding. Types implementing Unmarshaler automatically use custom decoding l
example_test.go:329
FunctionFuzzDatabase
FuzzDatabase tests MMDB file parsing and IP address lookups. This targets file format parsing, database initialization, and lookup operations.
fuzz_test.go:17
FunctionFuzzDecode
FuzzDecode tests the ReflectionDecoder.Decode method with fuzzed data. This targets data section parsing and reflection-based decoding logic.
fuzz_test.go:253
FunctionFuzzDecodePath
FuzzDecodePath tests path-based decoding with fuzzed path segments. This targets edge cases in path traversal logic.
fuzz_test.go:103
FunctionFuzzLookup
FuzzLookup tests IP address lookups without decoding results. This isolates the tree traversal and lookup logic from data decoding.
fuzz_test.go:53
FunctionFuzzNetworks
FuzzNetworks tests the Networks() iterator with malformed databases. This focuses specifically on tree traversal and iteration logic.
fuzz_test.go:214
MethodIs
(target error)
mmap_stub.go:15
FunctionNewDecoder
NewDecoder creates a new Decoder with the given buffer, offset, and options. Error messages include contextual offset information.
mmdbdata/type.go:16
FunctionTestBadDataFixtures
(t *testing.T)
bad_data_test.go:11
FunctionTestBool
(t *testing.T)
internal/decoder/reflection_test.go:17
FunctionTestBoundsChecking
TestBoundsChecking verifies that buffer access is properly bounds-checked to prevent panics on malformed databases.
internal/decoder/decoder_test.go:489
FunctionTestBrokenDoubleDatabase
(t *testing.T)
reader_test.go:931
FunctionTestByte
(t *testing.T)
internal/decoder/reflection_test.go:463
FunctionTestComplexStructWithNestingAndPointer
(t *testing.T)
reader_test.go:529
FunctionTestContextualErrorIntegration
(t *testing.T)
internal/decoder/error_context_test.go:116
FunctionTestCustomUnmarshaler
Test custom unmarshaling through Reader.Lookup.
reader_test.go:1414
FunctionTestCustomUnmarshalerWithIterator
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
FunctionTestDecodeAllocatesTopLevelPointerTarget
(t *testing.T)
internal/decoder/reflection_test.go:177
FunctionTestDecodeBool
(t *testing.T)
internal/decoder/decoder_test.go:31
FunctionTestDecodeByte
(t *testing.T)
internal/decoder/decoder_test.go:325
FunctionTestDecodeCtrlData
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
FunctionTestDecodeCtrlDataTruncated
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
FunctionTestDecodeDouble
(t *testing.T)
internal/decoder/decoder_test.go:49
FunctionTestDecodeFloat
(t *testing.T)
internal/decoder/decoder_test.go:76
FunctionTestDecodeInt32
(t *testing.T)
internal/decoder/decoder_test.go:104
FunctionTestDecodeKeyFastPathBoundary
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
FunctionTestDecodeKeyFollowsPointer
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
FunctionTestDecodeMap
(t *testing.T)
internal/decoder/decoder_test.go:131
FunctionTestDecodePath
(t *testing.T)
reader_test.go:362
FunctionTestDecodePointerKeyFastExtendedSize
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
FunctionTestDecodePointerKeyFastNonStringTarget
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
FunctionTestDecodePointerKeyFastPointerSizes
TestDecodePointerKeyFastPointerSizes exercises decodePointerKeyFast for pointer sizes 2 and 4. Size 1 is covered by TestDecodeKeyFollowsPointer; size
internal/decoder/data_decoder_test.go:190
FunctionTestDecodeReturnsErrorOnInvalidStructTag
(t *testing.T)
internal/decoder/tag_validation_test.go:99
FunctionTestDecodeSlice
(t *testing.T)
internal/decoder/decoder_test.go:230
FunctionTestDecodeSliceClearsReusedElements
(t *testing.T)
internal/decoder/reflection_test.go:236
FunctionTestDecodeSliceClearsTailPointers
TestDecodeSliceClearsTailPointers is the pointer-element analog of TestDecodeSliceClearsTailReferences. For []*T the slice element IS the GC root, so
internal/decoder/reflection_test.go:344
FunctionTestDecodeSliceClearsTailReferences
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
FunctionTestDecodeSliceReusesBackingArray
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
FunctionTestDecodeString
(t *testing.T)
internal/decoder/decoder_test.go:313
FunctionTestDecodeUint128
(t *testing.T)
internal/decoder/decoder_test.go:416
FunctionTestDecodeUint16
(t *testing.T)
internal/decoder/decoder_test.go:352
FunctionTestDecodeUint32
(t *testing.T)
internal/decoder/decoder_test.go:372
FunctionTestDecodeUint64
(t *testing.T)
internal/decoder/decoder_test.go:394
FunctionTestDecoder
(t *testing.T)
reader_test.go:310
FunctionTestDecoderOptions
(t *testing.T)
internal/decoder/decoder_test.go:704
FunctionTestDecodingToInterface
(t *testing.T)
reader_test.go:252
FunctionTestDecodingToNonPointer
(t *testing.T)
reader_test.go:964
FunctionTestDecodingUint16IntoInt
(t *testing.T)
reader_test.go:664
FunctionTestDouble
(t *testing.T)
internal/decoder/reflection_test.go:26
FunctionTestEmbeddedPointerSupport
TestEmbeddedPointerSupport tests support for embedded pointer types.
internal/decoder/field_precedence_test.go:78
FunctionTestEmbeddedStructAsInterface
(t *testing.T)
reader_test.go:459
FunctionTestFallbackToReflection
TestFallbackToReflection verifies that types without UnmarshalMaxMindDB still work.
reader_test.go:1500
FunctionTestFastDecodePointerFieldDoesNotAllocateOnTypeError
(t *testing.T)
internal/decoder/reflection_test.go:162
FunctionTestFastPathPreservesUnmarshalerForNamedTypes
TestFastPathPreservesUnmarshalerForNamedTypes guards every fast-path kind against a regression where decodeStruct's isFastType short-circuit runs befo
internal/decoder/nested_unmarshaler_test.go:487
FunctionTestFieldCaching
TestFieldCaching tests the field caching mechanism works with new precedence rules.
internal/decoder/field_precedence_test.go:104
FunctionTestFieldPrecedenceRules
TestFieldPrecedenceRules tests json/v2 style field precedence behavior.
internal/decoder/field_precedence_test.go:13
FunctionTestFloat
(t *testing.T)
internal/decoder/reflection_test.go:40
FunctionTestGeoIPNetworksWithin
(t *testing.T)
traverse_test.go:365
FunctionTestInt32
(t *testing.T)
internal/decoder/reflection_test.go:55
FunctionTestIntegerOverflowProtection
(t *testing.T)
reader_test.go:1546
FunctionTestInvalidNodeCountDatabase
(t *testing.T)
reader_test.go:945
FunctionTestIpv6inIpv4
(t *testing.T)
reader_test.go:677
FunctionTestIsEmptyValueAtFollowsPointers
(t *testing.T)
internal/decoder/reflection_test.go:190
FunctionTestIsEmptyValueAtRejectsPointerCycle
(t *testing.T)
internal/decoder/reflection_test.go:201
FunctionTestKind_Classification
(t *testing.T)
internal/decoder/kind_test.go:102
FunctionTestKind_IsContainer
(t *testing.T)
internal/decoder/kind_test.go:42
FunctionTestKind_IsScalar
(t *testing.T)
internal/decoder/kind_test.go:70
FunctionTestKind_String
(t *testing.T)
internal/decoder/kind_test.go:10
FunctionTestLookupIPv4OnlyDB
TestLookupIPv4OnlyDB exercises the IPv4 specialized walks against IPv4-only databases (ipv4StartBitDepth=96, ipv4Start=0). The mixed-DB parity test gu
reader_test.go:807
FunctionTestLookupIPv4VsIPv6Mixed
TestLookupIPv4VsIPv6Mixed guards the specialized IPv4 tree walks in traverseTree24, traverseTree28, and traverseTree32 against drift from the generic
reader_test.go:732
FunctionTestLookupNetwork
(t *testing.T)
reader_test.go:106
FunctionTestLookupRejectsDataPointersOutsideDataSection
(t *testing.T)
reader_data_pointer_test.go:12
FunctionTestMap
(t *testing.T)
internal/decoder/reflection_test.go:212
FunctionTestMetadataBuildTime
(t *testing.T)
reader_test.go:1522
FunctionTestMetadataPointer
(t *testing.T)
reader_test.go:263
FunctionTestMissingDatabase
(t *testing.T)
reader_test.go:952
FunctionTestNegativeInt32DoesNotDecodeIntoUint
(t *testing.T)
internal/decoder/reflection_test.go:73
FunctionTestNestedMapDecode
See GitHub #115.
reader_test.go:561
FunctionTestNestedOffsetDecode
(t *testing.T)
reader_test.go:621
FunctionTestNestedUnmarshaler
TestNestedUnmarshaler tests that UnmarshalMaxMindDB is called for nested struct fields.
internal/decoder/nested_unmarshaler_test.go:27
FunctionTestNestedUnmarshalerInMap
TestNestedUnmarshalerInMap tests UnmarshalMaxMindDB for map values.
internal/decoder/nested_unmarshaler_test.go:256
FunctionTestNestedUnmarshalerInSlice
TestNestedUnmarshalerInSlice tests UnmarshalMaxMindDB for slice elements.
internal/decoder/nested_unmarshaler_test.go:197
FunctionTestNestedUnmarshalerPointer
TestNestedUnmarshalerPointer tests UnmarshalMaxMindDB with pointer fields.
internal/decoder/nested_unmarshaler_test.go:142
FunctionTestNetworks
(t *testing.T)
traverse_test.go:16
FunctionTestNetworksWithInvalidSearchTree
(t *testing.T)
traverse_test.go:42
FunctionTestNetworksWithin
(t *testing.T)
traverse_test.go:302
FunctionTestNetworksWithinInvalidPrefix
(t *testing.T)
reader_test.go:1619
← previousnext →201–300 of 386, ranked by callers