git

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2015 License: MIT Imports: 13 Imported by: 0

Documentation

Index

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

func NewGitRepo(repoPath string) (*GitRepo, error)

NewGitRepo opens or makes a git repo at the given path

func (*GitRepo) CloseObserver

func (r *GitRepo) CloseObserver(c <-chan string)

CloseObserver closes an observer obtained from Observer()

func (*GitRepo) DeleteFile added in v0.2.1

func (r *GitRepo) DeleteFile(p string) error

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

func (r *GitRepo) LocalPathForFile(path string) (string, error)

LocalPathForFile returns the full local path for a file

func (*GitRepo) Observer

func (r *GitRepo) Observer() <-chan string

Observer sends file paths on changes

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

func (*GitRepo) StoreFile

func (r *GitRepo) StoreFile(p string, data io.Reader) error

StoreFile writes a file to the repo and commits it

Jump to

Keyboard shortcuts

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