data

package
v0.0.0-...-68f52cc Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteItem

func DeleteItem(id int) error

func SetAreaThingPosition

func SetAreaThingPosition(area int, typ ThingType, id, pos int) error

func SetFocus

func SetFocus(user, id int, focus FocusState) error

func SetItem

func SetItem(in Item) error

func SetList

func SetList(in List) error

func SetListItemPosition

func SetListItemPosition(list, item, pos int) error

func SetUserFocus

func SetUserFocus(user, item int, focus FocusState) error

func SortFocusItem

func SortFocusItem(user, id, after int) error

func UserArea

func UserArea(user, id int) (Area, []Thing, error)

Types

type Area

type Area struct {
	ID    int
	Title string
	Body  string
	List  []Thing
}

func AreaByID

func AreaByID(id int) (Area, error)

type FocusData

type FocusData struct {
	Focus []Item
	Later []Item
	Watch []Item
}

func FocusList

func FocusList(user int) (FocusData, error)

type FocusState

type FocusState int8
const (
	FocusNone  FocusState = stored.FocusNone
	FocusNow   FocusState = stored.FocusNow
	FocusLater FocusState = stored.FocusLater
	FocusWatch FocusState = stored.FocusWatch
)

func (FocusState) String

func (i FocusState) String() string

type Item

type Item struct {
	ID    int
	State ItemState
	Focus FocusState
	Title string
	Body  string
}

func ItemByID

func ItemByID(id int) (Item, error)

func ItemList

func ItemList(id int) ([]Item, error)

func NewItem

func NewItem() (Item, error)

func UserItemByID

func UserItemByID(user, id int) (Item, error)

func UserItemList

func UserItemList(user, id int) ([]Item, error)

func (Item) Archived

func (i Item) Archived() bool

type ItemState

type ItemState int8
const (
	ItemOpen     ItemState = stored.ItemOpen
	ItemComplete ItemState = stored.ItemComplete
	ItemArchived ItemState = stored.ItemArchived
)

func (ItemState) String

func (i ItemState) String() string

type List

type List struct {
	ID    int
	State ItemState
	Title string
	Body  string
	Items []Item
}

func ListByID

func ListByID(id int) (List, error)

func (List) Archived

func (l List) Archived() bool

type Thing

type Thing interface {
	Archived() bool
	// contains filtered or unexported methods
}

type ThingType

type ThingType int8
const (
	TypeItem ThingType = stored.TypeItem
	TypeList ThingType = stored.TypeList
)

type User

type User struct {
	ID   int
	Name string
}

func UserByID

func UserByID(id int) (User, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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