storage

package
v0.0.0-...-043ee8f Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2015 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateEntry

func CreateEntry(entry *Entry) string

func DeleteEntry

func DeleteEntry(id string, entry *Entry)

func Init

func Init()

func ListAllEntries

func ListAllEntries() <-chan *EntryWithId

func StoreEntry

func StoreEntry(id string, entry *Entry)

func StrLen

func StrLen(s string) int

func StringIsLessIgnoreCase

func StringIsLessIgnoreCase(a, b string) bool

func SubStr

func SubStr(s string, pos, length int) string

func UpdateEntry

func UpdateEntry(id string, entry *Entry)

Types

type EntriesByDateTime

type EntriesByDateTime []*EntryWithId

func (EntriesByDateTime) Len

func (a EntriesByDateTime) Len() int

func (EntriesByDateTime) Less

func (a EntriesByDateTime) Less(i, j int) bool

func (EntriesByDateTime) Swap

func (a EntriesByDateTime) Swap(i, j int)

type Entry

type Entry struct {
	Title        string
	Body         string
	Tags         []string
	LastModified time.Time
}

func LoadEntry

func LoadEntry(id string) (entry *Entry)

func (Entry) AsPlaintext

func (e Entry) AsPlaintext() *Entry

func (Entry) GetBodySnippet

func (e Entry) GetBodySnippet() string

func (*Entry) Type

func (e *Entry) Type() string

func (*Entry) UnifyTags

func (e *Entry) UnifyTags()

type EntryWithId

type EntryWithId struct {
	Entry
	// contains filtered or unexported fields
}

func GetAllEntriesWithTag

func GetAllEntriesWithTag(tag string) []*EntryWithId

func NewEntryWithId

func NewEntryWithId(id string, entry *Entry) *EntryWithId

func (*EntryWithId) Content

func (e *EntryWithId) Content() interface{}

func (*EntryWithId) Id

func (e *EntryWithId) Id() string

type TagInfo

type TagInfo struct {
	Name  string
	Count int
}

type TagInfos

type TagInfos []TagInfo

func GetAllTags

func GetAllTags() TagInfos

func (TagInfos) Len

func (a TagInfos) Len() int

func (TagInfos) Less

func (a TagInfos) Less(i, j int) bool

func (TagInfos) Swap

func (a TagInfos) Swap(i, j int)

Jump to

Keyboard shortcuts

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