Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/maxmind/mmdbwriter
/ functions
Functions
172 in github.com/maxmind/mmdbwriter
⨍
Functions
172
◇
Types & classes
38
↓ 28 callers
Method
Equal
(DataType)
mmdbtype/types.go:50
↓ 21 callers
Method
WriteByte
(byte)
mmdbtype/types.go:42
↓ 20 callers
Function
s2ip
(v string)
tree_test.go:842
↓ 15 callers
Method
WriteTo
(writer)
mmdbtype/types.go:53
↓ 13 callers
Function
validateEncoding
(t *testing.T, tests map[string]DataType)
mmdbtype/types_test.go:451
↓ 12 callers
Function
writeCtrlByte
(w writer, t DataType)
mmdbtype/types.go:875
↓ 10 callers
Method
UnmarshalMaxMindDB
UnmarshalMaxMindDB implements the mmdbdata.Unmarshaler interface.
mmdbtype/types.go:568
↓ 7 callers
Method
Insert
Insert a data value into the tree using the Tree's inserter function (defaults to inserter.ReplaceWith). This is not safe to call from multiple threa
tree.go:243
↓ 6 callers
Method
Get
Get the value for the given IP address from the tree. If the nil interface is returned, that means the tree does not have a value for the IP.
tree.go:412
↓ 6 callers
Function
New
New creates a new Tree.
tree.go:114
↓ 5 callers
Method
Copy
()
mmdbtype/types.go:49
↓ 5 callers
Method
remove
remove removes a reference to the value. If the reference count drops to zero, the value is removed from the dataMap.
data_map.go:59
↓ 4 callers
Method
insert
( network *net.IPNet, recordType recordType, inserterFunc inserter.Func, node *node, )
tree.go:269
↓ 4 callers
Function
newDataMap
(keyWriter KeyGenerator)
data_map.go:26
↓ 4 callers
Function
newDataWriter
(dataMap *dataMap, usePointers bool)
data_section.go:25
↓ 4 callers
Function
newKeyWriter
()
data_key.go:39
↓ 4 callers
Method
store
store stores the value in the dataMap and returns the dataMapValue for it. If the value is already in the dataMap, the reference count for it is incre
data_map.go:36
↓ 3 callers
Method
InsertFunc
InsertFunc will insert the output of the function passed to it. The argument passed to the function is the existing value in the record. The inserter
tree.go:262
↓ 3 callers
Method
Result
Result returns the final unmarshaled value.
mmdbtype/unmarshaler.go:50
↓ 3 callers
Method
WriteOrWritePointer
(DataType)
mmdbtype/types.go:44
↓ 3 callers
Function
decodeDataTypeValue
decodeDataTypeValue decodes a value from the decoder and returns the appropriate DataType. If cache is provided (non-nil), it will check for cached va
mmdbtype/types.go:969
↓ 3 callers
Method
insert
(iRec insertRecord, currentDepth int)
node.go:45
↓ 3 callers
Method
maybeWrite
(value *dataMapValue)
data_section.go:35
↓ 3 callers
Method
unmarshalMaxMindDB
unmarshalMaxMindDB is the internal implementation that supports caching.
mmdbtype/types.go:573
↓ 2 callers
Method
Clear
Clear resets the unmarshaler state for reuse.
mmdbtype/unmarshaler.go:45
↓ 2 callers
Method
InsertRange
InsertRange is the same as Insert, except it will insert all subnets within the range of IPs specified by `[start,end]`.
tree.go:302
↓ 2 callers
Method
Key
(mmdbtype.DataType)
data_key.go:25
↓ 2 callers
Function
Load
Load an existing database into the writer.
tree.go:182
↓ 2 callers
Function
NewUnmarshaler
NewUnmarshaler creates a new Unmarshaler with caching enabled for converting MMDB data to mmdbtype values. The cache improves performance when loading
mmdbtype/unmarshaler.go:27
↓ 2 callers
Method
WriteTo
WriteTo writes the value to w.
mmdbtype/types.go:373
↓ 2 callers
Method
WrittenSize
WrittenSize is the actual total size of the pointer in the database data section.
mmdbtype/types.go:442
↓ 2 callers
Function
bitAt
(ip net.IP, depth int)
node.go:203
↓ 2 callers
Function
checkMMDB
(t *testing.T, buf *bytes.Buffer, gets []testGet, name string)
tree_test.go:733
↓ 2 callers
Method
finalize
finalize prepares the tree for writing. It is not threadsafe.
tree.go:450
↓ 2 callers
Method
insertStringNetwork
( network string, recordType recordType, inserterFunc inserter.Func, node *node, )
tree.go:350
↓ 2 callers
Function
ipV4ToV6
(ip net.IP)
tree.go:633
↓ 2 callers
Method
maybeMergeChildren
(iRec insertRecord)
node.go:139
↓ 2 callers
Method
recordValue
( r record, dataWriter *dataWriter, )
tree.go:564
↓ 2 callers
Method
size
()
mmdbtype/types.go:51
↓ 2 callers
Method
size
()
mmdbtype/types.go:427
↓ 1 callers
Function
DeepMergeWith
DeepMergeWith creates an inserter that will recursively update an existing value. Map and Slice values will be merged recursively. Other values will b
inserter/inserter.go:74
↓ 1 callers
Method
Equal
Equal checks for equality.
mmdbtype/types.go:314
↓ 1 callers
Method
InsertRangeFunc
InsertRangeFunc is the same as InsertFunc, except it will insert all subnets within the range of IPs specified by `[start,end]`.
tree.go:312
↓ 1 callers
Function
Remove
Remove any records for the network being inserted.
inserter/inserter.go:21
↓ 1 callers
Function
ReplaceWith
ReplaceWith generates an inserter function that replaces the existing value with the new value.
inserter/inserter.go:27
↓ 1 callers
Function
TopLevelMergeWith
TopLevelMergeWith creates an inserter for Map values that will update an existing Map by adding the top-level keys and values from the new Map, replac
inserter/inserter.go:39
↓ 1 callers
Method
UnmarshalMaxMindDB
UnmarshalMaxMindDB implements the mmdbdata.Unmarshaler interface.
mmdbtype/unmarshaler.go:34
↓ 1 callers
Method
WriteString
(string)
mmdbtype/types.go:43
↓ 1 callers
Method
copyNode
(buf []byte, n *node, dataWriter *dataWriter)
tree.go:579
↓ 1 callers
Function
deepMerge
(existingValue, newValue mmdbtype.DataType)
inserter/inserter.go:80
↓ 1 callers
Method
get
( ip net.IP, depth int, )
node.go:169
↓ 1 callers
Method
insertIPv4Aliases
()
tree.go:370
↓ 1 callers
Method
insertRange
( start net.IP, end net.IP, recordType recordType, inserterFunc inserter.Func, node *node, )
tree.go:320
↓ 1 callers
Method
insertReservedNetworks
()
tree.go:394
↓ 1 callers
Function
isCacheableKind
isCacheableKind returns true if the given kind is worth caching. Currently, we have primarily found a benefit with containers, not scalar values. Pote
mmdbtype/types.go:961
↓ 1 callers
Function
makeTestStrings
()
mmdbtype/types_test.go:117
↓ 1 callers
Function
newAliasedNetworkError
(netIP net.IP, curPrefixLen, recPrefixLen int)
errors.go:20
↓ 1 callers
Function
newReservedNetworkError
(netIP net.IP, curPrefixLen, recPrefixLen int)
errors.go:81
↓ 1 callers
Method
size
()
mmdbtype/types.go:168
↓ 1 callers
Method
size
()
mmdbtype/types.go:214
↓ 1 callers
Method
size
()
mmdbtype/types.go:260
↓ 1 callers
Method
size
()
mmdbtype/types.go:673
↓ 1 callers
Method
size
()
mmdbtype/types.go:723
↓ 1 callers
Method
size
()
mmdbtype/types.go:773
↓ 1 callers
Method
typeNum
()
mmdbtype/types.go:52
↓ 1 callers
Method
unmarshalMaxMindDB
unmarshalMaxMindDB is the internal implementation that supports caching.
mmdbtype/types.go:350
↓ 1 callers
Method
writeMetadata
(dw *dataWriter)
tree.go:637
↓ 1 callers
Method
writeNode
( w io.Writer, n *node, dataWriter *dataWriter, recordBuf []byte, )
tree.go:524
Method
Copy
Copy the value.
mmdbtype/types.go:62
Method
Copy
Copy the value.
mmdbtype/types.go:102
Method
Copy
Copy the value.
mmdbtype/types.go:160
Method
Copy
Copy the value.
mmdbtype/types.go:206
Method
Copy
Copy the value.
mmdbtype/types.go:252
Method
Copy
Copy makes a deep copy of the Map.
mmdbtype/types.go:305
Method
Copy
Copy the value.
mmdbtype/types.go:413
Method
Copy
Copy makes a deep copy of the Slice.
mmdbtype/types.go:528
Method
Copy
Copy the value.
mmdbtype/types.go:618
Method
Copy
Copy the value.
mmdbtype/types.go:665
Method
Copy
Copy the value.
mmdbtype/types.go:721
Method
Copy
Copy the value.
mmdbtype/types.go:765
Method
Copy
Copy make a deep copy of the Uint128.
mmdbtype/types.go:816
Method
Equal
Equal checks for equality.
mmdbtype/types.go:65
Method
Equal
Equal checks for equality.
mmdbtype/types.go:109
Method
Equal
Equal checks for equality.
mmdbtype/types.go:163
Method
Equal
Equal checks for equality.
mmdbtype/types.go:209
Method
Equal
Equal checks for equality.
mmdbtype/types.go:255
Method
Equal
Equal checks for equality.
mmdbtype/types.go:416
Method
Equal
Equal checks for equality.
mmdbtype/types.go:537
Method
Equal
Equal checks for equality.
mmdbtype/types.go:621
Method
Equal
Equal checks for equality.
mmdbtype/types.go:668
Method
Equal
Equal checks for equality.
mmdbtype/types.go:715
Method
Equal
Equal checks for equality.
mmdbtype/types.go:768
Method
Equal
Equal checks for equality.
mmdbtype/types.go:824
Method
Error
()
errors.go:60
Method
Error
()
errors.go:128
Method
Key
Key generates a unique key for the data structure v. This is just a quick hack. I am sure there is something better.
data_key.go:47
Function
TestBool
The tests in this file were mostly taken from https://github.com/oschwald/maxminddb-golang/blob/master/decoder_test.go
mmdbtype/types_test.go:17
Function
TestByte
(t *testing.T)
mmdbtype/types_test.go:147
Function
TestDataMap
(t *testing.T)
data_map_test.go:12
Function
TestDeepMergeWith
(t *testing.T)
inserter/inserter_test.go:95
next →
1–100 of 172, ranked by callers