models

package
v0.0.0-...-ceb87d2 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package models implements the basic structures used among the program.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseDate

func ParseDate(date string) (string, error)

ParseDate parses a date

Types

type Goal

type Goal struct {
	ID               int64
	Name, Date, Note string
	Progress         []Progress
}

Goal represents a personal objective

func (*Goal) AddProgress

func (g *Goal) AddProgress(progress *Progress)

AddProgress adds a progress to a Goal

func (*Goal) SetDate

func (g *Goal) SetDate(date string) error

SetDate sets the date of a Goal

func (Goal) String

func (g Goal) String() string

type Progress

type Progress struct {
	ID, Value  int64
	Date, Note string
}

Progress to a specific Goal

func (*Progress) SetDate

func (p *Progress) SetDate(date string) error

SetDate sets the date of a Progress

func (Progress) String

func (p Progress) String() string

Jump to

Keyboard shortcuts

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