classifier

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: ISC Imports: 4 Imported by: 0

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