Documentation
¶
Index ¶
- func AttachmentTable[T Downloadable](w io.Writer, attachments []T)
- func BuildCommandIndex(version string) map[string]cli.Cmd
- func CommentsBrief(w io.Writer, comments []jira.Comment)
- func CommentsFull(w io.Writer, comments []jira.Comment)
- func CommentsHeader(w io.Writer, count int)
- func ComponentsTable(w io.Writer, components []jira.NamedField)
- func FilterInteresting(fields []jira.FieldMeta) []jira.FieldMeta
- func Form(w io.Writer, issueKey string, detail jira.FormDetail)
- func GanttReport(w io.Writer, plan gantt.Plan, v ganttView)
- func HistoryTable(w io.Writer, entries []jira.History)
- func InvalidValuesError(fhc FieldHintCmd, target string, mismatches []FieldMismatch) error
- func IssueDetail(w io.Writer, issue *jira.Issue, startField string)
- func IssueTable(w io.Writer, issues []jira.Issue)
- func IssueTypesTable(w io.Writer, types []jira.IssueTypeInfo)
- func Links(w io.Writer, links []ParsedLink)
- func MetaSection(w io.Writer, transitions []jira.Transition, edit []jira.FieldMeta)
- func MissingFields(meta []jira.FieldMeta, supplied map[string]any, ...) []jira.FieldMeta
- func MissingFieldsError(fhc FieldHintCmd, target string, missing []jira.FieldMeta) error
- func ProjectCreateMetaBlocks(w io.Writer, types []jira.IssueTypeInfo, meta map[string][]jira.FieldMeta, ...)
- func ProjectHeader(w io.Writer, p *jira.ProjectDetail)
- func ProjectStatusBlocks(w io.Writer, statuses []jira.ProjectStatusGroup)
- func ProjectsTable(w io.Writer, projects []jira.ProjectRef)
- func RegisterCommand(name string, c cli.Cmd)
- func RenderFieldList(w io.Writer, fields []jira.FieldMeta)
- func ResolveAnswer(q jira.Question, ans jira.Answer) string
- func SetExample(f jira.FieldMeta) string
- func SetExampleFor(cmd FieldHintCmd, f jira.FieldMeta) string
- func TransitionsRequiredFields(w io.Writer, transitions []jira.Transition)
- func TransitionsTable(w io.Writer, transitions []jira.Transition)
- func UnknownFieldIDs(meta []jira.FieldMeta, supplied map[string]any) []string
- func UnknownFieldsError(target string, meta []jira.FieldMeta, unknown []string) error
- func UsersTable(w io.Writer, users []jira.User)
- type Downloadable
- type FieldHintCmd
- type FieldMismatch
- type MetaViewResult
- type ParsedLink
- type ProjectViewResult
- type SearchFilters
- type SmartViewResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttachmentTable ¶
func AttachmentTable[T Downloadable](w io.Writer, attachments []T)
AttachmentTable renders a name/type/size listing for any Downloadable type.
func BuildCommandIndex ¶
BuildCommandIndex combines built-in and registered commands. version is the binary version reported by schema. Building the map here lets schema capture it without a package-initialization cycle.
func CommentsBrief ¶
CommentsBrief renders each comment as a single line, body collapsed and truncated to cli.CommentBriefTrunc runes.
func CommentsHeader ¶
func ComponentsTable ¶
func ComponentsTable(w io.Writer, components []jira.NamedField)
func FilterInteresting ¶
FilterInteresting keeps required fields and fields with allowed-value hints.
func GanttReport ¶
GanttReport prints the plan as text: totals, flagged issues, dependencies, the chart, the schedule table, and the issues without dates.
func InvalidValuesError ¶
func InvalidValuesError(fhc FieldHintCmd, target string, mismatches []FieldMismatch) error
InvalidValuesError retains mismatches and command-specific correction examples.
func IssueDetail ¶
IssueDetail prints an issue's fields and description. startField is the ID of the start date field; "" leaves the Start line out.
func IssueTable ¶
IssueTable prints one line per issue. The DUE column appears when at least one issue has a due date.
func IssueTypesTable ¶
func IssueTypesTable(w io.Writer, types []jira.IssueTypeInfo)
func Links ¶
func Links(w io.Writer, links []ParsedLink)
func MetaSection ¶
MetaSection prints transitions and editable fields, omitting empty sections.
func MissingFields ¶
func MissingFields(meta []jira.FieldMeta, supplied map[string]any, autoPopulated map[string]struct{}) []jira.FieldMeta
MissingFields returns required fields absent from supplied, excluding autoPopulated IDs.
func MissingFieldsError ¶
func MissingFieldsError(fhc FieldHintCmd, target string, missing []jira.FieldMeta) error
MissingFieldsError retains required fields and command-specific correction examples.
func ProjectCreateMetaBlocks ¶
func ProjectCreateMetaBlocks(w io.Writer, types []jira.IssueTypeInfo, meta map[string][]jira.FieldMeta, full bool)
ProjectCreateMetaBlocks lists fields in issue-type order. Unless full is set, it shows only required fields and fields with allowed values.
func ProjectHeader ¶
func ProjectHeader(w io.Writer, p *jira.ProjectDetail)
ProjectHeader prints project details and components.
func ProjectStatusBlocks ¶
func ProjectStatusBlocks(w io.Writer, statuses []jira.ProjectStatusGroup)
ProjectStatusBlocks lists workflow statuses by issue type.
func ProjectsTable ¶
func ProjectsTable(w io.Writer, projects []jira.ProjectRef)
func RegisterCommand ¶
RegisterCommand adds a build-local command, typically from init in an untracked internal/cmd file. Duplicate registrations panic; built-in collisions panic later in BuildCommandIndex.
func RenderFieldList ¶
RenderFieldList lists field types, allowed values, and operations. Required fields come first; fields within each group sort by name.
func SetExample ¶
SetExample returns a shell-quoted edit example, preferring a lossless typed flag.
func SetExampleFor ¶
func SetExampleFor(cmd FieldHintCmd, f jira.FieldMeta) string
SetExampleFor returns a shell-quoted example using a supported typed flag, --set for strings, or --set-json for other values.
func TransitionsRequiredFields ¶
func TransitionsRequiredFields(w io.Writer, transitions []jira.Transition)
TransitionsRequiredFields prints allowed values and examples for required transition fields.
func TransitionsTable ¶
func TransitionsTable(w io.Writer, transitions []jira.Transition)
func UnknownFieldIDs ¶
UnknownFieldIDs returns supplied field IDs absent from metadata, sorted by ID.
func UnknownFieldsError ¶
UnknownFieldsError retains editable choices for both human and JSON errors.
Types ¶
type Downloadable ¶
Downloadable exposes attachment metadata for Jira and Confluence downloads.
type FieldHintCmd ¶
type FieldHintCmd int
FieldHintCmd selects the command's supported flags for field examples.
const ( FieldHintCreate FieldHintCmd = iota FieldHintEdit FieldHintTransition )
type FieldMismatch ¶
type FieldMismatch struct {
Field jira.FieldMeta
Supplied any // value as the caller passed it (post-applyValueFlags)
Allowed []string // labels that would have matched
}
FieldMismatch describes a supplied value outside the field's allowed set.
func MismatchedValues ¶
func MismatchedValues(meta []jira.FieldMeta, supplied map[string]any) []FieldMismatch
MismatchedValues returns values outside their allowed sets in stable order. Fields absent from metadata or without allowed values are skipped.
type MetaViewResult ¶
type MetaViewResult struct {
Issue jsontext.Value `json:"issue"`
EditMeta []jira.FieldMeta `json:"edit_meta"`
MetaTransitions []jira.Transition `json:"transitions"`
}
MetaViewResult is the view --meta payload without --full.
type ParsedLink ¶
type ParsedLink struct {
Direction string `json:"direction"` // "outward", "inward", or "remote"
Type string `json:"type"`
Key string `json:"key"`
Summary string `json:"summary"`
Status string `json:"status"`
}
ParsedLink is the text and JSON representation of an issue or remote link.
func AppendRemoteLinks ¶
func AppendRemoteLinks(links []ParsedLink, remoteLinks []jira.RemoteLink) []ParsedLink
AppendRemoteLinks appends remote links without deduplication.
func IssueLinksToDisplay ¶
func IssueLinksToDisplay(issueLinks []jira.IssueLink) []ParsedLink
type ProjectViewResult ¶
type ProjectViewResult struct {
Project *jira.ProjectDetail `json:"project"`
Statuses []jira.ProjectStatusGroup `json:"statuses,omitzero"`
CreateMeta map[string][]jira.FieldMeta `json:"create_meta,omitzero"`
}
ProjectViewResult is the project JSON payload. Focused mode omits statuses and includes create metadata for one issue type.
type SearchFilters ¶
type SearchFilters struct {
Project string
Status string
Assignee string
IssueType string
Priority string
Label string
Component string
Text string
}
SearchFilters holds search and count criteria. Empty fields are ignored.
type SmartViewResult ¶
type SmartViewResult struct {
Issue jsontext.Value `json:"issue"`
Links []ParsedLink `json:"links"`
Checklist []checklist.Item `json:"checklist"`
Forms []jira.FormDetail `json:"forms"`
Comments []jira.Comment `json:"comments"`
Children []jira.Issue `json:"children"`
EditMeta []jira.FieldMeta `json:"edit_meta,omitzero"`
MetaTransitions []jira.Transition `json:"transitions,omitzero"`
}
SmartViewResult is the view --full payload. Collections are arrays, not null; metadata fields are included only with --meta.
Source Files
¶
- attachment.go
- board.go
- checklist.go
- comment.go
- components.go
- count.go
- create.go
- edit.go
- fieldhint.go
- format_comments.go
- format_forms.go
- format_issue.go
- format_links.go
- forms.go
- gantt.go
- gantt_format.go
- history.go
- init.go
- link.go
- project.go
- projects.go
- recent.go
- registry.go
- schema.go
- search.go
- smart_view_types.go
- sprints.go
- transition.go
- transition_bulk.go
- url.go
- users.go
- util_download.go
- view.go
- watch.go
- wiki.go
- wiki_attachments.go
- wiki_page.go