command

package
v0.0.0-...-6a00aa4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2017 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Format = "2006-01-02T15:04"

Format represents how timestamps show look

View Source
var Priorities = map[int]string{
	5: "Not at all important",
	4: "Slightly important",
	3: "Moderately important",
	2: "Somewhat important",
	1: "Extremely important",
}

Priorities represents the group of priorities TODO-View represents

Functions

func NewExport

func NewExport() cli.CommandFactory

NewExport creates a new instance of Delete

func NewParse

func NewParse() cli.CommandFactory

NewParse creates a new Parse reference

func NewShow

func NewShow() cli.CommandFactory

NewShow creates a new instance of Delete

func NewTabWriter

func NewTabWriter() *tabwriter.Writer

NewTabWriter sets up a new and configured tabwriter

func NewVersion

func NewVersion(version string) cli.CommandFactory

NewVersion creates a new version command

func NewWeb

func NewWeb() cli.CommandFactory

NewHtml creates a new instance

Types

type Export

type Export struct{}

Export is used for a command base

func (*Export) Help

func (e *Export) Help() string

Help provides full help inforamation for the subcommand

func (*Export) Run

func (e *Export) Run(args []string) int

Run shows a given resource.

func (*Export) Synopsis

func (e *Export) Synopsis() string

Synopsis provides a brief description of the command

type Exporter

type Exporter interface {
	Export()
}

Exporter is an interface with an export method

type FileTodos

type FileTodos []Todo

FileTodos is a slice type made for easier sorting

func (FileTodos) Len

func (f FileTodos) Len() int

Len gets the length of the slice

func (FileTodos) Less

func (f FileTodos) Less(i, j int) bool

Less does a comparison of the 2 given arguments

func (FileTodos) Swap

func (f FileTodos) Swap(i, j int)

Swap switchs the place in the slice for the 2 given arguments

type Parse

type Parse struct{}

Parse type for command

func (*Parse) Help

func (p *Parse) Help() string

Help provides full help inforamation for the subcommand

func (*Parse) Run

func (p *Parse) Run(args []string) int

Run shows a given resource.

func (*Parse) Synopsis

func (p *Parse) Synopsis() string

Synopsis provides a brief description of the command

type Priority

type Priority struct {
	Value       int
	Description string
}

Priority holds an individual priority

type PriorityTodos

type PriorityTodos []Todo

PriorityTodos is a slice type made for easier sorting

func (PriorityTodos) Len

func (w PriorityTodos) Len() int

Len gets the length of the slice

func (PriorityTodos) Less

func (w PriorityTodos) Less(i, j int) bool

Less does a comparison of the 2 given arguments

func (PriorityTodos) Swap

func (w PriorityTodos) Swap(i, j int)

Swap switchs the place in the slice for the 2 given arguments

type Show

type Show struct{}

Show represents the show command

func (*Show) Help

func (s *Show) Help() string

Help provides full help inforamation for the subcommand

func (*Show) Run

func (s *Show) Run(args []string) int

Run shows a given resource.

func (*Show) Synopsis

func (s *Show) Synopsis() string

Synopsis provides a brief description of the command

type TimestampTodos

type TimestampTodos []Todo

TimestampTodos is a slice type made for easier sorting

func (TimestampTodos) Len

func (t TimestampTodos) Len() int

Len gets the length of the slice

func (TimestampTodos) Less

func (t TimestampTodos) Less(i, j int) bool

Less does a comparison of the 2 given arguments

func (TimestampTodos) Swap

func (t TimestampTodos) Swap(i, j int)

Swap switchs the place in the slice for the 2 given arguments

type Todo

type Todo struct {
	// contains filtered or unexported fields
}

Todo represents a todo

func NewTodo

func NewTodo(u, m, ts, f string, w int) (*Todo, error)

NewTodo creates a new reference of a todo

func (*Todo) File

func (t *Todo) File() string

File returns the file value

func (*Todo) Message

func (t *Todo) Message() string

Message returns the message value

func (*Todo) Priority

func (t *Todo) Priority() int

Priority returns the priority value

func (*Todo) Timestamp

func (t *Todo) Timestamp() time.Time

Timestamp returns the timestamp value

func (*Todo) User

func (t *Todo) User() string

User returns the user value

type Todoer

type Todoer interface {
	User() string
	File() string
	Message() string
	Timestamp() time.Time
	// contains filtered or unexported methods
}

Todoer implements the functionality to view todos

type UserTodos

type UserTodos []Todo

UserTodos is a slice type made for easier sorting

func (UserTodos) Len

func (u UserTodos) Len() int

Len gets the length of the slice

func (UserTodos) Less

func (u UserTodos) Less(i, j int) bool

Less does a comparison of the 2 given arguments

func (UserTodos) Reverse

func (u UserTodos) Reverse()

Reverse will reverse the order of elements in the slice

func (UserTodos) Swap

func (u UserTodos) Swap(i, j int)

Swap switchs the place in the slice for the 2 given arguments

type Version

type Version struct {
	// contains filtered or unexported fields
}

Version represents the version command

func (*Version) Help

func (v *Version) Help() string

Help displays the below string

func (*Version) Run

func (v *Version) Run(args []string) int

Run shows the current version

func (*Version) Synopsis

func (v *Version) Synopsis() string

Synopsis provides a brief description of the command

type Web

type Web struct{}

Html data type

func (*Web) Help

func (w *Web) Help() string

Help provides full help inforamation for the subcommand

func (*Web) Run

func (w *Web) Run(args []string) int

Run a web server

func (*Web) Serve

func (w *Web) Serve(port string)

func (*Web) Synopsis

func (w *Web) Synopsis() string

Synopsis provides a brief description of the command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL