notebook

package
v0.0.0-...-b6ff5cf Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2014 License: BSD-2-Clause Imports: 1 Imported by: 1

Documentation

Overview

Package notebook provides a notebook for present .article/.slide file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Note

type Note struct {
	ID   int64  // Unique identifier
	Text string // Description
}

Note represents a note. IDs are set only for Note that are saved by a NoteBook.

func NewNote

func NewNote(text string) (*Note, error)

NewNote creates a new Note given a string, that can't be empty.

type NoteBook

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

NoteBook manages a list of Note in memory.

func NewNoteBook

func NewNoteBook() *NoteBook

NewNoteBook returns an empty NoteBook.

func (*NoteBook) All

func (m *NoteBook) All() []*Note

All returns the list of all the Notes in the NoteBook.

func (*NoteBook) Save

func (m *NoteBook) Save(note *Note) error

Save saves the given Note in the NoteBook.

Jump to

Keyboard shortcuts

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