classifier

package
v1.1.15 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: ISC Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const VERSION string = "0.6.0"

Variables

This section is empty.

Functions

func Register

func Register(name string, backend func() Backend) error

Types

type Backend

type Backend interface {
	Processor(backend Backend, pathname string) ProcessorBackend
	Close() error
}

type Classification

type Classification struct {
	Analyzer string
	Classes  []string
}

type Classifier

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

func NewClassifier

func NewClassifier(ctx *kcontext.KContext) (*Classifier, error)

func (*Classifier) Close

func (cf *Classifier) Close() error

func (*Classifier) Processor

func (cf *Classifier) Processor(pathname string) *Processor

type Processor

type Processor struct {
	Pathname string
	// contains filtered or unexported fields
}

func (*Processor) Directory

func (p *Processor) Directory(dirEntry *vfs.Entry) []Classification

func (*Processor) File

func (p *Processor) File(fileEntry *vfs.Entry) []Classification

func (*Processor) Finalize

func (p *Processor) Finalize() []Classification

func (*Processor) Write

func (p *Processor) Write(buf []byte)

type ProcessorBackend

type ProcessorBackend interface {
	Name() string
	File(fileEntry *vfs.Entry) []string
	Directory(dirEntry *vfs.Entry) []string
	Write(buf []byte) bool
	Finalize() []string
}

Jump to

Keyboard shortcuts

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