Documentation
¶
Overview ¶
A table lives next to the dispatcher it feeds (pkg/cmd/create/table.go, and so on) so that adding a resource stays a one-line edit in the package that owns the verb.
Index ¶
Constants ¶
const Fallback = apiversion.V4
Fallback is the generation assumed when a factory carries no resolved version. The root command always resolves one, so this covers callers that build a command tree on their own — documentation generation and unit tests — which saw the v4 tree before these tables existed.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Entry ¶
type Entry struct {
// Versions limits the entry to those generations. An empty Versions means
// the command is version-agnostic and is offered to every generation.
Versions []apiversion.Version
// New constructs the command.
New Builder
}
Entry is one sub-command and the generations it is offered to.
func Any ¶
Any registers a command that behaves the same on every generation, v6 included: it does not call a resource API (version, whoami, profiles...).
func V3V4 ¶
V3V4 registers a command that v3 and v4 share and v6 does not offer yet, such as the resource CRUD verbs.
func V4V6 ¶
V4V6 registers a command that v4 and v6 share: one implementation that picks what differs from the factory's generation (build, dev, init, link, login).
func (Entry) Supports ¶
func (e Entry) Supports(v apiversion.Version) bool
Supports reports whether the entry is offered to generation v.
v6 sees only the entries that name it: Any, V4V6 and V6Only. An entry that names v4 alone is not offered to v6, so a v6 account never runs a command that calls the v4 API.