Documentation ¶
Index ¶
- type GitRepo
- func (r *GitRepo) CloseObserver(c <-chan string)
- func (r *GitRepo) DeleteFile(p string) error
- func (r *GitRepo) ListFiles(prefix string) ([]repository.File, error)
- func (r *GitRepo) LocalPathForFile(path string) (string, error)
- func (r *GitRepo) Observer() <-chan string
- func (r *GitRepo) ReadFile(path string) (repository.File, error)
- func (r *GitRepo) SearchFiles(term string) ([]repository.File, error)
- func (r *GitRepo) StopWatching()
- func (r *GitRepo) StoreFile(p string, data io.Reader) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitRepo ¶
type GitRepo struct {
// contains filtered or unexported fields
}
GitRepo is a git repository implementing the Repo interface for goldfish.
func NewGitRepo ¶
NewGitRepo opens or makes a git repo at the given path
func (*GitRepo) CloseObserver ¶
CloseObserver closes an observer obtained from Observer()
func (*GitRepo) DeleteFile ¶ added in v0.2.1
DeleteFile deletes a file
func (*GitRepo) ListFiles ¶
func (r *GitRepo) ListFiles(prefix string) ([]repository.File, error)
ListFiles lists the files in a given directory
func (*GitRepo) LocalPathForFile ¶ added in v0.2.1
LocalPathForFile returns the full local path for a file
func (*GitRepo) ReadFile ¶
func (r *GitRepo) ReadFile(path string) (repository.File, error)
ReadFile reads a file from the repo
func (*GitRepo) SearchFiles ¶ added in v0.2.1
func (r *GitRepo) SearchFiles(term string) ([]repository.File, error)
SearchFiles looks for markdown files containing `term` and returns the paths.
func (*GitRepo) StopWatching ¶
func (r *GitRepo) StopWatching()
StopWatching stops watching for changes in the repo
Click to show internal directories.
Click to hide internal directories.