data

package
v0.0.0-...-19b1c6b Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2016 License: MIT Imports: 6 Imported by: 7

Documentation

Index

Constants

View Source
const ProjectNameSepperator = "."
View Source
const TimeStampFormat = time.RFC3339Nano

Variables

This section is empty.

Functions

func ProjectNamesToString

func ProjectNamesToString(names []ProjectName) []string

Types

type Entries

type Entries []Entry

type Entry

type Entry interface {
	Type() EntryType
	Values() []string
	GetTimeStamp() time.Time
}

func ParseEntry

func ParseEntry(values []string) (Entry, error)

type EntryType

type EntryType int
const (
	EntryTypeNote EntryType = iota
	EntryTypeTodo
	EntryTypeUnkown
)

func ParseEntryType

func ParseEntryType(value string) (EntryType, error)

func (EntryType) String

func (etype EntryType) String() string

type Note

type Note struct {
	Value     string
	TimeStamp time.Time
}

func ParseNote

func ParseNote(values []string) (Note, error)

func (Note) GetTimeStamp

func (note Note) GetTimeStamp() time.Time

func (Note) Type

func (note Note) Type() EntryType

func (Note) Values

func (note Note) Values() []string

type Project

type Project struct {
	Entries Entries
	Name    ProjectName
}

func (*Project) AddNote

func (project *Project) AddNote(note Note)

func (*Project) AddTodo

func (project *Project) AddTodo(todo Todo)

func (Project) Notes

func (project Project) Notes() []Note

func (Project) Todos

func (project Project) Todos() []Todo

type ProjectName

type ProjectName []string

func ParseProjectName

func ParseProjectName(name string) (ProjectName, error)

func (ProjectName) String

func (name ProjectName) String() string

func (ProjectName) Values

func (name ProjectName) Values() []string

type Projects

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

func NewProjects

func NewProjects() Projects

func (Projects) Add

func (proj Projects) Add(project Project)

func (Projects) List

func (proj Projects) List(projects ...Project) []Project

func (Projects) Set

func (proj Projects) Set(project Project)

type Todo

type Todo struct {
	Active    bool
	TimeStamp time.Time
	Value     string
}

func ParseTodo

func ParseTodo(values []string) (Todo, error)

func (Todo) GetTimeStamp

func (todo Todo) GetTimeStamp() time.Time

func (Todo) Type

func (todo Todo) Type() EntryType

func (Todo) Values

func (todo Todo) Values() []string

Jump to

Keyboard shortcuts

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