Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type StandardDumper ¶
type StandardDumper struct { format.Reader format.Writer // contains filtered or unexported fields }
StandardDumper serves as a standard mechanism to transfer IP database from one format to another.
func NewStandardDumper ¶
func NewStandardDumper(r format.Reader, w format.Writer) *StandardDumper
NewStandardDumper initializes and returns a new StandardDumper.
func (*StandardDumper) Dump ¶
func (d *StandardDumper) Dump() error
Dump transfers IP data from the Reader to the Writer.
func (*StandardDumper) Next ¶
func (d *StandardDumper) Next() bool
Next fetches the next IP information from the Reader.
type StandardReader ¶
type StandardReader struct { DBReader format.Reader OperateChain *operate.IPOperateChain // contains filtered or unexported fields }
StandardReader is a Reader designed for IP databases. Unlike the Reader in the format package, this reader processes the IP information it reads, such as filtering fields, rewriting data, supplementing data, etc., controlled by operate.IPOperateChain.
func NewStandardReader ¶
func NewStandardReader(dbReader format.Reader, operateChain *operate.IPOperateChain) *StandardReader
NewStandardReader initializes and returns a new StandardReader.
func (*StandardReader) Meta ¶
func (s *StandardReader) Meta() *model.Meta
Meta returns the meta-information of the IP database.
func (*StandardReader) SetOption ¶
func (s *StandardReader) SetOption(option interface{}) error
SetOption configures the StandardReader with the provided option.