Documentation ¶
Index ¶
- Constants
- Variables
- func AchieveCommand() *cli.Command
- func AchieveGoal() error
- func CreateDB() error
- func GetMotivationalQuote() (string, error)
- func GetTableView(goals []*Goal) *uitable.Table
- func InitAction() error
- func InitCommand() *cli.Command
- func IsDBExists() (bool, error)
- func LogCommand() *cli.Command
- func NewCommand() *cli.Command
- func ReadGoal(r io.Reader) (string, error)
- func UpdateGoal(msg string) error
- func UserHomeDir() string
- func ViewGoals() error
- func WriteGoal(goal *Goal) error
- type Goal
- type Goals
- type Pair
- type PairList
Constants ¶
View Source
const ( CREATETABLE = `` /* 173-byte string literal not displayed */ INSERTGOAL = `INSERT INTO goal (timestamp, goalmsg, achieved) VALUES (?, ?, ?)` GETGOALS = `SELECT timestamp, goalmsg, achieved FROM goal` GETTODAYGOALS = "SELECT * FROM goal WHERE timestamp=?" DROPTABLE = `DROP TABLE goal` UPDATEGOAL = `UPDATE goal SET achieved=1 WHERE goalmsg=(?)` )
Variables ¶
View Source
var DBFILE = UserHomeDir() + "/.gftd.db"
Functions ¶
func AchieveCommand ¶
func AchieveGoal ¶
func AchieveGoal() error
func GetMotivationalQuote ¶
GetMotivationalQuote will retrieve a random motivation quote.
func InitAction ¶
func InitAction() error
func InitCommand ¶
func LogCommand ¶
func NewCommand ¶
func UpdateGoal ¶
func UserHomeDir ¶
func UserHomeDir() string
Types ¶
type Goal ¶
func PromptGoal ¶
func ReadAllGoals ¶
Reads all the goals currently in the database
func ReadTodayGoals ¶
Click to show internal directories.
Click to hide internal directories.