Documentation ¶
Index ¶
- Constants
- Variables
- func BulkFunc(ids []int, successMsgPrefix string, renderer Renderer, c *cli.Context, ...) error
- func CaptureOutput(f func()) string
- func Difference(a, b time.Time) (year, month, day, hour, min, sec int)
- func FlatByTags(items entities.ItemCollection) entities.ItemCollection
- func GetCliApp() *cli.App
- func GetDurationText(a, b time.Time) string
- func GetItemUseCase(workspace string, config AppConfig) usecases.ItemUseCase
- func GroupByCreationDate(item entities.Manageable) string
- func GroupByStatus(item entities.Manageable) string
- func GroupByTag(item entities.Manageable) string
- type AppConfig
- type COLOR
- type ConsoleRenderer
- func (Logger *ConsoleRenderer) Colorify(message interface{}, color COLOR) string
- func (Logger *ConsoleRenderer) Error(message string) error
- func (Logger *ConsoleRenderer) Log(option LoggerOptions, message string) error
- func (Logger *ConsoleRenderer) Success(message string) error
- func (Logger *ConsoleRenderer) Warning(message string) error
- type GetKey
- type ItemGroup
- type ItemGroupCollection
- type ItemPresenter
- type ItemSummarizer
- type LoggerOptions
- type MapFunction
- type Predicate
- type Renderer
- type Summary
Constants ¶
View Source
const ( RESET string = "\033[0m" // 3-4 bits color BLACK COLOR = "\033[0;30m" RED COLOR = "\033[0;31m" GREEN COLOR = "\033[0;32m" YELLOW COLOR = "\033[0;33m" BLUE COLOR = "\033[0;34m" MAGENTA COLOR = "\033[0;35m" CYAN COLOR = "\033[0;36m" WHITE COLOR = "\033[0;37m" // RGB colors GREY COLOR = "\033[0;38;2;128;128;128m" )
View Source
const DateLayout string = "2006-01-02"
View Source
const MainBoardName = "My Board"
Variables ¶
View Source
var ( ERROR = LoggerOptions{Badge: " ✖", Color: RED} WARNING = LoggerOptions{Badge: " ⚠", Color: YELLOW} SUCCESS = LoggerOptions{Badge: " ✔", Color: GREEN} )
Functions ¶
func BulkFunc ¶
func BulkFunc(ids []int, successMsgPrefix string, renderer Renderer, c *cli.Context, mapperFunc MapFunction) error
func CaptureOutput ¶
func CaptureOutput(f func()) string
func Difference ¶
func FlatByTags ¶
func FlatByTags(items entities.ItemCollection) entities.ItemCollection
func GetDurationText ¶
func GetItemUseCase ¶ added in v0.0.2
func GetItemUseCase(workspace string, config AppConfig) usecases.ItemUseCase
func GroupByCreationDate ¶
func GroupByCreationDate(item entities.Manageable) string
func GroupByStatus ¶
func GroupByStatus(item entities.Manageable) string
func GroupByTag ¶
func GroupByTag(item entities.Manageable) string
Types ¶
type AppConfig ¶
type AppConfig struct { DataDirectory string `json:"data_directory"` DisplayCompletedTasks bool `json:"display_completed_tasks"` DefaultDisplayMode string `json:"default_display_mode"` DefaultWorkplace string `json:"default_workplace"` }
func GetAppConfig ¶
type ConsoleRenderer ¶
type ConsoleRenderer struct{}
func (*ConsoleRenderer) Colorify ¶
func (Logger *ConsoleRenderer) Colorify(message interface{}, color COLOR) string
func (*ConsoleRenderer) Error ¶
func (Logger *ConsoleRenderer) Error(message string) error
func (*ConsoleRenderer) Log ¶
func (Logger *ConsoleRenderer) Log(option LoggerOptions, message string) error
func (*ConsoleRenderer) Success ¶
func (Logger *ConsoleRenderer) Success(message string) error
func (*ConsoleRenderer) Warning ¶
func (Logger *ConsoleRenderer) Warning(message string) error
type GetKey ¶
type GetKey func(item entities.Manageable) string
type ItemGroup ¶
type ItemGroup struct { Name string Items entities.ItemCollection }
func (*ItemGroup) Print ¶
func (g *ItemGroup) Print(renderer Renderer, summarizer ItemSummarizer)
type ItemGroupCollection ¶ added in v0.0.2
type ItemGroupCollection []ItemGroup
func Filter ¶ added in v0.0.2
func Filter(summary ItemGroupCollection, predicate Predicate) ItemGroupCollection
func GroupBy ¶
func GroupBy(items entities.ItemCollection, keyFunc GetKey) ItemGroupCollection
func (ItemGroupCollection) Len ¶ added in v0.0.2
func (c ItemGroupCollection) Len() int
Sort Protocol
func (ItemGroupCollection) Less ¶ added in v0.0.2
func (c ItemGroupCollection) Less(i, j int) bool
func (ItemGroupCollection) Swap ¶ added in v0.0.2
func (c ItemGroupCollection) Swap(i, j int)
type ItemPresenter ¶
type ItemPresenter interface { TimelineView(items entities.ItemCollection) error BoardView(items entities.ItemCollection, tags ...string) error }
func NewItemPresenter ¶
func NewItemPresenter(renderer Renderer) ItemPresenter
type ItemSummarizer ¶
type ItemSummarizer func(item entities.Manageable) string
type LoggerOptions ¶
type MapFunction ¶
Click to show internal directories.
Click to hide internal directories.