Documentation ¶
Index ¶
- Variables
- func Helper(name, description string, tw *tabwriter.Writer)
- type AdminConfig
- type ArticlesCommand
- type AuthCommand
- type Command
- type CommandI
- type CommandLine
- type CommandValidationError
- type CommentsCommand
- type FollowersCommand
- type ListingsCommand
- type OrganizationsCommand
- func (c *OrganizationsCommand) ActivateSubcommand(name string) error
- func (c *OrganizationsCommand) Helper(tw *tabwriter.Writer)
- func (c *OrganizationsCommand) Run() CommandValidationError
- func (c *OrganizationsCommand) SetData(data string)
- func (c *OrganizationsCommand) Validate() CommandValidationError
- type PodcastsCommand
- type ProfileImageCommand
- func (c *ProfileImageCommand) ActivateSubcommand(name string) error
- func (c *ProfileImageCommand) Helper(tw *tabwriter.Writer)
- func (c *ProfileImageCommand) Run() CommandValidationError
- func (c *ProfileImageCommand) SetData(data string)
- func (c *ProfileImageCommand) Validate() CommandValidationError
- type ReadingListsCommand
- func (c *ReadingListsCommand) ActivateSubcommand(name string) error
- func (c *ReadingListsCommand) Helper(tw *tabwriter.Writer)
- func (c *ReadingListsCommand) Run() CommandValidationError
- func (c *ReadingListsCommand) SetData(data string)
- func (c *ReadingListsCommand) Validate() CommandValidationError
- type Subcommand
- type TagsCommand
- type WebhooksCommand
Constants ¶
This section is empty.
Variables ¶
var ( NetworkTimeoutError = errors.New(toBoldRed("TIMEOUT NETWORK ERROR: Make sure you have internet connection.")) NetworkTemporaryError = errors.New(toBoldRed("TEMPORARY NETWORK ERROR: Make sure you have internet connection.")) InputError = errors.New(toBoldRed("INPUT ERROR: Make sure you entered a correct type argument.")) ApiKeyMissing = errors.New(toBoldRed("API_KEY is empty, provide one with the auth command")) )
Functions ¶
Types ¶
type AdminConfig ¶
type AdminConfig Command
func NewAdminConfigCmd ¶
func NewAdminConfigCmd() *AdminConfig
func (*AdminConfig) ActivateSubcommand ¶
func (c *AdminConfig) ActivateSubcommand(name string) error
ActivateSubcommand ...
func (*AdminConfig) Helper ¶
func (c *AdminConfig) Helper(tw *tabwriter.Writer)
Helper display info about the command
func (*AdminConfig) Run ¶
func (c *AdminConfig) Run() CommandValidationError
Run execute the command
func (*AdminConfig) Validate ¶
func (c *AdminConfig) Validate() CommandValidationError
Validate execute the command
type ArticlesCommand ¶
type ArticlesCommand Command
func NewArticlesCmd ¶
func NewArticlesCmd() *ArticlesCommand
func (*ArticlesCommand) ActivateSubcommand ¶
func (c *ArticlesCommand) ActivateSubcommand(name string) error
ActivateSubcommand ...
func (*ArticlesCommand) Helper ¶
func (c *ArticlesCommand) Helper(tw *tabwriter.Writer)
Helper display info about the command
func (*ArticlesCommand) Run ¶
func (c *ArticlesCommand) Run() CommandValidationError
Run execute the command
func (*ArticlesCommand) Validate ¶
func (c *ArticlesCommand) Validate() CommandValidationError
Validate check for the preconditions to execute this command
type AuthCommand ¶
type AuthCommand Command
func NewAuthCmd ¶
func NewAuthCmd() *AuthCommand
func (*AuthCommand) Helper ¶
func (c *AuthCommand) Helper(tw *tabwriter.Writer)
Helper display info about the command
func (*AuthCommand) Run ¶
func (c *AuthCommand) Run() CommandValidationError
Run execute the command
func (*AuthCommand) Validate ¶
func (c *AuthCommand) Validate() CommandValidationError
Validate check for the preconditions to execute this command
type Command ¶
type Command struct { Name string Description string Data string Subcommands map[string]*Subcommand }
Command main struture for a command
func (*Command) ActivateSubcommand ¶
ActivateSubcommand ...
type CommandI ¶
type CommandI interface { Run() CommandValidationError Helper(*tabwriter.Writer) }
CommandI actions that can be excecuted by a Command
type CommandLine ¶
type CommandLine struct { Commands []CommandI // contains filtered or unexported fields }
var (
Cli *CommandLine
)
func NewCli ¶
func NewCli() *CommandLine
func (*CommandLine) Execute ¶
func (cli *CommandLine) Execute()
type CommandValidationError ¶
type CommandValidationError error
CommandValidationError ...
func NewCommandError ¶
func NewCommandError(description string) CommandValidationError
NewCommandError ...
type CommentsCommand ¶
type CommentsCommand Command
func NewCommentsCommand ¶
func NewCommentsCommand() *CommentsCommand
func (*CommentsCommand) ActivateSubcommand ¶
func (c *CommentsCommand) ActivateSubcommand(name string) error
ActivateSubcommand ...
func (*CommentsCommand) Helper ¶
func (c *CommentsCommand) Helper(tw *tabwriter.Writer)
Helper display info about the command
func (*CommentsCommand) Run ¶
func (c *CommentsCommand) Run() CommandValidationError
Run execute the command
func (*CommentsCommand) Validate ¶
func (c *CommentsCommand) Validate() CommandValidationError
Validate check for the preconditions to execute this command
type FollowersCommand ¶
type FollowersCommand Command
func NewFollowersCommand ¶
func NewFollowersCommand() *FollowersCommand
func (*FollowersCommand) ActivateSubcommand ¶
func (c *FollowersCommand) ActivateSubcommand(name string) error
ActivateSubcommand ...
func (*FollowersCommand) Helper ¶
func (c *FollowersCommand) Helper(tw *tabwriter.Writer)
Helper display info about the command
func (*FollowersCommand) Run ¶
func (c *FollowersCommand) Run() CommandValidationError
Run execute the command
func (*FollowersCommand) Validate ¶
func (c *FollowersCommand) Validate() CommandValidationError
Validate check for the preconditions to execute this command
type ListingsCommand ¶
type ListingsCommand Command
func NewListingsCommand ¶
func NewListingsCommand() *ListingsCommand
func (*ListingsCommand) ActivateSubcommand ¶
func (c *ListingsCommand) ActivateSubcommand(name string) error
ActivateSubcommand ...
func (*ListingsCommand) Helper ¶
func (c *ListingsCommand) Helper(tw *tabwriter.Writer)
Helper display info about the command
func (*ListingsCommand) Run ¶
func (c *ListingsCommand) Run() CommandValidationError
Run execute the command
func (*ListingsCommand) Validate ¶
func (c *ListingsCommand) Validate() CommandValidationError
Validate check for the preconditions to execute this command
type OrganizationsCommand ¶
type OrganizationsCommand Command
func NewOrganizationsCommand ¶
func NewOrganizationsCommand() *OrganizationsCommand
func (*OrganizationsCommand) ActivateSubcommand ¶
func (c *OrganizationsCommand) ActivateSubcommand(name string) error
ActivateSubcommand ...
func (*OrganizationsCommand) Helper ¶
func (c *OrganizationsCommand) Helper(tw *tabwriter.Writer)
Helper display info about the command
func (*OrganizationsCommand) Run ¶
func (c *OrganizationsCommand) Run() CommandValidationError
Run execute the command
func (*OrganizationsCommand) SetData ¶
func (c *OrganizationsCommand) SetData(data string)
SetData ...
func (*OrganizationsCommand) Validate ¶
func (c *OrganizationsCommand) Validate() CommandValidationError
Validate check for the preconditions to execute this command
type PodcastsCommand ¶
type PodcastsCommand Command
func NewPodcastsCommand ¶
func NewPodcastsCommand() *PodcastsCommand
func (*PodcastsCommand) ActivateSubcommand ¶
func (c *PodcastsCommand) ActivateSubcommand(name string) error
ActivateSubcommand ...
func (*PodcastsCommand) Helper ¶
func (c *PodcastsCommand) Helper(tw *tabwriter.Writer)
Helper display info about the command
func (*PodcastsCommand) Run ¶
func (c *PodcastsCommand) Run() CommandValidationError
Run execute the command
func (*PodcastsCommand) Validate ¶
func (c *PodcastsCommand) Validate() CommandValidationError
Validate check for the preconditions to execute this command
type ProfileImageCommand ¶
type ProfileImageCommand Command
func NewProfileImageCmd ¶
func NewProfileImageCmd() *ProfileImageCommand
func (*ProfileImageCommand) ActivateSubcommand ¶
func (c *ProfileImageCommand) ActivateSubcommand(name string) error
ActivateSubcommand ...
func (*ProfileImageCommand) Helper ¶
func (c *ProfileImageCommand) Helper(tw *tabwriter.Writer)
Helper display info about the command
func (*ProfileImageCommand) Run ¶
func (c *ProfileImageCommand) Run() CommandValidationError
Run execute the command
func (*ProfileImageCommand) SetData ¶
func (c *ProfileImageCommand) SetData(data string)
SetData ...
func (*ProfileImageCommand) Validate ¶
func (c *ProfileImageCommand) Validate() CommandValidationError
Validate check for the preconditions to execute this command
type ReadingListsCommand ¶
type ReadingListsCommand Command
func NewReadingListsCommand ¶
func NewReadingListsCommand() *ReadingListsCommand
func (*ReadingListsCommand) ActivateSubcommand ¶
func (c *ReadingListsCommand) ActivateSubcommand(name string) error
ActivateSubcommand ...
func (*ReadingListsCommand) Helper ¶
func (c *ReadingListsCommand) Helper(tw *tabwriter.Writer)
Helper display info about the command
func (*ReadingListsCommand) Run ¶
func (c *ReadingListsCommand) Run() CommandValidationError
Run execute the command
func (*ReadingListsCommand) SetData ¶
func (c *ReadingListsCommand) SetData(data string)
SetData ...
func (*ReadingListsCommand) Validate ¶
func (c *ReadingListsCommand) Validate() CommandValidationError
Validate check for the preconditions to execute this command
type Subcommand ¶
type TagsCommand ¶
type TagsCommand Command
func NewTagsCommand ¶
func NewTagsCommand() *TagsCommand
func (*TagsCommand) ActivateSubcommand ¶
func (c *TagsCommand) ActivateSubcommand(name string) error
ActivateSubcommand ...
func (*TagsCommand) Helper ¶
func (c *TagsCommand) Helper(tw *tabwriter.Writer)
Helper display info about the command
func (*TagsCommand) Run ¶
func (c *TagsCommand) Run() CommandValidationError
Run execute the command
func (*TagsCommand) Validate ¶
func (c *TagsCommand) Validate() CommandValidationError
Validate check for the preconditions to execute this command
type WebhooksCommand ¶
type WebhooksCommand Command
func NewWebhooksCmd ¶
func NewWebhooksCmd() *WebhooksCommand
func (*WebhooksCommand) ActivateSubcommand ¶
func (c *WebhooksCommand) ActivateSubcommand(name string) error
ActivateSubcommand ...
func (*WebhooksCommand) Helper ¶
func (c *WebhooksCommand) Helper(tw *tabwriter.Writer)
Helper display info about the command
func (*WebhooksCommand) Run ¶
func (c *WebhooksCommand) Run() CommandValidationError
Run execute the command
func (*WebhooksCommand) Validate ¶
func (c *WebhooksCommand) Validate() CommandValidationError
Validate check for the preconditions to execute this command