output

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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.

func (*ArtifactListPrinter) Print added in v0.8.0

func (p *ArtifactListPrinter) Print(w io.Writer, artifacts []api.Artifact) error

Print renders artifacts according to the configured format.

type Format

type Format string

Format controls high-level output formatting.

const (
	FormatJSON   Format = "json"
	FormatSimple Format = "simple"
	FormatTable  Format = "table"
)

func ParseFormat

func ParseFormat(raw string) (Format, error)

ParseFormat validates a string format value.

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.

func (*IssueListPrinter) Print

func (p *IssueListPrinter) Print(w io.Writer, issues []api.Issue) error

Print renders an issue list according to the printer options.

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL