Documentation
¶
Index ¶
- Variables
- func WithTabWriter(writer io.Writer, header []string, f func(TabWriter) error) (retErr error)
- type Format
- type OrganizationPrinter
- type PluginPrinter
- type PluginVersionPrinter
- type RepositoryBranchPrinter
- type RepositoryCommitPrinter
- type RepositoryPrinter
- type RepositoryTagPrinter
- type TabWriter
- type TemplatePrinter
- type TemplateVersionPrinter
- type TokenPrinter
Constants ¶
This section is empty.
Variables ¶
var ( // AllFormatsString is the string representation of all Formats. AllFormatsString = stringutil.SliceToString([]string{FormatText.String(), FormatJSON.String()}) )
Functions ¶
Types ¶
type Format ¶
type Format int
Format is a format to print.
func ParseFormat ¶
ParseFormat parses the format.
If the empty string is provided, this is interpeted as FormatText.
type OrganizationPrinter ¶
type OrganizationPrinter interface {
PrintOrganization(ctx context.Context, format Format, organization *registryv1alpha1.Organization) error
}
OrganizationPrinter is an organization printer.
func NewOrganizationPrinter ¶
func NewOrganizationPrinter(address string, writer io.Writer) OrganizationPrinter
NewOrganizationPrinter returns a new OrganizationPrinter.
type PluginPrinter ¶
type PluginPrinter interface {
PrintPlugin(ctx context.Context, format Format, plugin *registryv1alpha1.Plugin) error
PrintPlugins(ctx context.Context, format Format, nextPageToken string, plugins ...*registryv1alpha1.Plugin) error
}
PluginPrinter is a printer for plugins.
func NewPluginPrinter ¶
func NewPluginPrinter(writer io.Writer) PluginPrinter
NewPluginPrinter returns a new PluginPrinter.
type PluginVersionPrinter ¶
type PluginVersionPrinter interface {
PrintPluginVersions(ctx context.Context, format Format, nextPageToken string, pluginVersions ...*registryv1alpha1.PluginVersion) error
}
PluginVersionPrinter is a printer for PluginVersions.
func NewPluginVersionPrinter ¶
func NewPluginVersionPrinter(writer io.Writer) PluginVersionPrinter
NewPluginVersionPrinter returns a new NewPluginVersionPrinter.
type RepositoryBranchPrinter ¶
type RepositoryBranchPrinter interface {
PrintRepositoryBranch(ctx context.Context, format Format, repositoryBranch *registryv1alpha1.RepositoryBranch) error
PrintRepositoryBranches(ctx context.Context, format Format, nextPageToken string, repositoryBranches ...*registryv1alpha1.RepositoryBranch) error
}
RepositoryBranchPrinter is a repository branch printer.
func NewRepositoryBranchPrinter ¶
func NewRepositoryBranchPrinter(writer io.Writer) RepositoryBranchPrinter
NewRepositoryBranchPrinter returns a new RepositoryBranchPrinter.
type RepositoryCommitPrinter ¶
type RepositoryCommitPrinter interface {
PrintRepositoryCommit(ctx context.Context, format Format, repositoryCommit *registryv1alpha1.RepositoryCommit) error
PrintRepositoryCommits(ctx context.Context, format Format, nextPageToken string, repositoryCommits ...*registryv1alpha1.RepositoryCommit) error
}
RepositoryCommitPrinter is a repository commit printer.
func NewRepositoryCommitPrinter ¶
func NewRepositoryCommitPrinter(writer io.Writer) RepositoryCommitPrinter
NewRepositoryCommitPrinter returns a new RepositoryCommitPrinter.
type RepositoryPrinter ¶
type RepositoryPrinter interface {
PrintRepository(ctx context.Context, format Format, repository *registryv1alpha1.Repository) error
PrintRepositories(ctx context.Context, format Format, nextPageToken string, repositories ...*registryv1alpha1.Repository) error
}
RepositoryPrinter is a repository printer.
func NewRepositoryPrinter ¶
func NewRepositoryPrinter( apiProvider registryv1alpha1apiclient.Provider, address string, writer io.Writer, ) RepositoryPrinter
NewRepositoryPrinter returns a new RepositoryPrinter.
type RepositoryTagPrinter ¶
type RepositoryTagPrinter interface {
PrintRepositoryTag(ctx context.Context, format Format, repositoryTag *registryv1alpha1.RepositoryTag) error
PrintRepositoryTags(ctx context.Context, format Format, nextPageToken string, repositoryTags ...*registryv1alpha1.RepositoryTag) error
}
RepositoryTagPrinter is a repository tag printer.
func NewRepositoryTagPrinter ¶
func NewRepositoryTagPrinter(writer io.Writer) RepositoryTagPrinter
NewRepositoryTagPrinter returns a new RepositoryTagPrinter.
type TemplatePrinter ¶
type TemplatePrinter interface {
PrintTemplate(ctx context.Context, format Format, template *registryv1alpha1.Template) error
PrintTemplates(ctx context.Context, format Format, nextPageToken string, templates ...*registryv1alpha1.Template) error
}
TemplatePrinter is a printer for Templates.
func NewTemplatePrinter ¶
func NewTemplatePrinter(writer io.Writer) TemplatePrinter
NewTemplatePrinter returns a new NewTemplatePrinter.
type TemplateVersionPrinter ¶
type TemplateVersionPrinter interface {
PrintTemplateVersion(ctx context.Context, format Format, templateVersion *registryv1alpha1.TemplateVersion) error
PrintTemplateVersions(ctx context.Context, format Format, nextPageToken string, templateVersions ...*registryv1alpha1.TemplateVersion) error
}
TemplateVersionPrinter is a printer for TemplateVersions.
func NewTemplateVersionPrinter ¶
func NewTemplateVersionPrinter(writer io.Writer) TemplateVersionPrinter
NewTemplateVersionPrinter returns a new NewTemplateVersionPrinter.
type TokenPrinter ¶
type TokenPrinter interface {
PrintTokens(ctx context.Context, tokens ...*registryv1alpha1.Token) error
}
TokenPrinter is a printer Tokens.
TODO: update to same format as other printers.
func NewTokenPrinter ¶
func NewTokenPrinter(writer io.Writer, format Format) (TokenPrinter, error)
NewTokenPrinter returns a new TokenPrinter.
TODO: update to same format as other printers.
Source Files
¶
- bufprint.go
- organization_printer.go
- pagination_wrapper.go
- plugin_printer.go
- plugin_version_printer.go
- repository_branch_printer.go
- repository_commit_printer.go
- repository_printer.go
- repository_tag_printer.go
- tab_writer.go
- template_printer.go
- template_version_printer.go
- token_json_printer.go
- token_text_printer.go
- usage.gen.go