Versions in this module Expand all Collapse all v1 v1.2.0 Jul 31, 2026 v1.1.4 Jul 22, 2026 v1.1.3 Jul 21, 2026 v1.1.2 Jul 21, 2026 v1.1.1 Jul 21, 2026 v1.1.0 Jul 20, 2026 Changes in this version + const ExitCodeBadUserInputErr + const ExitCodeInternalErr + const ExitCodeOK + func DefaultHelpFunc(a ActionsInterface, cmd *spec.CommandItem) + func DefaultUsageFunc(a ActionsInterface, cmd *spec.CommandItem) error + func NewCmdPetstore(a ActionsInterface) *cobra.Command + func NewCmdPetstoreList(a ActionsInterface) *cobra.Command + func NewCmdPetstorePet(a ActionsInterface) *cobra.Command + func NewCmdPetstorePetAdd(a ActionsInterface) *cobra.Command + func NewCmdPetstorePetDelete(a ActionsInterface) *cobra.Command + func NewCmdPetstorePetFindByStatus(a ActionsInterface) *cobra.Command + func NewCmdPetstorePetFindByTags(a ActionsInterface) *cobra.Command + func NewCmdPetstorePetGet(a ActionsInterface) *cobra.Command + func NewCmdPetstorePetUpdate(a ActionsInterface) *cobra.Command + func NewCmdPetstorePetUpdateForm(a ActionsInterface) *cobra.Command + func NewCmdPetstorePetUploadImage(a ActionsInterface) *cobra.Command + func NewCmdPetstoreStore(a ActionsInterface) *cobra.Command + func NewCmdPetstoreStoreInventory(a ActionsInterface) *cobra.Command + func NewCmdPetstoreStoreOrder(a ActionsInterface) *cobra.Command + func NewCmdPetstoreStoreOrderDelete(a ActionsInterface) *cobra.Command + func NewCmdPetstoreStoreOrderGet(a ActionsInterface) *cobra.Command + func NewCmdPetstoreStoreOrderPlace(a ActionsInterface) *cobra.Command + func NewCmdPetstoreUser(a ActionsInterface) *cobra.Command + func NewCmdPetstoreUserCreate(a ActionsInterface) *cobra.Command + func NewCmdPetstoreUserCreateWithList(a ActionsInterface) *cobra.Command + func NewCmdPetstoreUserDelete(a ActionsInterface) *cobra.Command + func NewCmdPetstoreUserGet(a ActionsInterface) *cobra.Command + func NewCmdPetstoreUserLogin(a ActionsInterface) *cobra.Command + func NewCmdPetstoreUserLogout(a ActionsInterface) *cobra.Command + func NewCmdPetstoreUserUpdate(a ActionsInterface) *cobra.Command + func Run(ctx context.Context, actions ActionsInterface) int + type ActionsInterface interface + HelpFunc func(cmd *spec.CommandItem) + IOStreams func() IOStreams + PetstoreList func(ctx context.Context, args PetstoreListArgs) error + PetstorePetAdd func(ctx context.Context, args PetstorePetAddArgs, flags PetstorePetAddFlags) error + PetstorePetDelete func(ctx context.Context, flags PetstorePetDeleteFlags) error + PetstorePetFindByStatus func(ctx context.Context, flags PetstorePetFindByStatusFlags) error + PetstorePetFindByTags func(ctx context.Context, flags PetstorePetFindByTagsFlags) error + PetstorePetGet func(ctx context.Context, flags PetstorePetGetFlags) error + PetstorePetUpdate func(ctx context.Context, args PetstorePetUpdateArgs, flags PetstorePetUpdateFlags) error + PetstorePetUpdateForm func(ctx context.Context, flags PetstorePetUpdateFormFlags) error + PetstorePetUploadImage func(ctx context.Context, args PetstorePetUploadImageArgs, ...) error + PetstoreStoreInventory func(ctx context.Context) error + PetstoreStoreOrderDelete func(ctx context.Context, args PetstoreStoreOrderDeleteArgs) error + PetstoreStoreOrderGet func(ctx context.Context, flags PetstoreStoreOrderGetFlags) error + PetstoreStoreOrderPlace func(ctx context.Context, args PetstoreStoreOrderPlaceArgs, ...) error + PetstoreUserCreate func(ctx context.Context, args PetstoreUserCreateArgs, ...) error + PetstoreUserCreateWithList func(ctx context.Context, args PetstoreUserCreateWithListArgs) error + PetstoreUserDelete func(ctx context.Context, flags PetstoreUserDeleteFlags) error + PetstoreUserGet func(ctx context.Context, flags PetstoreUserGetFlags) error + PetstoreUserLogin func(ctx context.Context, flags PetstoreUserLoginFlags) error + PetstoreUserLogout func(ctx context.Context) error + PetstoreUserUpdate func(ctx context.Context, flags PetstoreUserUpdateFlags) error + UsageFunc func(cmd *spec.CommandItem) error + Version func() string + type CLIError struct + Code int + Message string + UsageFunc UsageFunc + func BadUserInput(message string, usageFn UsageFunc) *CLIError + func InternalError(message string, usageFn UsageFunc) *CLIError + func (err CLIError) Error() string + type DefaultIOStreams struct + func (ios DefaultIOStreams) ErrOut() FileWriter + func (ios DefaultIOStreams) In() FileReader + func (ios DefaultIOStreams) Out() FileWriter + func (ios DefaultIOStreams) TerminalSize() (int, int, error) + func (ios DefaultIOStreams) TerminalTheme() string + type DefaultTerminal struct + func (t *DefaultTerminal) Is256ColorSupported() bool + func (t *DefaultTerminal) IsTerminalOutput() bool + func (t *DefaultTerminal) IsTrueColorSupported() bool + func (t *DefaultTerminal) Size() (int, int, error) + func (t *DefaultTerminal) Theme() string + type FileReader interface + Fd func() uintptr + type FileWriter interface + Fd func() uintptr + type IOStreams interface + ErrOut func() FileWriter + In func() FileReader + Out func() FileWriter + TerminalSize func() (int, int, error) + TerminalTheme func() string + func DefaultIOS() IOStreams + func TestIOS() (IOStreams, *bytes.Buffer, *bytes.Buffer, *bytes.Buffer) + type PetstoreListArgs struct + HttpArguments string + type PetstorePetAddArgs struct + PathToReqBody string + type PetstorePetAddFlags struct + Name string + PhotoUrls []string + Status PetstorePetAddStatus + Tag []string + type PetstorePetAddStatus string + const PetstorePetAddStatusAvailable + const PetstorePetAddStatusPending + const PetstorePetAddStatusSold + func (v PetstorePetAddStatus) IsValid() bool + type PetstorePetDeleteFlags struct + ApiKey string + Id int64 + type PetstorePetFindByStatusFlags struct + Status PetstorePetFindByStatusStatus + type PetstorePetFindByStatusStatus string + const PetstorePetFindByStatusStatusAvailable + const PetstorePetFindByStatusStatusPending + const PetstorePetFindByStatusStatusSold + func (v PetstorePetFindByStatusStatus) IsValid() bool + type PetstorePetFindByTagsFlags struct + Tags []string + type PetstorePetGetFlags struct + Id int64 + type PetstorePetUpdateArgs struct + PathToReqBody string + type PetstorePetUpdateFlags struct + Name string + PhotoUrls []string + Status PetstorePetUpdateStatus + Tags []string + type PetstorePetUpdateFormFlags struct + Id int64 + Name string + Status PetstorePetUpdateFormStatus + type PetstorePetUpdateFormStatus string + const PetstorePetUpdateFormStatusAvailable + const PetstorePetUpdateFormStatusPending + const PetstorePetUpdateFormStatusSold + func (v PetstorePetUpdateFormStatus) IsValid() bool + type PetstorePetUpdateStatus string + const PetstorePetUpdateStatusAvailable + const PetstorePetUpdateStatusPending + const PetstorePetUpdateStatusSold + func (v PetstorePetUpdateStatus) IsValid() bool + type PetstorePetUploadImageArgs struct + PathToFile string + type PetstorePetUploadImageFlags struct + AdditionalMetadata string + Id int64 + type PetstoreStoreOrderDeleteArgs struct + Id string + type PetstoreStoreOrderGetFlags struct + Id int64 + type PetstoreStoreOrderPlaceArgs struct + PathToOrderBody string + type PetstoreStoreOrderPlaceFlags struct + Complete bool + PetId int64 + Quantity int64 + Status PetstoreStoreOrderPlaceStatus + type PetstoreStoreOrderPlaceStatus string + const PetstoreStoreOrderPlaceStatusApproved + const PetstoreStoreOrderPlaceStatusDelivered + const PetstoreStoreOrderPlaceStatusPlaced + func (v PetstoreStoreOrderPlaceStatus) IsValid() bool + type PetstoreUserCreateArgs struct + PathToUserBody string + type PetstoreUserCreateFlags struct + Email string + FirstName string + LastName string + Password string + Phone string + Status int64 + Username string + type PetstoreUserCreateWithListArgs struct + PathToUsersBody string + type PetstoreUserDeleteFlags struct + Username string + type PetstoreUserGetFlags struct + Username string + type PetstoreUserLoginFlags struct + Password string + Username string + type PetstoreUserUpdateFlags struct + Email string + FirstName string + LastName string + Password string + Phone string + UserStatus int64 + Username string + type Terminal interface + Is256ColorSupported func() bool + IsTerminalOutput func() bool + IsTrueColorSupported func() bool + Size func() (int, int, error) + Theme func() string + type UsageFunc func() error + type ValidationError struct + Message string + func NewValidationError(message string) *ValidationError + func (err ValidationError) Error() string