mimeinfo

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2023 License: Apache-2.0 Imports: 19 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(ls *persist.LoadSaver) core.Identifier

func New

func New(opts ...config.Option) (core.Identifier, error)

Types

type Big16

type Big16 uint16

func (Big16) Equals

func (n Big16) Equals(pat patterns.Pattern) bool

Equals reports whether a pattern is identical to another pattern.

func (Big16) Length

func (n Big16) Length() (int, int)

Length returns a minimum and maximum length for the pattern.

func (Big16) NumSequences

func (n Big16) NumSequences() int

NumSequences reports how many plain sequences are needed to represent this pattern.

func (Big16) Save

func (n Big16) Save(ls *persist.LoadSaver)

Save persists the pattern.

func (Big16) Sequences

func (n Big16) Sequences() []patterns.Sequence

Sequences converts the pattern into a slice of plain sequences.

func (Big16) String

func (n Big16) String() string

func (Big16) Test

func (n Big16) Test(b []byte) ([]int, int)

Test bytes against the pattern.

func (Big16) TestR

func (n Big16) TestR(b []byte) ([]int, int)

Test bytes against the pattern in reverse.

type Big32

type Big32 uint32

func (Big32) Equals

func (n Big32) Equals(pat patterns.Pattern) bool

Equals reports whether a pattern is identical to another pattern.

func (Big32) Length

func (n Big32) Length() (int, int)

Length returns a minimum and maximum length for the pattern.

func (Big32) NumSequences

func (n Big32) NumSequences() int

NumSequences reports how many plain sequences are needed to represent this pattern.

func (Big32) Save

func (n Big32) Save(ls *persist.LoadSaver)

Save persists the pattern.

func (Big32) Sequences

func (n Big32) Sequences() []patterns.Sequence

Sequences converts the pattern into a slice of plain sequences.

func (Big32) String

func (n Big32) String() string

func (Big32) Test

func (n Big32) Test(b []byte) ([]int, int)

Test bytes against the pattern.

func (Big32) TestR

func (n Big32) TestR(b []byte) ([]int, int)

Test bytes against the pattern in reverse.

type Host16

type Host16 uint16

func (Host16) Equals

func (n Host16) Equals(pat patterns.Pattern) bool

Equals reports whether a pattern is identical to another pattern.

func (Host16) Length

func (n Host16) Length() (int, int)

Length returns a minimum and maximum length for the pattern.

func (Host16) NumSequences

func (n Host16) NumSequences() int

NumSequences reports how many plain sequences are needed to represent this pattern.

func (Host16) Save

func (n Host16) Save(ls *persist.LoadSaver)

Save persists the pattern.

func (Host16) Sequences

func (n Host16) Sequences() []patterns.Sequence

Sequences converts the pattern into a slice of plain sequences.

func (Host16) String

func (n Host16) String() string

func (Host16) Test

func (n Host16) Test(b []byte) ([]int, int)

Test bytes against the pattern.

func (Host16) TestR

func (n Host16) TestR(b []byte) ([]int, int)

Test bytes against the pattern in reverse.

type Host32

type Host32 uint32

func (Host32) Equals

func (n Host32) Equals(pat patterns.Pattern) bool

Equals reports whether a pattern is identical to another pattern.

func (Host32) Length

func (n Host32) Length() (int, int)

Length returns a minimum and maximum length for the pattern.

func (Host32) NumSequences

func (n Host32) NumSequences() int

NumSequences reports how many plain sequences are needed to represent this pattern.

func (Host32) Save

func (n Host32) Save(ls *persist.LoadSaver)

Save persists the pattern.

func (Host32) Sequences

func (n Host32) Sequences() []patterns.Sequence

Sequences converts the pattern into a slice of plain sequences.

func (Host32) String

func (n Host32) String() string

func (Host32) Test

func (n Host32) Test(b []byte) ([]int, int)

Test bytes against the pattern.

func (Host32) TestR

func (n Host32) TestR(b []byte) ([]int, int)

Test bytes against the pattern in reverse.

type Identification

type Identification struct {
	Namespace string
	ID        string
	Name      string
	Basis     []string
	Warning   string
	// contains filtered or unexported fields
}

func (Identification) Archive

func (id Identification) Archive() config.Archive

func (Identification) Known

func (id Identification) Known() bool

func (Identification) String

func (id Identification) String() string

func (Identification) Values added in v1.7.1

func (id Identification) Values() []string

func (Identification) Warn

func (id Identification) Warn() string

type Identifier

type Identifier struct {
	*identifier.Base
	// contains filtered or unexported fields
}

func (*Identifier) Fields

func (i *Identifier) Fields() []string

func (*Identifier) Recorder

func (i *Identifier) Recorder() core.Recorder

func (*Identifier) Save

func (i *Identifier) Save(ls *persist.LoadSaver)

type IgnoreCase

type IgnoreCase []byte

func (IgnoreCase) Equals

func (c IgnoreCase) Equals(pat patterns.Pattern) bool

Equals reports whether a pattern is identical to another pattern.

