Documentation
¶
Overview ¶
Package lens holds each lens's context: the owner's current work, which the note stage drafts beside and the model read reads beside, so both bear on what the owner works on now. A context reader is registered once under its name, as a deliverer is, and config opens one for a lens from its [lens.<lens>.context] table. With no reader opened for a lens, each stage under it runs without a context.
Index ¶
Constants ¶
const Slate = "slate"
Slate is the context reader of a slate tracker: its focus in force and its active initiatives, read under SlateScopes. Each initiative in the list carries its title, summary and pursuits, which is what a prompt quotes, so the reader asks no initiative's own route.
Variables ¶
var SlateScopes = []string{"slate.records.read"}
SlateScopes is what the slate reader's service client asks for.
Functions ¶
func Register ¶
func Register(name string, r Registration)
Register records that this build carries the context reader called name. Registering a name twice panics, as a duplicate is a build error.
Types ¶
type Context ¶
type Context struct {
// Focus is where the owner's work leans for a while, and nil where none
// is in force.
Focus *Focus
Initiatives []Initiative
}
Context is the owner's current work, as a context reader answers it.
type Focus ¶
Focus is the statement of where the owner's work leans, the last day it holds, and the share of the work each pursuit it names takes.
type Initiative ¶
Initiative is one body of the owner's work under way.
type Reader ¶
Reader reads a lens's context. Beside an error it may answer an older context it read, which Text then quotes.
type Readers ¶
Readers holds the reader opened for each lens, by the lens's name.
func (Readers) Text ¶
Text is the context of lens as a prompt quotes it, and "" where no reader is opened for lens. A read that fails costs the stage only the context: Text logs why on log and answers what the reader answered beside the failure, the last context it read or none, so the stage runs on.
type Registration ¶
Registration is one context reader as this build carries it: the scopes its service client needs, and how a worker opens it on the reader's API.
func Lookup ¶
func Lookup(name string) (Registration, bool)
Lookup is the context reader registered as name.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package slatestandin is what a stand-in slate answers to the lens's slate reader in a test: a focus naming two pursuits, and two active initiatives.
|
Package slatestandin is what a stand-in slate answers to the lens's slate reader in a test: a focus naming two pursuits, and two active initiatives. |