Documentation
¶
Index ¶
- Constants
- func Charter(ctx context.Context, e *engine.Engine, projectID string, snapshot int) (html, jsonData []byte, err error)
- func OperationCharter(ctx context.Context, e *engine.Engine, id string) ([]byte, error)
- func PartsCSS() string
- func ProgrammeCharter(ctx context.Context, e *engine.Engine, id string) ([]byte, error)
- type DiffLine
- type Part
- type PartDiff
- type WorkItem
Constants ¶
const ( DiffSame = "same" DiffAdded = "added" DiffRemoved = "removed" DiffChanged = "changed" )
Part states and line ops in a charter's diff.
Variables ¶
This section is empty.
Functions ¶
func Charter ¶
func Charter(ctx context.Context, e *engine.Engine, projectID string, snapshot int) (html, jsonData []byte, err error)
Charter renders a project charter to HTML and JSON for a given snapshot. snapshot=0 means the working copy; snapshot>0 means a specific version. Returns byte slices for HTML and JSON, both deterministic.
func OperationCharter ¶
OperationCharter renders an operation, a service that keeps running, as its service description (ITIL's service design package, cut to what Cartograph holds): what it does and when, who runs it, what it is part of, how it is measured, what it uses and produces, and which projects are changing it.
The last section is the one no other view shows. A project names the operation it lands in (TAXONOMY.md D17); read back here, it tells the people who run a service what is about to be handed to them.
func PartsCSS ¶ added in v2.11.0
func PartsCSS() string
PartsCSS is the styling of what a charter's sections hold (chips, the components diagram, the schedule chart, the iron triangle), for an interface drawing the charter as parts in a page of its own, where the charter's page styles do not belong (#77). It reads the charter's colour variables: --fg, --muted, --line, --soft, --paper, --accent, --accent-soft, --ok, --warn, --bad and --sans.
func ProgrammeCharter ¶
ProgrammeCharter renders a programme as the document its definition adds up to: what it is for, what is wrong, what it serves, how it believes the change happens (its theory of change), what is inside it, and who runs it. The same five-part skeleton a project's charter uses, with a programme's own sections (MSP programme brief, PMI program charter).
Read-only and derived, like every other view: nothing is stored, so there is nothing to keep in step.
Types ¶
type Part ¶ added in v2.11.0
type Part struct {
Title string `json:"title"`
// Step is the step of the project's walk the section is written in.
Step string `json:"step,omitempty"`
// Anchor is the section's id in the HTML, "" for an empty part.
Anchor string `json:"anchor,omitempty"`
// HTML is what the renderer wrote under the heading, escaped as the
// charter is.
HTML string `json:"html"`
// Fields are the JSON pointers of the fields written in it as typed,
// each editable in place.
Fields []string `json:"fields"`
Empty bool `json:"empty"`
// contains filtered or unexported fields
}
Part is one section of a charter.
type PartDiff ¶ added in v2.11.0
type PartDiff struct {
Title string `json:"title"`
Step string `json:"step,omitempty"`
// State is same, added, removed or changed.
State string `json:"state"`
Lines []DiffLine `json:"lines"`
}
PartDiff is one part of a charter against the record.
type WorkItem ¶ added in v2.9.0
type WorkItem struct {
Code string `json:"code"`
Deliverable string `json:"deliverable"`
Task string `json:"task,omitempty"`
Name string `json:"name"`
Role string `json:"role,omitempty"`
Note string `json:"note,omitempty"`
}
WorkItem is one line of a project's work breakdown: a deliverable (D2) or one task under it (D2.1).