query

package
v0.2.1-0...-16b1ae3 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmptyT = TEmpty{}
View Source
var ExistsT = TExists{}
View Source
var FalseT = TFalse{}
View Source
var TrueT = TTrue{}

Functions

This section is empty.

Types

type Case

type Case int
const (
	CaseSensitive Case = iota
	CaseInsensitive
)

type Field

type Field string
const (
	FName    Field = "name"
	FExists  Field = "exists"
	FCclock  Field = "cclock"
	FOclock  Field = "oclock"
	FCtime   Field = "ctime"
	FCtimeMs Field = "ctime_ms"
	FCtimeUs Field = "ctime_us"
	FCtimeNs Field = "ctime_ns"
	FCtimeF  Field = "ctime_f"
	FMtime   Field = "mtime"
	FMtimeMs Field = "mtime_ms"
	FMtimeUs Field = "mtime_us"
	FMtimeNs Field = "mtime_ns"
	FMtimeF  Field = "mtime_f"
	FSize    Field = "size"
	FMode    Field = "mode"
	FUid     Field = "uid"
	FGid     Field = "gid"
	FIno     Field = "ino"
	FDev     Field = "dev"
	FNlink   Field = "nlink"
	FNew     Field = "new"
	FType    Field = "type"

	FSymlinkTarget  Field = "symlink_target"
	FContentSha1hex Field = "content.sha1hex"
)

type Fields

type Fields []Field

type GPathPath

type GPathPath struct {
	Path  string
	Depth int
}

See https://facebook.github.io/watchman/docs/file-query#path-generator

func (GPathPath) MarshalJSON

func (p GPathPath) MarshalJSON() ([]byte, error)

type Generators

type Generators map[Generator]any

type Query

type Query struct {
	Generators   Generators
	Expression   Term
	Fields       Fields
	DedupResults bool
	RelativeRoot string
	SyncTimeout  int
	LockTimeout  int
	Case         Case
}

func (Query) MarshalJSON

func (q Query) MarshalJSON() ([]byte, error)

type RelationalOp

type RelationalOp int

see https://facebook.github.io/watchman/docs/expr/size

const (
	RelLt RelationalOp = iota
	RelLe
	RelEq
	RelNe
	RelGt
	RelGe
)

func (RelationalOp) MarshalJSON

func (op RelationalOp) MarshalJSON() ([]byte, error)

type TAllof

type TAllof []Term

see https://facebook.github.io/watchman/docs/expr/allof

func (TAllof) MarshalJSON

func (t TAllof) MarshalJSON() ([]byte, error)

type TAnyof

type TAnyof []Term

see https://facebook.github.io/watchman/docs/expr/anyof

func (TAnyof) MarshalJSON

func (t TAnyof) MarshalJSON() ([]byte, error)

type TClockSource

type TClockSource int

see https://facebook.github.io/watchman/docs/expr/since

const (
	OClock TClockSource = iota
	CClock
	CTime
	MTime
)

type TDirname

type TDirname struct {
	Name  string
	Op    RelationalOp
	Depth int
}

see https://facebook.github.io/watchman/docs/expr/dirname

func (TDirname) MarshalJSON

func (t TDirname) MarshalJSON() ([]byte, error)

type TEmpty

type TEmpty struct{}

see https://facebook.github.io/watchman/docs/expr/empty

func (TEmpty) MarshalJSON

func (t TEmpty) MarshalJSON() ([]byte, error)

type TExists

type TExists struct{}

see https://facebook.github.io/watchman/docs/expr/exists

func (TExists) MarshalJSON

func (t TExists) MarshalJSON() ([]byte, error)

type TFalse

type TFalse struct{}

see https://facebook.github.io/watchman/docs/expr/false

func (TFalse) MarshalJSON

func (t TFalse) MarshalJSON() ([]byte, error)

type TFileType

type TFileType string

see https://facebook.github.io/watchman/docs/expr/type

