Documentation
¶
Index ¶
- Constants
- Variables
- func DefaultPath(dir, app, platform string) string
- func Headings(l *look.Listing, only map[int]bool) []string
- func Title(l *look.Listing, only map[int]bool) string
- type Action
- type Ambiguous
- type CheckLine
- type CheckReport
- type Coverage
- type Crawler
- type Device
- type DiffReport
- type Edge
- type Element
- type FlowStep
- type Hit
- type InputRule
- type Inputs
- type Map
- func (m *Map) AddAliases(s *Screen, names []string) ([]string, error)
- func (m *Map) Anchors()
- func (m *Map) Cover(flows []*flow.Flow) *Coverage
- func (m *Map) Detail(s *Screen) string
- func (m *Map) EdgesFrom(id string) []*Edge
- func (m *Map) Find(query string) []Hit
- func (m *Map) FindAction(s *Screen, query string) (*Action, error)
- func (m *Map) Finish()
- func (m *Map) Flow(name string, edges []*Edge) string
- func (m *Map) FromLaunch(to *Screen) ([]*Edge, error)
- func (m *Map) HTML() string
- func (m *Map) Headline() string
- func (m *Map) KeepNames(old *Map, skip map[string]bool)
- func (m *Map) Locate(l *look.Listing) Match
- func (m *Map) Match(v *View) Match
- func (m *Map) Rename()
- func (m *Map) Resolve(query string) (*Screen, error)
- func (m *Map) Root() *Screen
- func (m *Map) Route(from, to *Screen) ([]*Edge, error)
- func (m *Map) Save(path string) error
- func (m *Map) Score(s *Screen, features []string) float64
- func (m *Map) ScoreView(s *Screen, v *View) float64
- func (m *Map) Screen(id string) *Screen
- func (m *Map) Steps(edges []*Edge) []FlowStep
- func (m *Map) Summary(edges bool) string
- func (m *Map) TakeGivenNames(disk *Map)
- func (m *Map) Where(l *look.Listing) Place
- type Match
- type Names
- type Options
- type Place
- type Screen
- type ScreenChange
- type Stats
- type View
Constants ¶
View Source
const ( SameScreen = 0.80 ExpectedScreen = 0.55 PartOfScreen = 0.70 )
View Source
const ( KindScreen = "screen" KindOverlay = "overlay" KindState = "state" KindExternal = "external" )
View Source
const ( StatusPending = "pending" StatusDone = "done" StatusFailed = "failed" StatusDenied = "denied" StatusInput = "input" StatusFilled = "filled" StatusDisabled = "disabled" StatusSampled = "sampled" StatusInherited = "inherited" StatusNoTarget = "no-selector" )
View Source
const Version = 1
Variables ¶
View Source
var DefaultDeny = regexp.MustCompile(`(?i)^\W*(` + denyWords + `)\b`)
Functions ¶
func DefaultPath ¶
Types ¶
type Action ¶
type Action struct {
Label string `json:"label"`
Kind string `json:"kind"`
Selector string `json:"selector"`
Feature string `json:"feature,omitempty"`
Reach []string `json:"reach,omitempty"`
Status string `json:"status"`
To string `json:"to,omitempty"`
Note string `json:"note,omitempty"`
Group string `json:"group,omitempty"`
Field bool `json:"field,omitempty"`
Hint string `json:"hint,omitempty"`
ID string `json:"id,omitempty"`
}
type Ambiguous ¶
func (*Ambiguous) Candidates ¶
type CheckReport ¶
type CheckReport struct {
OK int `json:"ok"`
Changed int `json:"changed"`
Failed int `json:"failed"`
Unreachable int `json:"unreachable"`
Lines []CheckLine `json:"lines"`
Stopped string `json:"stopped,omitempty"`
}
func (*CheckReport) Passed ¶
func (r *CheckReport) Passed() bool
func (*CheckReport) Text ¶
func (r *CheckReport) Text() string
type Coverage ¶
type DiffReport ¶
type DiffReport struct {
Added []string `json:"added"`
Removed []string `json:"removed"`
Changed []ScreenChange `json:"changed"`
}
func Diff ¶
func Diff(old, new *Map) *DiffReport
func (*DiffReport) Empty ¶
func (d *DiffReport) Empty() bool
func (*DiffReport) Text ¶
func (d *DiffReport) Text() string
type Element ¶
type Element struct {
Kind string `json:"kind"`
Label string `json:"label,omitempty"`
ID string `json:"id,omitempty"`
Hint string `json:"hint,omitempty"`
Selector string `json:"selector,omitempty"`
Check string `json:"check,omitempty"`
Feature string `json:"feature,omitempty"`
Tappable bool `json:"tappable,omitempty"`
Field bool `json:"field,omitempty"`
Top int `json:"top"`
}
type Inputs ¶
type Inputs struct {
Rules []InputRule
}
func AutoInputs ¶
func AutoInputs() *Inputs
func LoadInputs ¶
type Map ¶
type Map struct {
Version int `json:"version"`
App string `json:"app"`
Platform string `json:"platform"`
Created time.Time `json:"created"`
Updated time.Time `json:"updated"`
Start []string `json:"start"`
Screens []*Screen `json:"screens"`
Edges []*Edge `json:"edges"`
Stats Stats `json:"stats"`
Hide *strings.Replacer `json:"-"`
// contains filtered or unexported fields
}
func (*Map) TakeGivenNames ¶
type Names ¶
type Options ¶
type Options struct {
MaxDepth int
MaxScreens int
MaxActions int
MaxScrolls int
MaxStates int
Sample int
Deadline time.Time
Deny *regexp.Regexp
Allow *regexp.Regexp
Inputs *Inputs
Back bool
TapTimeout int
Progress func(string)
Checkpoint func(*Map)
Shot func(*Screen)
Sleep func(context.Context, time.Duration)
}
type Place ¶
type Screen ¶
type Screen struct {
ID string `json:"id"`
Kind string `json:"kind"`
Parent string `json:"parent,omitempty"`
Names Names `json:"names"`
Route string `json:"route,omitempty"`
Heading string `json:"heading,omitempty"`
TitleMatters bool `json:"titleMatters,omitempty"`
TitleVaries bool `json:"titleVaries,omitempty"`
Core []string `json:"core"`
Extra []string `json:"extra,omitempty"`
Anchor string `json:"anchor,omitempty"`
AnchorWeak bool `json:"anchorWeak,omitempty"`
Path []string `json:"path"`
Depth int `json:"depth"`
Elements []Element `json:"elements"`
Actions []*Action `json:"actions"`
Listing string `json:"listing"`
Scrolled bool `json:"scrolled,omitempty"`
Unreachable string `json:"unreachable,omitempty"`
Shot string `json:"shot,omitempty"`
}
func (*Screen) RemoveAliases ¶
type ScreenChange ¶
Click to show internal directories.
Click to hide internal directories.