Documentation
¶
Index ¶
- Constants
- func AssertAutoSychronization(c *cli.Context) error
- func AssertLocalConfig(c *cli.Context) (err error)
- func AssertSave(c *cli.Context) (err error)
- func AssertSychronization(c *cli.Context) error
- func AssertValidId(c *cli.Context) error
- func ChainedContext(funcs ...func(c *cli.Context) error) func(c *cli.Context) error
- func GetDefaultDataFolder() string
- func OptionalId(c *cli.Context) error
- type Context
- type LocalConfig
Constants ¶
View Source
const ( DefaultLocalConfigFile = "config.yaml" DefaultLocalCollectionFile = "todo.yaml" )
Variables ¶
This section is empty.
Functions ¶
func AssertLocalConfig ¶
Assert configuration exists and is valid
func AssertSave ¶
func AssertSychronization ¶
func ChainedContext ¶
func GetDefaultDataFolder ¶
func GetDefaultDataFolder() string
func OptionalId ¶
Types ¶
type Context ¶
type Context struct {
DataFolder string
LocalConfigFile string
LocalCollectionFile string
LocalConfig *LocalConfig
Collection *todo.ToDoCollection
Error error
ExitMessage string
Id int // Id is the first argument that is a number
CurrentToDo *todo.ToDoItem
Args []string // Args is the list of arguments that are not numbers
CancelSaving bool
CancelSync bool
}
func ContextFromCli ¶
func ContextFromCtx ¶
func ContextFromDataFolder ¶
type LocalConfig ¶
type LocalConfig struct {
ToDoListName string `yaml:"todo_list_name"`
Gist github.GistConfig `yaml:"gist"`
Backup backup.BackupConfig `yaml:"backup"`
}
func GetDefaultLocalConfig ¶
func GetDefaultLocalConfig(dataFolder string) *LocalConfig
func LoadLocalConfig ¶
func LoadLocalConfig(filename string) (config LocalConfig, err error)
func (*LocalConfig) Save ¶
func (c *LocalConfig) Save(filename string) error
Click to show internal directories.
Click to hide internal directories.