Documentation
¶
Index ¶
- func FormatFlexibleTime(t api.FlexibleTime, format TimeFormat) string
- func FormatTime(t time.Time, format TimeFormat) string
- type ArtifactListOptions
- type ArtifactListPrinter
- type Format
- type IssueListOptions
- type IssueListPrinter
- type PRListOptions
- type PRListPrinter
- type RepoListOptions
- type RepoListPrinter
- type TimeFormat
- type WorkflowJobListOptions
- type WorkflowJobListPrinter
- type WorkflowRunListOptions
- type WorkflowRunListPrinter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatFlexibleTime ¶
func FormatFlexibleTime(t api.FlexibleTime, format TimeFormat) string
FormatFlexibleTime renders a FlexibleTime using the requested display style.
func FormatTime ¶
func FormatTime(t time.Time, format TimeFormat) string
FormatTime renders a time using the requested display style.
Types ¶
type ArtifactListOptions ¶ added in v0.8.0
type ArtifactListOptions struct {
Format Format
Color *iostreams.ColorScheme
}
ArtifactListOptions configures artifact list text output.
type ArtifactListPrinter ¶ added in v0.8.0
type ArtifactListPrinter struct {
// contains filtered or unexported fields
}
ArtifactListPrinter renders artifact lists.
func NewArtifactListPrinter ¶ added in v0.8.0
func NewArtifactListPrinter(opts ArtifactListOptions) (*ArtifactListPrinter, error)
NewArtifactListPrinter validates and returns an artifact printer.
type IssueListOptions ¶
type IssueListOptions struct {
Format Format
TimeFormat TimeFormat
Template string
Color *iostreams.ColorScheme
}
IssueListOptions configures issue list text output.
type IssueListPrinter ¶
type IssueListPrinter struct {
// contains filtered or unexported fields
}
IssueListPrinter renders issues for text and template outputs.
func NewIssueListPrinter ¶
func NewIssueListPrinter(opts IssueListOptions) (*IssueListPrinter, error)
NewIssueListPrinter validates and returns a printer for issue lists.
type PRListOptions ¶
type PRListOptions struct {
Format Format
Color *iostreams.ColorScheme
}
PRListOptions configures PR list text output.
type PRListPrinter ¶
type PRListPrinter struct {
// contains filtered or unexported fields
}
PRListPrinter renders pull request lists.
func NewPRListPrinter ¶
func NewPRListPrinter(opts PRListOptions) (*PRListPrinter, error)
NewPRListPrinter validates and returns a PR printer.
func (*PRListPrinter) Print ¶
func (p *PRListPrinter) Print(w io.Writer, prs []api.PullRequest) error
Print renders PRs according to the configured format.
type RepoListOptions ¶
type RepoListOptions struct {
Format Format
}
RepoListOptions configures repo list text output.
type RepoListPrinter ¶
type RepoListPrinter struct {
// contains filtered or unexported fields
}
RepoListPrinter renders repository lists.
func NewRepoListPrinter ¶
func NewRepoListPrinter(opts RepoListOptions) (*RepoListPrinter, error)
NewRepoListPrinter validates and returns a repository printer.
func (*RepoListPrinter) Print ¶
func (p *RepoListPrinter) Print(w io.Writer, repos []api.Repository) error
Print renders repositories according to the configured format.
type TimeFormat ¶
type TimeFormat string
TimeFormat controls how timestamps are rendered in text output.
const ( TimeFormatAbsolute TimeFormat = "absolute" TimeFormatRelative TimeFormat = "relative" )
func ParseTimeFormat ¶
func ParseTimeFormat(raw string) (TimeFormat, error)
ParseTimeFormat validates a string time-format value.
type WorkflowJobListOptions ¶ added in v0.8.0
type WorkflowJobListOptions struct {
Format Format
Color *iostreams.ColorScheme
}
WorkflowJobListOptions configures workflow job list text output.
type WorkflowJobListPrinter ¶ added in v0.8.0
type WorkflowJobListPrinter struct {
// contains filtered or unexported fields
}
WorkflowJobListPrinter renders workflow job lists.
func NewWorkflowJobListPrinter ¶ added in v0.8.0
func NewWorkflowJobListPrinter(opts WorkflowJobListOptions) (*WorkflowJobListPrinter, error)
NewWorkflowJobListPrinter validates and returns a workflow job printer.
func (*WorkflowJobListPrinter) Print ¶ added in v0.8.0
func (p *WorkflowJobListPrinter) Print(w io.Writer, jobs []api.WorkflowRunJob) error
Print renders workflow jobs according to the configured format.
type WorkflowRunListOptions ¶ added in v0.8.0
type WorkflowRunListOptions struct {
Format Format
Color *iostreams.ColorScheme
}
WorkflowRunListOptions configures workflow run list text output.
type WorkflowRunListPrinter ¶ added in v0.8.0
type WorkflowRunListPrinter struct {
// contains filtered or unexported fields
}
WorkflowRunListPrinter renders workflow run lists.
func NewWorkflowRunListPrinter ¶ added in v0.8.0
func NewWorkflowRunListPrinter(opts WorkflowRunListOptions) (*WorkflowRunListPrinter, error)
NewWorkflowRunListPrinter validates and returns a workflow run printer.
func (*WorkflowRunListPrinter) Print ¶ added in v0.8.0
func (p *WorkflowRunListPrinter) Print(w io.Writer, runs []api.WorkflowRun) error
Print renders workflow runs according to the configured format.
Source Files
¶
- artifacts.go
- format.go
- issues.go
- jobs.go
- prs.go
- repos.go
- runs.go
- time.go