Documentation ¶
Index ¶
- func ByTagPrefix(tagPrefix string, ascending bool) types.RowSorter
- func MapToStrings(mapper func(*types.Row) string, rows types.Rows) []string
- func SaveAsFile(r *types.Row, dir string) (filepath string, err error)
- func TagWithPrefix(r *types.Row, prefixes ...string) string
- func TagWithPrefixStripped(r *types.Row, prefixes ...string) string
- func TagsWithPrefix(r *types.Row, prefix string) []string
- func TagsWithPrefixStripped(r *types.Row, prefix string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapToStrings ¶
MapToStrings applies mapper to every *Row in rows
func SaveAsFile ¶
SaveAsFile saves the given *Row r to the given directory dir, introspecting r to determine a reasonable filename (either the filename if r contains a file, or r's unique ID). If dir is empty, r is stored in the "decrypted" directory within cryptag.TrustedBasePath ($HOME/.cryptag by default).
func TagWithPrefix ¶
TagWithPrefix iterates over r's plaintags to grab the data stored in said tags, preferring the prefixes in the order they are passed in.
Example use: TagWithPrefix(r, "filename:", "id:"), which will try to return r's filename, then try to return its ID, and if both fail, will return empty string.
func TagWithPrefixStripped ¶
TagWithPrefixStripped does the same thing as TagWithPrefix except it also strips off the prefix from the tags found with said prefix. (Ya get me?)
func TagsWithPrefix ¶
TagsWithPrefix returns r's PlainTags that begin with prefix.
Types ¶
This section is empty.