note

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2017 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Basic = "basic"
	URL   = "url"

	NoteTypes = []string{
		Basic,
		URL,
	}
)

Note types

Functions

This section is empty.

Types

type Book

type Book struct {
	ID       int64
	Created  time.Time
	Modified time.Time

	Name string
}

Book is a collection of notes

func NewBook

func NewBook() *Book

NewBook returns a new Book

type Note

type Note struct {
	ID       int64
	Created  time.Time
	Modified time.Time

	Type  string
	Title string
	Body  string

	Book *Book
	Tags []*Tag
}

Note is our main struct for storing notes and their meta data.

func NewNote

func NewNote() *Note

NewNote returns a new Note

func (*Note) GetTagStringArray

func (n *Note) GetTagStringArray() []string

GetTagStringArray returns a list of the note's tag names

func (*Note) MarshalJSON

func (n *Note) MarshalJSON() ([]byte, error)

MarshalJSON customer json Marshaler

type Tag

type Tag struct {
	ID       int64
	Created  time.Time
	Modified time.Time

	Name string
}

Tag is a term used as meta data for more accurate searching and labeling.

func NewTag

func NewTag() *Tag

NewTag returns a new Tag

Jump to

Keyboard shortcuts

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