Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Blue = "\033[34m"
var CliContext godoo.ICliContext
var Cyan = "\033[36m"
var Gray = "\033[37m"
var Green = "\033[32m"
var Purple = "\033[35m"
var Red = "\033[31m"
var Reset = "\033[0m"
var White = "\033[97m"
var Yellow = "\033[33m"
Functions ¶
This section is empty.
Types ¶
type AddCommand ¶
type AddCommand struct {
// contains filtered or unexported fields
}
AddCommand implements the ICommand interface and lets the user add new items to storage
func NewAddCommand ¶
func NewAddCommand(config *godoo.ConfigVals) *AddCommand
Returns a new AddCommand, but also sets up the flagset and parser
func (*AddCommand) BuildItemFromInput ¶
func (aCmd *AddCommand) BuildItemFromInput() (godoo.TodoItem, error)
Populates a godoo.TodoItem with user-supplied data for transer to database
func (*AddCommand) ParseInput ¶
func (aCmd *AddCommand) ParseInput() error
ParseInput implements method from ICommand interface
type EditCommand ¶
type EditCommand struct {
// contains filtered or unexported fields
}
func NewEditCommand ¶
func NewEditCommand(conf *godoo.ConfigVals) *EditCommand
Sets up flag info & parser before returning a new edit comman
func (*EditCommand) BuildItemFromInput ¶
func (eCmd *EditCommand) BuildItemFromInput() (godoo.TodoItem, error)
Populates a godoo.TodoItem with user-supplied data to pass to database for querying/editing
func (*EditCommand) DetermineQueryType ¶
func (eCmd *EditCommand) DetermineQueryType(qType godoo.QueryType) ([]godoo.UserQueryOption, error)
Interprets user input to determine intentions in both the search and edit portions of input. If no edit options provided, returns error.
func (*EditCommand) ParseInput ¶
func (eCmd *EditCommand) ParseInput() error
ParseInput implements method from ICommand interface
type GetCommand ¶
type GetCommand struct {
// contains filtered or unexported fields
}
func NewGetCommand ¶
func NewGetCommand(c *godoo.ConfigVals) *GetCommand
Returns new get command after setting up flag info and flag-parser
func (*GetCommand) BuildItemFromInput ¶
func (gCmd *GetCommand) BuildItemFromInput() (godoo.TodoItem, error)
Populates a godoo.TodoItem with user-supplied data to query database
func (*GetCommand) DetermineQueryType ¶
func (gCmd *GetCommand) DetermineQueryType(qType godoo.QueryType) ([]godoo.UserQueryOption, error)
Determines the different elements by which the user is searching for an item
func (*GetCommand) ParseInput ¶
func (g *GetCommand) ParseInput() error
ParseInput implements method from ICommand interface
type InstanceTypeNotRecognised ¶
type InstanceTypeNotRecognised struct{}
type InvalidArgumentError ¶
type InvalidArgumentError struct{}
func (*InvalidArgumentError) Error ¶
func (i *InvalidArgumentError) Error() string
type NoEditInstructionsError ¶
type NoEditInstructionsError struct{}
func (*NoEditInstructionsError) Error ¶
func (n *NoEditInstructionsError) Error() string
type UnableToDetermineQueryTypeError ¶
type UnableToDetermineQueryTypeError struct{}
func (*UnableToDetermineQueryTypeError) Error ¶
func (u *UnableToDetermineQueryTypeError) Error() string