Documentation ¶
Overview ¶
Generated. DO NOT EDIT.
Index ¶
- Variables
- func AddTodo(t *TodoListStream, todo Todo)
- func Client(stop chan struct{}, render func(*TodoListStream))
- func SaveSession(s *dot.Session, todos TodoList)
- func Server()
- func SpliceDescription(t *TodoListStream, index, offset, count int, replacement string)
- func Toggle(t *TodoListStream, index int)
- type Todo
- type TodoList
- func (t TodoList) Apply(ctx changes.Context, c changes.Change) changes.Value
- func (t TodoList) ApplyCollection(ctx changes.Context, c changes.Change) changes.Collection
- func (t TodoList) Count() int
- func (t TodoList) Move(offset, count, distance int) TodoList
- func (t TodoList) Slice(offset, count int) changes.Collection
- func (t TodoList) Splice(offset, count int, insert ...Todo) TodoList
- type TodoListStream
- func (s *TodoListStream) Item(index int) *TodoStream
- func (s *TodoListStream) Latest() *TodoListStream
- func (s *TodoListStream) Move(offset, count, distance int) *TodoListStream
- func (s *TodoListStream) Next() (*TodoListStream, changes.Change)
- func (s *TodoListStream) Splice(offset, count int, replacement ...Todo) *TodoListStream
- func (s *TodoListStream) Update(val TodoList) *TodoListStream
- type TodoStream
Constants ¶
This section is empty.
Variables ¶
View Source
var Lock sync.Mutex
Functions ¶
func AddTodo ¶
func AddTodo(t *TodoListStream, todo Todo)
func Client ¶
func Client(stop chan struct{}, render func(*TodoListStream))
func SaveSession ¶
func SpliceDescription ¶
func SpliceDescription(t *TodoListStream, index, offset, count int, replacement string)
func Toggle ¶
func Toggle(t *TodoListStream, index int)
Types ¶
type TodoList ¶
type TodoList []Todo
TodoList tracks a collection of todo items
func SavedSession ¶
func (TodoList) ApplyCollection ¶
type TodoListStream ¶
TodoListStream implements a stream of TodoList values
func (*TodoListStream) Item ¶
func (s *TodoListStream) Item(index int) *TodoStream
Item returns the sub item stream
func (*TodoListStream) Latest ¶
func (s *TodoListStream) Latest() *TodoListStream
Latest returns the latest entry in the stream
func (*TodoListStream) Move ¶
func (s *TodoListStream) Move(offset, count, distance int) *TodoListStream
Move shuffles Value[offset:offset+count] over by distance
func (*TodoListStream) Next ¶
func (s *TodoListStream) Next() (*TodoListStream, changes.Change)
Next returns the next entry in the stream if there is one
func (*TodoListStream) Splice ¶
func (s *TodoListStream) Splice(offset, count int, replacement ...Todo) *TodoListStream
Splice splices the items replacing Value[offset:offset+count] with replacement
func (*TodoListStream) Update ¶
func (s *TodoListStream) Update(val TodoList) *TodoListStream
Update replaces the current value with the new value
type TodoStream ¶
TodoStream implements a stream of Todo values
func (*TodoStream) Complete ¶
func (s *TodoStream) Complete() *streams.Bool
func (*TodoStream) Description ¶
func (s *TodoStream) Description() *streams.S16
func (*TodoStream) Latest ¶
func (s *TodoStream) Latest() *TodoStream
Latest returns the latest entry in the stream
func (*TodoStream) Next ¶
func (s *TodoStream) Next() (*TodoStream, changes.Change)
Next returns the next entry in the stream if there is one
func (*TodoStream) Update ¶
func (s *TodoStream) Update(val Todo) *TodoStream
Update replaces the current value with the new value
Click to show internal directories.
Click to hide internal directories.