indeks

package module
v0.0.0-...-2c22085 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

README

indeks

indexing action app

Documentation

Index

Constants

View Source
const (
	ResultUncheck = iota
	ResultOK
	ResultNG
	ResultChanged
)

Variables

View Source
var Idxs []*Idx

Functions

func CheckOK

func CheckOK(act *Action, start *time.Time, end *time.Time) (ok bool)

func CheckTarget

func CheckTarget(act *Action, start *time.Time, end *time.Time) (isT bool)

func SumActualPoint

func SumActualPoint(idx *Idx, start time.Time, end *time.Time) (result int)

func SumTargetPoint

func SumTargetPoint(idx *Idx, start time.Time, end *time.Time) (result int)

Types

type Action

type Action struct {
	Idx        *Idx
	TargetTime time.Time
	ActualTime time.Time
	Point      int
	Result     int
	Comment    string
}

func ChangeTargetTime

func ChangeTargetTime(action *Action, t *time.Time, comment string) (changed *Action)

func CreateAction

func CreateAction(idx *Idx, now time.Time) (action *Action)

func Do

func Do(action *Action, t *time.Time) *Action

type Idx

type Idx struct {
	Name            string
	Desc            string
	DefaultPoint    int
	DefaultDuration time.Duration
	Actions         []*Action
}

func RemoveAction

func RemoveAction(idx *Idx, action *Action) (removed *Idx)

type Summary

type Summary struct {
	Target  int
	Actual  int
	Ratio   float32
	TargetC int
	ActualC int
	RatioC  float32
}

func SummaryPoint

func SummaryPoint(idx *Idx, start time.Time, end *time.Time) (summary *Summary)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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