types

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: Unlicense Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrUnparsable

func ErrUnparsable(s string) error

func IDToString added in v0.1.0

func IDToString(id ID) string

Types

type Actionable

type Actionable interface {
	Identifiable
	Describable
	Workable
	Doable
	Taggable
}

type Activity

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

func NewActivity

func NewActivity(id ID, description string) *Activity

func (*Activity) AddTag added in v0.1.0

func (a *Activity) AddTag(tag ID)

func (*Activity) Describe

func (a *Activity) Describe(description string)

func (Activity) Description added in v0.3.0

func (a Activity) Description() string

func (*Activity) Do

func (a *Activity) Do()

func (Activity) Done

func (a Activity) Done() bool

func (*Activity) Identify

func (a *Activity) Identify(id ID)

func (Activity) Identity added in v0.3.0

func (a Activity) Identity() ID

func (*Activity) RemoveTag added in v0.1.0

func (a *Activity) RemoveTag(tag ID)

func (Activity) Tags added in v0.1.0

func (a Activity) Tags() map[ID]struct{}

func (*Activity) Undo

func (a *Activity) Undo()

func (*Activity) Work

func (a *Activity) Work(duration time.Duration)

func (Activity) Worked

func (a Activity) Worked() time.Duration

type Describable

type Describable interface {
	Describe(string)
	Description() string
}

type Doable

type Doable interface {
	Do()
	Undo()
	Done() bool
}

type ID

type ID string

type Identifiable

type Identifiable interface {
	Identify(ID)
	Identity() ID
}

type Taggable added in v0.1.0

type Taggable interface {
	AddTag(ID)
	RemoveTag(ID)
	Tags() map[ID]struct{}
}

type Workable

type Workable interface {
	Work(time.Duration)
	Worked() time.Duration
}

Jump to

Keyboard shortcuts

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