Documentation
¶
Index ¶
Constants ¶
const TreeIndent = " "
Variables ¶
var DefaulMetadata = []string{
"Title",
}
DefaultMetadata fields This is appended with configuration values
Functions ¶
This section is empty.
Types ¶
type Bookmark ¶
type Bookmark struct {
Id int
Name string
LowerName string
Description string
Content string
Project string
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
Archived bool
Tags []string
//Metadata key-values. Not in order
Metadata *map[string]string
//MetadataKeys provides ordered collection of keys
MetadataKeys *[]string
}
func (*Bookmark) AddMetadata ¶
AddMetadata adds single key-value metadata to bookmark If key already exists, override it with new value
func (*Bookmark) ContentDomain ¶
Return domain of the content if it is a link
func (*Bookmark) FillDefaultMetadata ¶
func (b *Bookmark) FillDefaultMetadata()
FillDefaultMetadata fills certain defaults as empty fields into metadata. Only apply default metadata if metadata is empty
func (*Bookmark) TagsString ¶
TagsString retuns string representation of tags. If spaces flag is set, put comma and space between tags No tags -> "", tags -> "a, b"
type Project ¶
func NewProject ¶
func ParseTrees ¶
ParseTrees parses array if strings and array of counts into tree of projects Data: e.g. ["project.a", "project.b", "project.a.b.c"] Count: e.g. [10,10,10]
func (*Project) PrintChildren ¶
func (*Project) String ¶
String returns string presentation of project. Only print project and its parents: c.string -> a.b.c, a.string -> a