Documentation
¶
Overview ¶
Package apiserver is the Kubernetes-style resource layer of the aeman API: it translates the internal board domain into Card/Sprint/Note/Ordering resources (metadata/spec/status), evaluates LIST selectors for the Team, Me and Backlog views, and derives the fields the UI would otherwise compute. It is backend-agnostic: everything works on the domain board snapshot.
Index ¶
- func CheckStatus(v string) error
- func DomainZone(name string) board.ZoneKey
- func Drawn(b board.Board, sel Selector, uid string) bool
- func FilterCards(b board.Board, sel Selector) []board.Card
- func MarkRecords(list *CardList, records map[string]bool, asOf string)
- func SemanticZone(z board.ZoneKey) string
- func TeamSelector(team string) string
- type BlockerRef
- type BoardInfo
- type BoardMetadata
- type Card
- type CardDates
- type CardLinkRef
- type CardList
- type CardMetadata
- type CardSpec
- type CardStatus
- type CustomerRef
- type DayEntries
- type DayLogList
- type DependentCustomerRef
- type DomainInfo
- type Hierarchy
- type LineageRef
- type LogEntry
- type LogList
- type Member
- type Note
- type NoteMetadata
- type NoteSpec
- type Ordering
- type OrderingSpec
- type PlanGroup
- type ReviewedRef
- type Selector
- type Sprint
- type SprintCapacity
- type SprintMetadata
- type SprintSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckStatus ¶ added in v0.49.0
CheckStatus refuses a status selector naming anything but the status filter's values (O14): a typo is an error, never quietly no filter.
func DomainZone ¶
DomainZone maps an API zone name onto the domain key ("" stays "").
func Drawn ¶ added in v0.39.0
Drawn reports whether a card is on the board the selector describes — the question a view-scoped GESTURE asks before it acts.
A person cannot press × on a card they cannot see, and an agent standing on the Me board should not be able to either: it has to say `view=team&team=X` (or `view=all`), and then it has said which board it is acting from. The answer comes from the LISTING itself rather than from a second set of rules beside it, because a gate that drifted from the listing would be a card the board draws and refuses to act on — or, worse, one it acts on and never shows.
It is asked of the card as it stands BEFORE the write, never after: sending work off today's board is the point of half these gestures, and a gate on the result would forbid exactly the ones that move it.
func FilterCards ¶
FilterCards returns the cards matching the selector, in board order. The view rules delegate to the same domain filters the views always used.
func MarkRecords ¶ added in v0.30.0
MarkRecords stamps the cards that came FROM the past with the moment they are from: everything else in the same listing is today's and stays workable, so the mark is per card.
records is what the day's board took from that evening (board.MergeAsOf's own answer), by card id. Deriving it again from team names loses the cards whose team differs between the two moments — one moved between teams, one of a team renamed since — and such a card comes through LIVE: draggable, editable, and refused by every write door. Which is the refusal G60 names as the thing not to do.
func SemanticZone ¶
SemanticZone maps a domain zone onto its API name ("" stays "").
func TeamSelector ¶ added in v0.46.0
TeamSelector is one team written as a `team` selector: the no-team group alone is ",", since an empty selector is no filter (or, on view=team, the no-team group by another reading — "," says it on every view).
Types ¶
type BlockerRef ¶ added in v0.50.0
type BlockerRef struct {
UID string `json:"uid"`
Type string `json:"type,omitempty"`
Title string `json:"title"`
Via string `json:"via,omitempty"`
}
LineageRef is one ancestor of a card, in status.lineage: root first, so a client draws the breadcrumb straight from the list. BlockerRef is one unsatisfied dependency: the card waited for, and — when the wait is inherited — the uid of the ancestor whose dependsOn names it.
type BoardInfo ¶
type BoardInfo struct {
Kind string `json:"kind"`
Metadata BoardMetadata `json:"metadata"`
}
BoardInfo is the read-only board resource: identity plus the team roster (the teams that have sprint pointers).
func BoardResource ¶
BoardResource is the read-only board identity resource, members without avatars.
func BoardResourceWith ¶ added in v0.26.0
BoardResourceWith is BoardResource with the members' avatars resolved by the given hook (nil leaves them empty).
func BoardResourceWithPeople ¶ added in v0.26.0
BoardResourceWithPeople is BoardResource with the members resolved by the given hook — the forge's avatar and display name for a login (nil leaves both empty). The hook's Login is ignored: the board's login is the identity.
type BoardMetadata ¶
type BoardMetadata struct {
Title string `json:"title,omitempty"`
URL string `json:"url,omitempty"`
Teams []string `json:"teams"`
// Members is every distinct assignee on the board — the people roster for
// pickers (assign, review, view-as) now that clients load one view at a
// time and cannot derive it from the cards they hold — with the avatar
// the server's forge adapter resolves for each, so a client never
// assembles a forge URL of its own.
Members []Member `json:"members"`
// Domains are the repositories the visitor can read, primary first: which
// they may write — a team is declared in one they pick when
// more than one is writable — and which members can read each,
// so a reviewer picker offers only people who will see the card. Absent
// primary first. The board lists its repositories whatever it spans
// (G59), so a client compares the stamps it carries against this list
// and reads a single entry as "no boundaries", never an absent one.
Domains []DomainInfo `json:"domains,omitempty"`
// Customers is the board's customer roster in board order: the ids the
// cards name and the names to show (docs/design/ownership.md, O5).
Customers []CustomerRef `json:"customers,omitempty"`
// TeamDomains names the repository a team was declared in, for the
// teams that live OUTSIDE the primary — the primary is the default and
// needs no entry, and a single-repository board names none at all.
TeamDomains map[string]string `json:"teamDomains,omitempty"`
}
type Card ¶
type Card struct {
Kind string `json:"kind"`
Metadata CardMetadata `json:"metadata"`
Spec CardSpec `json:"spec"`
Status CardStatus `json:"status"`
}
Card is a project item as an API resource.
func CardResource ¶
CardResource is the resource for one card. It reads the board once (an Index) for the questions that walk it — the lineage, a planning card's standing, the reviewer. A LISTING builds the index once and asks CardResourceIn of every card: three thousand cards walking the board for each of those questions was the listing's whole cost, paid again for every watcher's projection.
func CardResourceIn ¶ added in v0.42.0
CardResourceIn is CardResource over an index built once for a listing.
func CardSummaryResource ¶ added in v0.16.0
CardResource maps a domain card onto the API resource, deriving status from the board (reviewedBy needs the linked review card's assignee). CardSummaryResource is CardResource without the card body: the shape of a board row. The description — often the bulk of a card's bytes, and unused by row rendering — stays behind for GET /cards/{uid}; the derived link refs in status keep the row's links indicator honest without it.
type CardDates ¶
type CardDates struct {
Start string `json:"start,omitempty"`
End string `json:"end,omitempty"`
Sprint string `json:"sprint,omitempty"`
}
CardDates is the card's date model: its scheduled start, the end of its visible range, and the sprint it belongs to (see docs/dates.md).
type CardLinkRef ¶ added in v0.16.0
type CardLinkRef struct {
Kind string `json:"kind"`
URL string `json:"url"`
Owner string `json:"owner,omitempty"`
Repo string `json:"repo,omitempty"`
Number int `json:"number,omitempty"`
}
CardLinkRef is one extracted reference: a GitHub issue/PR or a plain URL.
type CardList ¶
type CardList struct {
Kind string `json:"kind"`
Items []Card `json:"items"`
// AsOf is the moment a snapshot listing reflects (RFC3339) — the end of
// the day it was asked for. Empty on a live listing; a day the history
// no longer reaches is refused (410) rather than answered.
AsOf string `json:"asOf,omitempty"`
// BoardOrder is, on a backlog listing, the whole board's order — what
// every Ordering frame carries, and what the listing's order is read
// from (K14). A client places a card the watch brings in, and re-sorts
// on an Ordering frame, by the same key (board.BacklogKey). Absent on
// every other listing.
BoardOrder []string `json:"boardOrder,omitempty"`
// Groups is the Plans reading, when the listing asked for it
// (group=plans) on the Team, Me or Backlog view: the groups those boards
// draw in Plans, each a plan item (absent for the cards in none), its
// cell and its cards (PlanGroups).
Groups []PlanGroup `json:"groups,omitempty"`
// contains filtered or unexported fields
}
CardList is the LIST response envelope.
type CardMetadata ¶
type CardMetadata struct {
UID string `json:"uid"`
Author string `json:"author,omitempty"`
CreatedAt string `json:"createdAt,omitempty"`
}
CardMetadata is the card's identity and immutable facts.
type CardSpec ¶
type CardSpec struct {
Title string `json:"title"`
// Description is nil in a summary listing ("body not included" — the
// row shape) and always present, possibly empty, on a full resource.
// The distinction is the client's "loaded" marker: only nil means "go
// fetch the body", so an empty body never reads as a missing one.
Description *string `json:"description,omitempty"`
Team string `json:"team,omitempty"`
// Owner is the one person who answers for a goal, an initiative or an
// epic (docs/design/ownership.md, O1); absent on every other card.
Owner string `json:"owner,omitempty"`
// Customers are the ids of the board's customers this card is for, as
// written on the card itself; status.effectiveCustomers adds the
// ancestors'.
Customers []string `json:"customers,omitempty"`
// DependsOn are the uids of the cards this one waits for
// (docs/design/dependencies.md) — the ones the reader's board holds.
DependsOn []string `json:"dependsOn,omitempty"`
Zone string `json:"zone,omitempty"`
// Size is what somebody said the card weighs: S, M, L or XL, or absent.
Size string `json:"size,omitempty"`
Assignees []string `json:"assignees"`
Progress int `json:"progress"`
Stage string `json:"stage,omitempty"`
// Recurrence, on a recurrent card, is its reseed cycle: "" = every
// sprint, "week" / "month" = once the interval has elapsed.
Recurrence string `json:"recurrence,omitempty"`
Dates CardDates `json:"dates"`
// Parked says the task is in its team's BACKLOG rather than in work.
// Every team has one and nothing declares it. A task is in work (a date
// or a sprint) or parked, never both and never neither
// (docs/design/backlog.md, K1). A task has no week (K7).
Parked bool `json:"parked,omitempty"`
ReviewOf string `json:"reviewOf,omitempty"`
// Parent is the uid of the card this one sits under — the ONE link of
// the hierarchy. What it means is the parent's type: under a task this
// card is a subtask; under a goal, an initiative or an epic it is filed
// in the hierarchy and nothing else about it changes
// (docs/design/hierarchy.md).
Parent string `json:"parent,omitempty"`
// Type is the card's level: absent for a task, else "goal",
// "initiative" or "epic" — a PLANNING card, drawn on the Strategy board and on
// no day board. Fixed at create.
Type string `json:"type,omitempty"`
}
CardSpec is the user's intent — everything an edit can change.
type CardStatus ¶
type CardStatus struct {
Complete bool `json:"complete"`
InProgress bool `json:"inProgress"`
ReviewedBy string `json:"reviewedBy,omitempty"`
ReviewRound int `json:"reviewRound,omitempty"`
// AsOf marks a card served from the PAST: its team's sprint has moved on
// past the day asked for, so this is what the card was that evening, not
// what it is. A record — a client shows it as one and does not offer to
// change it. Absent on every live card, including on the same listing:
// whether a day is over is each team's own answer (G60).
AsOf string `json:"asOf,omitempty"`
// Domain is the repository the card lives in — the store's decision by
// the inheritance rule, never a client's choice. The store stamps every
// card, the primary's included, so this normally carries a NAME on a
// multi-repository board and the client compares it against the primary
// (cardDomainBadge) rather than reading an empty string as "primary".
// Empty only where nothing stamped it at all — a board assembled by
// hand; the git server stamps every card, one repository or many.
Domain string `json:"domain,omitempty"`
// DoneAt is the board day the card reached 100 (cleared on reopen) — the
// day boards show a done card that day and drop it the next.
DoneAt string `json:"doneAt,omitempty"`
// LeftAt is the board day the older × demoted the card into the previous
// sprint, which a RECORD of that day gives back (G60). Nothing writes it
// any more; the cards that carry it still stand in the history.
LeftAt string `json:"leftAt,omitempty"`
// Links are the references extracted from the card's description —
// unresolved (no titles or states; GET /cards/{uid}/links resolves those).
// They ride the status so a summary listing, which omits the description
// itself, still tells a row it has links to show.
Links []CardLinkRef `json:"links,omitempty"`
// Lineage is every ancestor of the card, root first — the breadcrumb a
// detail pane draws above it. Absent on a root.
Lineage []LineageRef `json:"lineage,omitempty"`
// Subtask says the card rides a parent TASK (board.IsSubtask). A client
// reads it off the lineage's last entry for a task; a REVIEW card's
// lineage is the reviewed task's chain, so a stray parent of its own has
// no entry to read, and this is the server's answer for it.
Subtask bool `json:"subtask,omitempty"`
// Reviewed is, on a REVIEW card, the card it reviews — its uid, title and
// people — so a client shows "Reviews: «task»", opens it and draws whose
// it is without a lookup.
// Absent on every other card, and when the reviewed card is gone.
Reviewed *ReviewedRef `json:"reviewed,omitempty"`
// EffectiveTeam is the team the card counts under (O3): its own, else
// the nearest ancestor's that has one. Computed, never written.
EffectiveTeam string `json:"effectiveTeam,omitempty"`
// EffectiveCustomers is who the card is for (O4): every ancestor's
// customers and its own, the ancestors' first; a review card's are its
// task's (O6). Computed, never written.
EffectiveCustomers []string `json:"effectiveCustomers,omitempty"`
// DependentCustomers are the effective customers that come ONLY from the
// work that waits for this card (N5), each with the nearest such card.
DependentCustomers []DependentCustomerRef `json:"dependentCustomers,omitempty"`
// Locked is the DERIVED lock (N3): a dependency of the card's own or of
// an ancestor is not done. Independent of the manual stage.
Locked bool `json:"locked,omitempty"`
// BlockedBy are the blockers the reader may read; HiddenBlockers counts
// the ones they may not (N4).
BlockedBy []BlockerRef `json:"blockedBy,omitempty"`
HiddenBlockers int `json:"hiddenBlockers,omitempty"`
// Blocks are the readable cards whose own dependsOn names this one.
Blocks []LineageRef `json:"blocks,omitempty"`
// DueDate is a task's due date (named apart from the retired Triage
// status.due, a list of weeks): the end of its NEAREST planning card — the
// epic it is for — never one borrowed from a farther ancestor. Absent
// with no planning card above it, when the nearest has no end, and on a
// planning card (its own end is its date).
DueDate string `json:"dueDate,omitempty"`
// Hierarchy is a PLANNING card's derived standing, from the tasks under
// it. Absent on a task, whose stage and progress are its own.
Hierarchy *Hierarchy `json:"hierarchy,omitempty"`
}
CardStatus is derived by the server, never written by clients.
type CustomerRef ¶ added in v0.44.0
CustomerRef is one entry of the board's customer roster.
type DayEntries ¶ added in v0.26.6
DayEntries is one card's notes and events on a day — the service's answer shape, kept here so the resource layer does not import the service.
type DayLogList ¶ added in v0.26.6
type DayLogList struct {
Kind string `json:"kind"`
Day string `json:"day"`
// Cards maps a card's uid to its entries on that day, oldest first. A
// card that was quiet is present with an empty list; a card the visitor
// cannot see is absent.
Cards map[string][]LogEntry `json:"cards"`
}
DayLogList is the GET /logs response: one day's feed, per card. The day board asks it once for every card it shows — a card's own whole history is the other question (GET /cards/{uid}/log).
func DayLogsFrom ¶ added in v0.26.6
func DayLogsFrom(day string, per map[string]DayEntries) DayLogList
DayLogsFrom builds the day feed's response from what the service found.
type DependentCustomerRef ¶ added in v0.50.0
type DependentCustomerRef struct {
Customer string `json:"customer"`
From LineageRef `json:"from"`
}
DependentCustomerRef is a customer a card is for through the work that waits for it, with that work's nearest card.
type DomainInfo ¶ added in v0.26.0
type DomainInfo struct {
Name string `json:"name"`
Writable bool `json:"writable"`
Members []string `json:"members"`
}
DomainInfo is one readable domain of the visitor's board.
type Hierarchy ¶ added in v0.42.0
type Hierarchy struct {
// Status is no-items, backlog, in-progress or done (board.HierarchyStatus).
Status string `json:"status"`
Done int `json:"done"`
Total int `json:"total"`
}
Hierarchy is a planning card's derived standing (status.hierarchy): where the tasks under it stand, through every level, and how many of them there are. Never stored — read off the tree on every listing.
type LineageRef ¶ added in v0.42.0
type LineageRef struct {
UID string `json:"uid"`
Type string `json:"type,omitempty"`
Title string `json:"title"`
// End is the ancestor's end date, when it has one: a planning card's
// bar ends there on the Strategy board, and the Backlog shows the nearest
// planning card's end as the due date of the task under it.
End string `json:"end,omitempty"`
// Team is the team the ancestor stands under — its own, else the
// nearest ancestor's (O13) — and Owner the one person who answers for
// it, its own and never inherited (O1): whose a plan item is, drawn
// beside it where the plan item itself is not listed (the day boards'
// group heads).
Team string `json:"team,omitempty"`
Owner string `json:"owner,omitempty"`
}
type LogEntry ¶
type LogEntry struct {
// Type is "event" or "note".
Type string `json:"type"`
ID string `json:"id"`
At string `json:"at,omitempty"`
// Actor is the event's actor or the note's author.
Actor string `json:"actor,omitempty"`
// Event fields (Type == "event").
EventKind string `json:"kind,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
// Note body (Type == "note").
Text string `json:"text,omitempty"`
}
LogEntry is one item of a card's unified activity feed: a recorded event (stage/progress/review/plan change) or a work note, in one timeline.
type LogList ¶
type LogList struct {
Kind string `json:"kind"`
Items []LogEntry `json:"items"`
// TruncatedBefore, when set, is the time the loaded history is cut at:
// older entries exist on the remote but are not here (a shallow clone).
TruncatedBefore string `json:"truncatedBefore,omitempty"`
}
LogList is the GET /cards/{uid}/log response envelope.
type Member ¶ added in v0.26.0
type Member struct {
Login string `json:"login"`
Name string `json:"name,omitempty"`
AvatarURL string `json:"avatarUrl,omitempty"`
// Carrying is how much open work is this person's right now, counted
// across EVERY team — a board is read through a filter and a person is
// not, so handing somebody a card without the whole number in front of
// you is a decision made in the dark (board.CarryingNow).
Carrying int `json:"carrying,omitempty"`
// Load is the same work WEIGHED — the points of what the person is
// carrying (board.LoadNow) — and Capacity the points a week they get
// through: the roster's number, absent when nobody has set one
// (board.CapacityOfPerson). A day board draws load/capacity beside the
// person and goes red past it; with no capacity it draws the load alone.
Load int `json:"load,omitempty"`
Capacity int `json:"capacity,omitempty"`
}
Member is one person on the board: a login and, when the server knows the forge, an avatar image URL and — on a forge that has them (GitLab) — a display name. The login is the identity everywhere; the name is for eyes.
func MembersOf ¶ added in v0.37.0
MembersOf is the board's people with the numbers beside each: everyone who is assigned anything, in login order, with what they are carrying (cards), what it weighs (points) and how many points a week they get through.
It is separate from the board resource because those numbers change on every card write while the rest of the metadata — teams, columns, processes — changes rarely: a watcher can be told the people alone, which is a frame of a couple of kilobytes rather than the whole roster.
type Note ¶
type Note struct {
Kind string `json:"kind"`
Metadata NoteMetadata `json:"metadata"`
Spec NoteSpec `json:"spec"`
}
Note is a work note as an API resource, a subresource of a card.
func NoteResources ¶
NoteResources maps a card's notes onto Note resources.
type NoteMetadata ¶
type Ordering ¶
type Ordering struct {
Kind string `json:"kind"`
Spec OrderingSpec `json:"spec"`
}
Ordering is the board-level manual order: the uid list clients sort by.
func OrderingResource ¶
OrderingResource is the board's manual order as a resource.
type OrderingSpec ¶
type OrderingSpec struct {
UIDs []string `json:"uids"`
}
type PlanGroup ¶ added in v0.54.0
type PlanGroup struct {
// Assignee is the Team board's column: the person, "" for nobody. A
// card of several people stands in each of their columns.
Assignee *string `json:"assignee,omitempty"`
// Zone is the band, on the Team and Me boards.
Zone string `json:"zone,omitempty"`
Plan *LineageRef `json:"plan,omitempty"`
Cards []string `json:"cards"`
}
PlanGroup is one group of a Plans reading: the plan item (absent for the cards in none), the cell it is drawn in on the board, and its cards by uid in the listing's order.
func PlanGroups ¶ added in v0.54.0
PlanGroups is the Plans reading of a listing's cards for a view: per band on Me and per person and band on Team, each plan item gathered where its first card stands; on the Backlog the one list cut into runs of neighbouring cards of one plan item, so a plan item split by another stands in two runs. Nil for a view the boards draw no groups on.
type ReviewedRef ¶ added in v0.43.0
type ReviewedRef struct {
UID string `json:"uid"`
Type string `json:"type,omitempty"`
Title string `json:"title"`
Assignees []string `json:"assignees,omitempty"`
}
ReviewedRef is the card a review card reviews, in status.reviewed: enough to name it, open it and draw whose it is (the small counterpart avatar) without a lookup.
type Selector ¶
type Selector struct {
// View is "", "all", "team", "me", "backlog" or "strategy" (the
// deprecated "strategy" reads as "strategy"). ""
// and "all" both list every card (the HTTP/MCP layer defaults an
// unspecified view to the caller's "me").
View string
// Team is the team key for the team/backlog views ("" = the no-team
// group); a comma-separated set lists several.
Team string
// Day is the viewed day for the team/me views (defaults to today).
Day string
// User is the person for the me view ("" = everyone).
User string
// RecordCards are the cards this listing is a RECORD of — what the day's
// board took from that evening, by id (board.MergeAsOf). Only they give
// back what the × took off (LeftOn): a card of a team still inside that
// sprint is live, and the × took it off that day on purpose. Set together
// with LeftOn.
RecordCards map[string]bool
// LeftOn gives a day back what the × took off it: a card finished that
// day and tidied away carries the day it was LEFT on (board.Card.LeftAt)
// while its dates have moved into the previous sprint, so nothing else
// remembers where it was worked. Set only when a day is read as a RECORD
// — today's board must not show it, since taking the card off today is
// what the × is for (G60).
LeftOn string
// Snapshot asks for the board OF the day rather than today's board
// filtered by it: every card as it stood when that day ended. Only a
// PAST day has one — today is the live board — and only storage that
// keeps history can answer (git does).
Snapshot bool
// Fields picks the resource shape a listing delivers. The default is the
// board row — no description, with the derived link refs in status
// standing in for it; a card's body is one GET /cards/{uid} away.
// "full" opts a genuine bulk reader into complete Cards.
Fields string
// Plain field selectors, applied on top of the view (or of all cards).
Stage *string
Zone *string
Assignee string
// Focus keeps only workable cards — the "what can I act on now" filter
// (drops done, on-review and locked). It mirrors the Me view's focus toggle.
Focus bool
// Under keeps the cards standing under one card at any depth — a plan
// item's work: what that item's group shows on a board. A review card
// stands under its task and what the task stands under. The card itself
// is not under itself. A task's subtasks are under it too, but the day
// boards and the backlog deliver a subtask only with its parent, so only
// view=all lists them for under=<task>.
Under string
// Group asks for the Plans reading ("plans"): the listing carries the
// groups the Team, Me and Backlog boards draw (PlanGroups).
Group string
// IncludeReviews brings review cards into a view. On me/team it APPENDS
// each returned card's linked review, so a client rendering the reviewer
// badge has it on hand without a second request. Off by default: agents
// listing a Me board do not want them mixed in.
IncludeReviews bool
// Customer and Owner narrow the strategy view (docs/design/ownership.md,
// O7, O8), each a comma-separated set: Customer by effective customers
// (customer ids), Owner by a planning card's own owner. On the strategy
// Team narrows by EFFECTIVE team the same way, the no-team group being
// its empty member (alone, the set ","). Several values in one are OR,
// different ones AND; every match comes with its ancestors. Customer
// narrows the day boards' lists too — team, backlog, all, me — by
// effective customers (O11).
Customer string
Owner string
// Status narrows the strategy view by status (O14): a comma-separated set
// of in-progress, backlog, done (board.WorkStatus), locked and no-items
// (board.StatusFilters). A task matches by its own work status and lock,
// a subtask rides its parent task, a review card follows the task it
// reviews, and a plan item matches by itself for locked and no-items and
// otherwise when any task under it does. AND with team, customer and
// owner.
Status string
}
Selector scopes a card LIST or watch subscription. View selectors reproduce exactly what the UI renders (the Team grid, the Me day board, the backlogs); the plain field selectors compose with no view.
func ParseSelector ¶
ParseSelector reads a selector from query parameters. Unknown views error.
func ParseViewSelector ¶ added in v0.39.0
ParseViewSelector is the same parse for a door that takes the board from the PATH (`/api/v1/views/{view}/cards`): the view is the segment, and a `view=` in the query is refused rather than ignored, since a client sending one is asking for a board and would be answered from another.
func (Selector) Matches ¶
Matches reports whether a single card is in the selector's scope — the watch hub uses it to compute per-subscription membership deltas. It must agree with FilterCards.
func (Selector) Mirrored ¶ added in v0.44.0
Mirrored reports whether a client can work out this selection's membership itself — mirror it — so a watch may spare it the ADDED and DELETED of its own changes. The Strategy board's team, customer and owner filters are the server's alone (strategyNarrowed): a board filtered by them draws what it was sent, and must be sent what its own change put in or took out.
type Sprint ¶
type Sprint struct {
Kind string `json:"kind"`
Metadata SprintMetadata `json:"metadata"`
Spec SprintSpec `json:"spec"`
}
Sprint is a team's sprint pointer as an API resource (name = the team key, "" is the no-team group).
func SprintResourceOf ¶ added in v0.37.0
SprintResourceOf shapes ONE team's sprint resource. The watch frame for a team and the listing go through it together, so a frame cannot carry less than the listing does — which is how a client that merges frames in place came to lose the team's capacity every time a sprint pointer moved.
func SprintResources ¶
SprintResources maps the board's per-team pointers onto Sprint resources, sorted by team for stable output.
type SprintCapacity ¶ added in v0.32.0
type SprintCapacity struct {
Points int `json:"points,omitempty"`
}
SprintCapacity is a team's capacity as the API states it: the POINTS a week it gets through, a number somebody SET and never derived — absent when nobody has said. No board draws it at the moment (the Triage board's load panel went with that board); it is kept for the backlog to show load again.
type SprintMetadata ¶
type SprintMetadata struct {
Team string `json:"team"`
}
type SprintSpec ¶
type SprintSpec struct {
Current string `json:"current,omitempty"`
Previous string `json:"previous,omitempty"`
// Capacity is what a week of the team's plan is weighed against.
Capacity *SprintCapacity `json:"capacity,omitempty"`
}