Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
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 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.
Click to show internal directories.
Click to hide internal directories.