Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindUpperRepo ¶
FindUpperRepo will detect all upper paths and return the nearest repo path.
func IsComplexNote ¶
IsComplexNote check a path is a complex note.
It would not consider this path may shadowed by some noise dir.
func IsNoise ¶
IsNoise test the path is a noise in lolinote.
This function doesn't consider it may be shadowed by other noise or attachment directory.
func IsSimpleNote ¶
IsSimpleNote check a path is a simple note.
It would not consider this path may shadowed by some noise or attachment dir.
Types ¶
type ComplexNote ¶
type ComplexNote struct {
// contains filtered or unexported fields
}
ComplexNote is a complex note instance in lolinote.
func (*ComplexNote) ContentPath ¶
func (n *ComplexNote) ContentPath() string
ContentPath return note's content filepath.
func (*ComplexNote) ContentType ¶
func (n *ComplexNote) ContentType() string
ContentType return note's conent type.
func (*ComplexNote) JSON ¶ added in v0.1.0
func (n *ComplexNote) JSON() []byte
JSON return the json string of this note.
type Dir ¶
type Dir struct {
// contains filtered or unexported fields
}
Dir represent a lolinote-folder structure in lolinote.
Notice: not all fs-folder was a lolinote-folder. Some fs-folder was the "leaf" structure in lolinote data tree, such as ComplexNote, Noise dir, sub repo, etc.
type Entry ¶
type Entry interface {
Path() string
}
Entry is a interface reference to Lolinote fs entry.
type Noise ¶
type Noise struct {
// contains filtered or unexported fields
}
Noise is noise instance in lolinote.
type Note ¶
type Note interface { Path() string Title() string ContentPath() string ContentType() string MTime() time.Time JSON() []byte }
Note is interface to represent a note in lolinote 2
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
Repo represent a Lolinote Repository.
func NewRepo ¶
NewRepo create a new Repo object.
If create is true, create a repo at the (exact) path in filesystem. If create is false, try to find the repo by path in filesystem.
err != nil only when can not return a vaild repo.
func (*Repo) NotesByMod ¶
NotesByMod return a slice contain all sub-notes ordering by modtime (desc).
func (*Repo) NotesByRel ¶
NotesByRel return a slice contain all sub-notes ordering by relevance.
type SimpleNote ¶
type SimpleNote struct {
// contains filtered or unexported fields
}
SimpleNote is a simple note instance in lolinote.
func (SimpleNote) ContentPath ¶
func (n SimpleNote) ContentPath() string
ContentPath return note's content filepath.
func (SimpleNote) ContentType ¶
func (n SimpleNote) ContentType() string
ContentType return note's conent type.
func (*SimpleNote) JSON ¶ added in v0.1.0
func (n *SimpleNote) JSON() []byte
JSON return the json string of this note.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package simplerepo offer test simple for loli2 project.
|
Package simplerepo offer test simple for loli2 project. |