Documentation ¶
Index ¶
- func DoesUserConfigExist() (bool, error)
- func GetConfigDirPathBasedOnOS() (string, error)
- func GetConfigFilePathBasedOnOS() (string, error)
- func GetLogsFilePathBasedOnOS() (string, error)
- type Board
- type Task
- type UserConfig
- func (self *UserConfig) AddColumnToBoard(boardName string, columnName string) error
- func (self *UserConfig) AddTask(boardName string, task *Task) error
- func (self *UserConfig) CreateBoard(boardName string, dirPath string) error
- func (self *UserConfig) DeleteTask(boardName string, task *Task) error
- func (self *UserConfig) GetBoard(boardName string) opt.Option[*Board]
- func (self *UserConfig) MoveTaskLeft(board *Board, task *Task) error
- func (self *UserConfig) MoveTaskRight(board *Board, task *Task) error
- func (self *UserConfig) UpdateBoard(board *Board) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoesUserConfigExist ¶
DoesUserConfigExist checks if a user config has already be generated for this user.
func GetConfigDirPathBasedOnOS ¶
GetConfigFilePathBasedOnOS returns the config folder path based on the OS.
func GetConfigFilePathBasedOnOS ¶
GetConfigFilePathBasedOnOS returns the config file path based on the OS.
func GetLogsFilePathBasedOnOS ¶
GetLogsFilePathBasedOnOS returns the logs file path based on the OS.
Types ¶
type Board ¶
type Board struct { Name string `json:"name"` Dir string `json:"dir"` Columns []string `json:"columns"` // Tasks are the individual cards on the board representing a task. Tasks map[string][]*Task `json:"tasks"` }
func (*Board) GetColumnForTask ¶
GetColumnForTask returns the name and the index of the column that this task belongs to. It returns -1 as the index if didn't find the column.
type Task ¶
type UserConfig ¶
type UserConfig struct { PrimaryColor termui.Color `json:"primary_color"` Boards []*Board `json:"boards"` }
func GetUserConfig ¶
func GetUserConfig() (*UserConfig, error)
GetUserConfig reads the user config file and returns a pointer to a UserConfig object.
func NewDefaultUserConfig ¶
func NewDefaultUserConfig() *UserConfig
func SetupUserConfig ¶
func SetupUserConfig() (*UserConfig, error)
SetupUserConfig creates a new default config and writes it to disk. It returns a pointer to the new config.
func (*UserConfig) AddColumnToBoard ¶
func (self *UserConfig) AddColumnToBoard(boardName string, columnName string) error
AddColumnToBoard adds a column to the board of the board with the given name.
func (*UserConfig) AddTask ¶
func (self *UserConfig) AddTask(boardName string, task *Task) error
AddTask adds a new task to the left most column (idealy called Backlog).
func (*UserConfig) CreateBoard ¶
func (self *UserConfig) CreateBoard(boardName string, dirPath string) error
CreateBoard adds a new board to the config.
func (*UserConfig) DeleteTask ¶
func (self *UserConfig) DeleteTask(boardName string, task *Task) error
func (*UserConfig) GetBoard ¶
func (self *UserConfig) GetBoard(boardName string) opt.Option[*Board]
GetBoard searches the config for a board with the given name.
func (*UserConfig) MoveTaskLeft ¶
func (self *UserConfig) MoveTaskLeft(board *Board, task *Task) error
MoveTaskLeft moves the task to the left column of the one its currently on and removes it from the old column.
func (*UserConfig) MoveTaskRight ¶
func (self *UserConfig) MoveTaskRight(board *Board, task *Task) error
MoveTaskRight moves the task to the right column of the one its currently on and removes it from the old column.
func (*UserConfig) UpdateBoard ¶
func (self *UserConfig) UpdateBoard(board *Board) error
UpdateBoard finds and updates the given board in the user config.