flags

package
v1.99.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BagName = "evidence"
)
View Source
const (
	BagUrlLogstash = "http://localhost:8080"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BagMode

type BagMode string
const (
	BagModeNone   BagMode = "none"
	BagModeText   BagMode = "text"
	BagModeJson   BagMode = "json"
	BagModeJsonl  BagMode = "jsonl"
	BagModeXml    BagMode = "xml"
	BagModeSqlite BagMode = "sqlite"
)

func (*BagMode) Set

func (bm *BagMode) Set(v string) error

func (*BagMode) String

func (bm *BagMode) String() string

func (*BagMode) Type

func (bm *BagMode) Type() string

type Filters

type Filters struct {
	Patterns []string // patterns
	Context  int      // lines context
	Before   int      // lines before
	After    int      // lines after
}

func (*Filters) Pop

func (f *Filters) Pop()

Pop global filter

func (*Filters) Set

func (f *Filters) Set(p string) error

Set global filter

func (*Filters) String

func (f *Filters) String() string

func (*Filters) Type

func (f *Filters) Type() string

type Flags

type Flags struct {
	Print  bool
	NoFile bool
	NoLine bool

	Hex bool

	Limits  Limits
	Filters Filters

	// evidence bag
	Bag struct {
		Mode BagMode
		Path string
		Sign string
		Url  string
		No   bool
	}

	// optional flags
	Opt struct {
		Raw       bool
		Readonly  bool
		NoConvert bool
		NoDeflate bool
		NoPlugins bool
	}

	// ai flags
	AI struct {
		Model string
		Query string
	}

	// ui flags
	UI struct {
		Theme string
		State string
		Mode  mode.Mode
	}

	// alias flags
	Alias struct {
		Logstash bool
		Text     bool
		Json     bool
		Jsonl    bool
		Sqlite   bool
		Xml      bool
	}

	// deflate command
	Deflate struct {
		Path string
		Pass string
	}

	// entropy command
	Entropy struct {
		Min float64
		Max float64
	}

	// hash command
	Hash struct {
		Algo HashAlgo
	}

	// strings command
	Strings struct {
		Ascii bool
		Min   int
		Max   int
	}

	Credits bool
}

func Get

func Get() *Flags

type HashAlgo

type HashAlgo string

func (*HashAlgo) Set

func (ha *HashAlgo) Set(v string) error

func (*HashAlgo) String

func (ha *HashAlgo) String() string

func (*HashAlgo) Type

func (ha *HashAlgo) Type() string

type Limits

type Limits struct {
	IsHead bool // is head limit
	IsTail bool // is tail limit
	Lines  int  // lines count
	Bytes  int  // bytes count
}

func (*Limits) ReduceMMap

func (l *Limits) ReduceMMap(m *mmap.MMap) *mmap.MMap

func (*Limits) ReduceSMap

func (l *Limits) ReduceSMap(s *smap.SMap) *smap.SMap

Jump to

Keyboard shortcuts

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