const (
	TFileBlock       TFileType = "b"
	TFileChar        TFileType = "c"
	TFileDir         TFileType = "d"
	TFileRegular     TFileType = "f"
	TFileFIFO        TFileType = "p"
	TFileLink        TFileType = "l"
	TFileSocket      TFileType = "s"
	TFileSolarisDoor TFileType = "D"
	TFileUnknown     TFileType = "?"
)

func (TFileType) MarshalJSON

func (t TFileType) MarshalJSON() ([]byte, error)

type TIDirname

type TIDirname struct {
	Name  string
	Op    RelationalOp
	Depth int
}

see https://facebook.github.io/watchman/docs/expr/dirname

func (TIDirname) MarshalJSON

func (t TIDirname) MarshalJSON() ([]byte, error)

type TIMatch

type TIMatch struct {
	Glob      string
	MatchType TMatchType
	Flags     TMatchFlags
}

see https://facebook.github.io/watchman/docs/expr/match

func (TIMatch) MarshalJSON

func (t TIMatch) MarshalJSON() ([]byte, error)

type TIName

type TIName struct {
	Names     []string
	MatchType TMatchType
}

see https://facebook.github.io/watchman/docs/expr/name

func (TIName) MarshalJSON

func (t TIName) MarshalJSON() ([]byte, error)

type TIPCRE

type TIPCRE struct {
	Regexp    string
	MatchType TMatchType
}

see https://facebook.github.io/watchman/docs/expr/pcre

func (TIPCRE) MarshalJSON

func (t TIPCRE) MarshalJSON() ([]byte, error)

type TMatch

type TMatch struct {
	Glob      string
	MatchType TMatchType
	Flags     TMatchFlags
}

see https://facebook.github.io/watchman/docs/expr/match

func (TMatch) MarshalJSON

func (t TMatch) MarshalJSON() ([]byte, error)

type TMatchFlags

type TMatchFlags int
const (
	MatchIncludeDotFiles TMatchFlags = 1 << iota
	MatchNoEscape
)

type TMatchType

type TMatchType int

see https://facebook.github.io/watchman/docs/expr/match

const (
	MatchBaseName TMatchType = iota
	MatchWholeName
)

func (TMatchType) MarshalJSON

func (t TMatchType) MarshalJSON() ([]byte, error)

type TName

type TName struct {
	Names     []string
	MatchType TMatchType
}

see https://facebook.github.io/watchman/docs/expr/name

func (TName) MarshalJSON

func (t TName) MarshalJSON() ([]byte, error)

type TNot

type TNot struct {
	Not Term
}

func (TNot) MarshalJSON

func (t TNot) MarshalJSON() ([]byte, error)

type TPCRE

type TPCRE struct {
	Regexp    string
	MatchType TMatchType
}

see https://facebook.github.io/watchman/docs/expr/pcre

func (TPCRE) MarshalJSON

func (t TPCRE) MarshalJSON() ([]byte, error)

type TSince

type TSince struct {
	Timestamp any
	Source    TClockSource
}

see https://facebook.github.io/watchman/docs/expr/since

func (TSince) MarshalJSON

func (t TSince) MarshalJSON() ([]byte, error)

type TSize

type TSize struct {
	Op   RelationalOp
	Size int
}

see https://facebook.github.io/watchman/docs/expr/size

func (TSize) MarshalJSON

func (t TSize) MarshalJSON() ([]byte, error)

type TSuffix

type TSuffix []string

see https://facebook.github.io/watchman/docs/expr/suffix

func (TSuffix) MarshalJSON

func (t TSuffix) MarshalJSON() ([]byte, error)

type TTrue

type TTrue struct{}

see https://facebook.github.io/watchman/docs/expr/true

func (TTrue) MarshalJSON

func (t TTrue) MarshalJSON() ([]byte, error)

type Term

type Term json.Marshaler

Jump to

Keyboard shortcuts

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