Documentation ¶
Index ¶
- Constants
- Variables
- func AppendCSVRecord(f CmdImportFlags, dataColStart int, delim rune, parts []string, ...) error
- func CmdDiff(f CmdDiffFlags, args []string, printHelp func()) error
- func CmdExport(f CmdExportFlags, args []string, printHelp func()) error
- func CmdImport(f CmdImportFlags, args []string, printHelp func()) error
- func CmdMetadata(f CmdMetadataFlags, args []string, printHelp func()) error
- func CmdRead(f CmdReadFlags, args []string, printHelp func()) error
- func CmdVerify(f CmdVerifyFlags, args []string, printHelp func()) error
- func ConvertToMMDBType(value interface{}) (mmdbtype.DataType, error)
- func ParseCSVHeaders(parts []string, f *CmdImportFlags, dataColStart *int)
- func ParseJSONKeys(result map[string]interface{}, f *CmdImportFlags)
- func Preprocess(f CmdImportFlags, tree *mmdbwriter.Tree) error
- func ProcessJsonData(data map[string]interface{}, f CmdImportFlags, subMap *mmdbtype.Map) error
- type CmdDiffFlags
- type CmdExportFlags
- type CmdImportFlags
- type CmdMetadataFlags
- type CmdReadFlags
- type CmdVerifyFlags
- type TsvReader
- type TsvWriter
- type TypeSizes
Constants ¶
const (
MetadataStartMarker = "\xAB\xCD\xEFMaxMind.com"
)
Variables ¶
var CmdImportFlagsDefaults = CmdImportFlags{ Help: false, In: "", Out: "", Csv: false, Tsv: false, Json: false, Fields: nil, FieldsFromHdr: false, RangeMultiCol: false, JoinKeyCol: false, NoFields: false, NoNetwork: false, Ip: 6, Size: 32, Merge: "none", IgnoreEmptyVals: false, DisallowReserved: false, Alias6to4: false, DisableMetadataPtrs: true, }
Functions ¶
func AppendCSVRecord ¶
func AppendCSVRecord(f CmdImportFlags, dataColStart int, delim rune, parts []string, tree *mmdbwriter.Tree) error
func CmdDiff ¶
func CmdDiff(f CmdDiffFlags, args []string, printHelp func()) error
func CmdExport ¶
func CmdExport(f CmdExportFlags, args []string, printHelp func()) error
func CmdImport ¶
func CmdImport(f CmdImportFlags, args []string, printHelp func()) error
func CmdMetadata ¶
func CmdMetadata(f CmdMetadataFlags, args []string, printHelp func()) error
func CmdRead ¶
func CmdRead(f CmdReadFlags, args []string, printHelp func()) error
func CmdVerify ¶
func CmdVerify(f CmdVerifyFlags, args []string, printHelp func()) error
func ConvertToMMDBType ¶
func ParseCSVHeaders ¶
func ParseCSVHeaders(parts []string, f *CmdImportFlags, dataColStart *int)
func ParseJSONKeys ¶
func ParseJSONKeys(result map[string]interface{}, f *CmdImportFlags)
func Preprocess ¶
func Preprocess(f CmdImportFlags, tree *mmdbwriter.Tree) error
func ProcessJsonData ¶
func ProcessJsonData( data map[string]interface{}, f CmdImportFlags, subMap *mmdbtype.Map, ) error
Types ¶
type CmdDiffFlags ¶
CmdDiffFlags are flags expected by CmdDiff.
func (*CmdDiffFlags) Init ¶
func (f *CmdDiffFlags) Init()
Init initializes the common flags available to CmdDiff with sensible defaults.
pflag.Parse() must be called to actually use the final flag values.
type CmdExportFlags ¶
CmdExportFlags are flags expected by CmdExport.
func (*CmdExportFlags) Init ¶
func (f *CmdExportFlags) Init()
Init initializes the common flags available to CmdExport with sensible defaults.
pflag.Parse() must be called to actually use the final flag values.
type CmdImportFlags ¶
type CmdImportFlags struct { Help bool In string Out string Csv bool Tsv bool Json bool Fields []string FieldsFromHdr bool RangeMultiCol bool JoinKeyCol bool NoFields bool NoNetwork bool Ip int Size int Merge string IgnoreEmptyVals bool DisallowReserved bool Alias6to4 bool DisableMetadataPtrs bool }
CmdImportFlags are flags expected by CmdImport.
func (*CmdImportFlags) Init ¶
func (f *CmdImportFlags) Init()
Init initializes the common flags available to CmdImport with sensible defaults.
pflag.Parse() must be called to actually use the final flag values.
type CmdMetadataFlags ¶
CmdMetadataFlags are flags expected by CmdMetadata.
func (*CmdMetadataFlags) Init ¶
func (f *CmdMetadataFlags) Init()
Init initializes the common flags available to CmdMetadata with sensible defaults.
pflag.Parse() must be called to actually use the final flag values.
type CmdReadFlags ¶
CmdReadFlags are flags expected by CmdRead.
func (*CmdReadFlags) Init ¶
func (f *CmdReadFlags) Init()
Init initializes the common flags available to CmdRead with sensible defaults.
pflag.Parse() must be called to actually use the final flag values.
type CmdVerifyFlags ¶
type CmdVerifyFlags struct {
Help bool
}
CmdVerifyFlags are flags expected by CmdVerify.
func (*CmdVerifyFlags) Init ¶
func (f *CmdVerifyFlags) Init()
Init initializes the common flags available to CmdVerify with sensible defaults.
pflag.Parse() must be called to actually use the final flag values.
type TsvReader ¶
type TsvReader struct {
// contains filtered or unexported fields
}
func NewTsvReader ¶
type TsvWriter ¶
type TsvWriter struct {
// contains filtered or unexported fields
}
func NewTsvWriter ¶
type TypeSizes ¶
type TypeSizes struct { PointerSize int64 `json:"pointer_size"` Utf8StringSize int64 `json:"utf8_string_size"` DoubleSize int64 `json:"double_size"` BytesSize int64 `json:"bytes_size"` Unsigned16bitIntSize int64 `json:"unsigned_16bit_int_size"` Unsigned32bitIntSize int64 `json:"unsigned_32bit_int_size"` Signed32bitIntSize int64 `json:"signed_32bit_int_size"` Unsigned64bitIntSize int64 `json:"unsigned_64bit_int_size"` Unsigned128bitIntSize int64 `json:"unsigned_128bit_int_size"` MapKeyValueCount int64 `json:"map_key_value_pair_count"` ArrayLength int64 `json:"array_length"` FloatSize int64 `json:"float_size"` }