core

package
v0.0.0-...-52789aa Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2018 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseDuration

func ParseDuration(str string) time.Duration

ParseDuration return a time.Duration from an iso string.

func ParseInt64

func ParseInt64(value string) int64

ParseInt64 return an int64 from a string. Errors are handle as 0.

Types

type Entry

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

Entry is a task with execution time management.

func NewEntry

func NewEntry(task models.Task) (*Entry, error)

NewEntry return a new entry.

func (*Entry) Epsilon

func (e *Entry) Epsilon() int64

Epsilon return the task epsilon.

func (*Entry) GUID

func (e *Entry) GUID() string

GUID return the task GUID.

func (*Entry) GetPayload

func (e *Entry) GetPayload() map[string]interface{}

GetPayload return the Task payload

func (*Entry) Init

func (e *Entry) Init(now time.Time)

Init the planning system Must be called before Plan

func (*Entry) Next

func (e *Entry) Next() int64

Next return the next execution time. Return -1 if invalid.

func (*Entry) Plan

func (e *Entry) Plan(now time.Time) (bool, error)

Plan the next execution time. Return true if planning as been updated.

func (*Entry) SameAs

func (e *Entry) SameAs(t models.Task) bool

SameAs check if entry is semanticaly the same as a task.

func (*Entry) SetPayload

func (e *Entry) SetPayload(payload map[string]interface{})

SetPayload upodate Task payload

func (*Entry) URN

func (e *Entry) URN() string

URN return the task urn.

func (*Entry) UserID

func (e *Entry) UserID() string

UserID return the task user ID.

Jump to

Keyboard shortcuts

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