cli

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2017 License: GPL-3.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RosterEdit

type RosterEdit struct {
	// FileName is the name of the file containing the roster information.
	FileName string
	// Roster contains the state of the roster at the time of writing the
	// file. It's what we diff against when reading the file.
	Roster []data.RosterEntry
	// isComplete is true if this is the result of reading an edited
	// roster, rather than a report that the file has been written.
	IsComplete bool
	// contents contains the edited roster, if isComplete is true.
	Contents []byte
}

RosterEdit contains information about a pending roster edit. Roster edits occur by writing the roster to a file and inviting the user to edit the file.

type RosterEditor

type RosterEditor struct {
	Roster []data.RosterEntry

	// pendingRosterEdit, if non-nil, contains information about a pending
	// roster edit operation.
	PendingRosterEdit *RosterEdit
	// pendingRosterChan is the channel over which roster edit information
	// is received.
	PendingRosterChan chan *RosterEdit
}

RosterEditor represents an edit of a Roster in progress

func (*RosterEditor) EditRoster

func (s *RosterEditor) EditRoster(roster []data.RosterEntry) error

EditRoster runs in a goroutine and writes the roster to a file that the user can edit.

func (*RosterEditor) LoadEditedRoster

func (s *RosterEditor) LoadEditedRoster(edit RosterEdit) error

LoadEditedRoster loads the edits from the given roster

type UI

type UI interface {
	Loop()
}

UI is the user interface functionality exposed to main

func NewCLI

func NewCLI(version string, cf terminal.ControlFactory, sf sessions.Factory, df func(tls.Verifier) xi.Dialer) UI

NewCLI creates a new cliUI instance

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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