lib

package
v0.0.0-...-95a7304 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2019 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BoardsDir = "boards"
	TrashDir  = "trash"
)

directory name where boards are stored in repo

Functions

func AddToLS

func AddToLS(lsName, newWB string) error

get the contents of a local wb

func AppendWB

func AppendWB(name, entry string) error

append a string to a new top line within a wb

func ClearWB

func ClearWB(name string) error

remove all the content of wb

func EmptyTrash

func EmptyTrash() error

delete all wbs in the trash folder

func GetBoardsGITDir

func GetBoardsGITDir() (string, error)

get the full path of a wb backup repo

func GetRepoPath

func GetRepoPath(name, dir string) (string, error)

get the full path of a wb in a directory

func GetTrashPath

func GetTrashPath() (string, error)

get the full path of a wb in the trash

func GetWB

func GetWB(name string) (content []string, found bool)

get the contents of a local wb

func GetWBRaw

func GetWBRaw(name string) (content []byte, found bool)

get the contents of a local wb in bytes

func GetWbBackupRepoPath

func GetWbBackupRepoPath() (string, error)

get the full path of a wb backup repo

func GetWbInTrashPath

func GetWbInTrashPath(name string) (string, error)

get the full path of a wb in the trash

func GetWbPath

func GetWbPath(name string) (string, error)

get the full path of a wb

func IterateWBs

func IterateWBs(iterFn IterateFn) error

perform the provided iterateFn for all wbs

func MoveWbToTrash

func MoveWbToTrash(name string) error

move a wb from the boards dir to the trash DIR

func MustClearWB

func MustClearWB(name string)

nolint

func MustPrependWB

func MustPrependWB(name, entry string)

nolint

func PrependWB

func PrependWB(name, entry string) error

prepend a string to a new top line within a wb

func RecoverWbFromTrash

func RecoverWbFromTrash(name string) error

move a wb from the boards dir to the trash DIR

func RemoveFromLS

func RemoveFromLS(lsName, remove string) error

get the contents of a local wb

func ReplaceInLS

func ReplaceInLS(lsName, oldName, newName string) error

replace a string in ls

func WbExists

func WbExists(name string) (found bool)

get the contents of a local wb

Types

type IterateFn

type IterateFn func(name, relPath string) (stop bool)

function for iterating over the wbs

Jump to

Keyboard shortcuts

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