Documentation ¶
Index ¶
- Variables
- func PrintProtoMessageJSON(writer io.Writer, message proto.Message) error
- func WithTabWriter(writer io.Writer, header []string, f func(TabWriter) error) (retErr error)
- type Format
- type OrganizationPrinter
- type RepositoryBranchPrinter
- type RepositoryPrinter
- type RepositoryTagPrinter
- type TabWriter
- type UserPrinter
Constants ¶
This section is empty.
Variables ¶
var ( // AllFormatsString is the string representation of all Formats. AllFormatsString = stringutil.SliceToString([]string{FormatText.String(), FormatJSON.String()}) )
Functions ¶
func PrintProtoMessageJSON ¶
PrintProtoMessageJSON prints the Protobuf message as JSON.
Shared with internal packages.
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 {
PrintOrganizations(ctx context.Context, organizations ...*registryv1alpha1.Organization) error
}
OrganizationPrinter is an organization printer.
func NewOrganizationPrinter ¶
func NewOrganizationPrinter( address string, writer io.Writer, format Format, ) (OrganizationPrinter, error)
NewOrganizationPrinter returns a new OrganizationPrinter.
type RepositoryBranchPrinter ¶
type RepositoryBranchPrinter interface {
PrintRepositoryBranches(ctx context.Context, repositoryBranches ...*registryv1alpha1.RepositoryBranch) error
}
RepositoryBranchPrinter is a repository branch printer.
func NewRepositoryBranchPrinter ¶
func NewRepositoryBranchPrinter(writer io.Writer, format Format) (RepositoryBranchPrinter, error)
NewRepositoryBranchPrinter returns a new RepositoryBranchPrinter.
type RepositoryPrinter ¶
type RepositoryPrinter interface {
PrintRepositories(ctx context.Context, repositories ...*registryv1alpha1.Repository) error
}
RepositoryPrinter is a repository printer.
func NewRepositoryPrinter ¶
func NewRepositoryPrinter( apiProvider registryv1alpha1apiclient.Provider, address string, writer io.Writer, format Format, ) (RepositoryPrinter, error)
NewRepositoryPrinter returns a new RepositoryPrinter.
type RepositoryTagPrinter ¶
type RepositoryTagPrinter interface {
PrintRepositoryTags(ctx context.Context, repositoryTags ...*registryv1alpha1.RepositoryTag) error
}
RepositoryTagPrinter is a repository tag printer.
func NewRepositoryTagPrinter ¶
func NewRepositoryTagPrinter(writer io.Writer, format Format) (RepositoryTagPrinter, error)
NewRepositoryTagPrinter returns a new RepositoryTagPrinter.
type UserPrinter ¶
type UserPrinter interface {
PrintUsers(ctx context.Context, users ...*registryv1alpha1.User) error
}
UserPrinter is a user printer.
func NewUserPrinter ¶
func NewUserPrinter(writer io.Writer, format Format) (UserPrinter, error)
NewUserPrinter returns a new UserPrinter.