func (IgnoreCase) Length

func (c IgnoreCase) Length() (int, int)

Length returns a minimum and maximum length for the pattern.

func (IgnoreCase) NumSequences

func (c IgnoreCase) NumSequences() int

NumSequences reports how many plain sequences are needed to represent this pattern.

func (IgnoreCase) Save

func (c IgnoreCase) Save(ls *persist.LoadSaver)

Save persists the pattern.

func (IgnoreCase) Sequences

func (c IgnoreCase) Sequences() []patterns.Sequence

Sequences converts the pattern into a slice of plain sequences.

func (IgnoreCase) String

func (c IgnoreCase) String() string

func (IgnoreCase) Test

func (c IgnoreCase) Test(b []byte) ([]int, int)

func (IgnoreCase) TestR

func (c IgnoreCase) TestR(b []byte) ([]int, int)

type Int8

type Int8 byte

func (Int8) Equals

func (n Int8) Equals(pat patterns.Pattern) bool

Equals reports whether a pattern is identical to another pattern.

func (Int8) Length

func (n Int8) Length() (int, int)

Length returns a minimum and maximum length for the pattern.

func (Int8) NumSequences

func (n Int8) NumSequences() int

NumSequences reports how many plain sequences are needed to represent this pattern.

func (Int8) Save

func (n Int8) Save(ls *persist.LoadSaver)

Save persists the pattern.

func (Int8) Sequences

func (n Int8) Sequences() []patterns.Sequence

Sequences converts the pattern into a slice of plain sequences.

func (Int8) String

func (n Int8) String() string

func (Int8) Test

func (n Int8) Test(b []byte) ([]int, int)

Test bytes against the pattern.

func (Int8) TestR

func (n Int8) TestR(b []byte) ([]int, int)

Test bytes against the pattern in reverse.

type Little16

type Little16 uint16

func (Little16) Equals

func (n Little16) Equals(pat patterns.Pattern) bool

Equals reports whether a pattern is identical to another pattern.

func (Little16) Length

func (n Little16) Length() (int, int)

Length returns a minimum and maximum length for the pattern.

func (Little16) NumSequences

func (n Little16) NumSequences() int

NumSequences reports how many plain sequences are needed to represent this pattern.

func (Little16) Save

func (n Little16) Save(ls *persist.LoadSaver)

Save persists the pattern.

func (Little16) Sequences

func (n Little16) Sequences() []patterns.Sequence

Sequences converts the pattern into a slice of plain sequences.

func (Little16) String

func (n Little16) String() string

func (Little16) Test

func (n Little16) Test(b []byte) ([]int, int)

Test bytes against the pattern.

func (Little16) TestR

func (n Little16) TestR(b []byte) ([]int, int)

Test bytes against the pattern in reverse.

type Little32

type Little32 uint32

func (Little32) Equals

func (n Little32) Equals(pat patterns.Pattern) bool

Equals reports whether a pattern is identical to another pattern.

func (Little32) Length

func (n Little32) Length() (int, int)

Length returns a minimum and maximum length for the pattern.

func (Little32) NumSequences

func (n Little32) NumSequences() int

NumSequences reports how many plain sequences are needed to represent this pattern.

func (Little32) Save

func (n Little32) Save(ls *persist.LoadSaver)

Save persists the pattern.

func (Little32) Sequences

func (n Little32) Sequences() []patterns.Sequence

Sequences converts the pattern into a slice of plain sequences.

func (Little32) String

func (n Little32) String() string

func (Little32) Test

func (n Little32) Test(b []byte) ([]int, int)

Test bytes against the pattern.

func (Little32) TestR

func (n Little32) TestR(b []byte) ([]int, int)

Test bytes against the pattern in reverse.

type Mask

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

func (Mask) Equals

func (m Mask) Equals(pat patterns.Pattern) bool

Equals reports whether a pattern is identical to another pattern.

func (Mask) Length

func (m Mask) Length() (int, int)

Length returns a minimum and maximum length for the pattern.

func (Mask) NumSequences

func (m Mask) NumSequences() int

NumSequences reports how many plain sequences are needed to represent this pattern.

func (Mask) Save

func (m Mask) Save(ls *persist.LoadSaver)

Save persists the pattern.

func (Mask) Sequences

func (m Mask) Sequences() []patterns.Sequence

Sequences converts the pattern into a slice of plain sequences.

func (Mask) String

func (m Mask) String() string

func (Mask) Test

func (m Mask) Test(b []byte) ([]int, int)

func (Mask) TestR

func (m Mask) TestR(b []byte) ([]int, int)

type Recorder

type Recorder struct {
	*Identifier
	// contains filtered or unexported fields
}

func (*Recorder) Active

func (r *Recorder) Active(m core.MatcherType)

func (*Recorder) Record

func (r *Recorder) Record(m core.MatcherType, res core.Result) bool

func (*Recorder) Report

func (r *Recorder) Report() []core.Identification

func (*Recorder) Satisfied

func (r *Recorder) Satisfied(mt core.MatcherType) (bool, core.Hint)

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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