model

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is the current version of the program
	Version string
	// CommitHash is the current commit hash of the program
	CommitHash string
	// BuildTime is the current build time of the program
	BuildTime string
)

Functions

This section is empty.

Types

type Compressor

type Compressor interface {
	Load(filePath string) chan net.IP
	Squeeze(ipChan chan net.IP) chan IPRange
	Serialize(ipRangeChan chan IPRange) chan []byte
	Store(filePath string, dataChan chan []byte)
}

type Decompressor

type Decompressor interface {
	Load(filePath string) chan []byte
	Unserialize(dataChan chan []byte) chan IPRange
	Expand(ipRangeChan chan IPRange) chan net.IP
	Store(filePath string, ipChan chan net.IP)
}

type IPRange

type IPRange struct {
	// contains filtered or unexported fields
}

func NewIPRange

func NewIPRange(from, to net.IP) IPRange

func (IPRange) Expand

func (i IPRange) Expand() chan net.IP

func (IPRange) Serialize

func (i IPRange) Serialize() []byte

func (IPRange) String

func (i IPRange) String() string

func (*IPRange) Unserialize

func (i *IPRange) Unserialize(data []byte) error

type Options

type Options struct {
	InputFile  string `short:"i" long:"input-file" description:"The input file" required:"true" default:"-"`
	OutputFile string `short:"o" long:"output-file" description:"The output file" required:"true" default:"-"`
	Version    bool   `short:"v" long:"version" description:"Version"`
}
var Opts Options

type ProgramVersion

type ProgramVersion struct {
	Version    string `json:"version"`
	CommitHash string `json:"commit_hash"`
	BuildTime  string `json:"build_time"`
}

ProgramVersion is the version object of the program

func (ProgramVersion) Short

func (v ProgramVersion) Short() string

Short returns the short version of the program

func (ProgramVersion) String

func (v ProgramVersion) String() string

String returns the verbose version of the program

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL