kovacs

package module
v0.0.0-...-e8c2b04 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2015 License: MIT Imports: 11 Imported by: 0

README

GoDoc

Documentation

Index

Constants

View Source
const (
	TimeFieldModified = "mtime"
	TimeFieldCreated  = "ctime"
)
View Source
const (
	TypeBlockSpecialFile     = "b"
	TypeCharacterSpecialFile = "c"
	TypeDirectory            = "d"
	TypeRegularFile          = "f"
	TypeNamedPipe            = "p"
	TypeSymbolicLink         = "l"
	TypeSocket               = "s"
	TypeSolarisDoor          = "D"
)

Variables

View Source
var (
	Wholename = ExpressionScope{"wholename"}
	Basename  = ExpressionScope{"basename"}

	CaseSensitive   = CaseSensitivity{true}
	CaseInsensitive = CaseSensitivity{false}
)

Functions

This section is empty.

Types

type CaseSensitivity

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

type Client

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

A Client manages a single socket connection to the watchman server. Connect must be called before any other method is used.

func NewClient

func NewClient(logHandler func(string)) *Client

NewClient returns a new Client. Connect must be called before any other client methods are used. An optional logHandler may be passed in to handle an watchman generated log messages.

func (*Client) Clock

func (c *Client) Clock(root string) (string, error)

Clock returns the watchman server clock time at the specified root for more info, see https://facebook.github.io/watchman/docs/cmd/clock.html

func (*Client) Close

func (c *Client) Close() error

Close shuts down the connection to the server

func (*Client) Connect

func (c *Client) Connect(addr string) error

Connect initializes the connection the watchman server. It assumes that watchman server is running locally and attempts a unix socket connection addr is the path to the watchman server socket location. If an empty string is provided, Client will attempty to infer the location from the env var WATCHMAN_SOCK and, if that fails, by shelling out a `watchman get-sockname` call

func (*Client) Find

func (c *Client) Find(dir string, patterns ...string) ([]File, string, error)

https://facebook.github.io/watchman/docs/cmd/find.html

func (*Client) Since

func (c *Client) Since(dir string, clock string, patterns ...string) ([]File, string, error)

https://facebook.github.io/watchman/docs/cmd/since.html

type Config

type Config struct {
	Settle               int        `json:"settle"`
	RootRestrictFiles    []string   `json:"root_restrict_files"`
	RootFiles            [][]string `json:"root_files"`
	EnforceRootFiles     bool       `json:"enforce_root_files"`
	IllegalFSTypes       []string   `json:"illegal_fstypes"`
	IllegalFSTypesAdvice string     `json:"illegal_fstypes_advice"`
	IgnoreVCS            []string   `json:"ignore_vcs"`
	IgnoreDirs           []string   `json:"ignore_dirs"`
	GCAgeSeconds         int        `json:"gc_age_seconds"`
	GCIntervalSeconds    int        `json:"gc_interval_seconds"`
	FSEventsLatency      float64    `json:"fsevents_latency"`
	IdleReapAgeSeconds   int        `json:"idle_reap_age_seconds"`
}

type Expression

type Expression interface {
	// contains filtered or unexported methods
}

func SinceTime

func SinceTime(t time.Time, tf string) Expression

type ExpressionScope

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

type File

type File struct {
	Name    string
	Exists  bool
	Cclock  string
	Oclock  string
	Mtime   int64
	MtimeMs int64
	MtimeUs int64
	MtimeNs int64
	MtimeF  float64
	Ctime   int64
	CtimeMs int64
	CtimeUs int64
	CtimeNs int64
	CtimeF  float64
	Size    int
	Mode    int
	Uid     int
	Gid     int
	Ino     int
	Dev     int
	Nlink   int
	New     bool
}

type Path

type Path struct {
	Path  string
	Depth int
}

type QueryOptions

type QueryOptions struct {
	Suffix               []string   `json:"suffix,omitempty"`
	Since                string     `json:"since,omitempty"`
	Expression           Expression `json:"expression,omitempty"`
	Fields               []string   `json:"fields,omitempty"`
	Path                 []Path     `json:"path,omitempty"`
	SyncTimeout          int        `json:"sync_timeout,omitempty"`
	EmptyOnFreshInstance bool       `json:"empty_on_fresh_instance,omitempty"`
	RelativeRoot         string     `json:"relative_root,omitempty"`
}

type StdinArray

type StdinArray []string

type StdinType

type StdinType interface {
	// contains filtered or unexported methods
}
var (
	StdinDevNull     StdinType = stdinString("/dev/null")
	StdinNamePerLine StdinType = stdinString("NAME_PER_LINE")
)

type SubscriptionEvent

type SubscriptionEvent struct {
	Version      string   `json:"version"`
	Clock        string   `json:"clock"`
	Files        []string `json:"files"`
	Root         string   `json:"root"`
	Subscription string   `json:"subscription"`
}

type SubscriptionOptions

type SubscriptionOptions struct {
	Since    string
	Expr     Expression
	Fields   []string
	DeferVCS bool
}

type TriggerOptions

type TriggerOptions struct {
	Name          string      `json:"name"`
	Command       []string    `json:"command"`
	AppendFiles   bool        `json:"append_files,omitempty"`
	Expression    interface{} `json:"expression"`
	Stdin         StdinType   `json:"stdin"`
	Stdout        string      `json:"stdout"`
	Stderr        string      `json:"stderr"`
	MaxFilesStdin int         `json:"max_files_stdin"`
	Chdir         string      `json:"chdir"`
	RelativeRoot  string      `json:"relative_root"`
}

Jump to

Keyboard shortcuts

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