Documentation ¶
Overview ¶
Package git provides the functionality for interacting with git/GitHub.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Url string // https://github.com/user/repo Token string // Github token }
type Git ¶
type Git struct {
// contains filtered or unexported fields
}
func NewGit ¶
Creates a new Git instance. Also starts a worker goroutine which will process commits in the background. To properly exit, call Stop(). The passed in WaitGroup is so that we can wait for all pending check ins to complete on exit.
func (*Git) QueueCommit ¶
func (g *Git) QueueCommit(relpath string, content []byte, comment, name, email string, when time.Time)
Queue up a commit, which will be pushed to GitHub in a separate goroutine. Relpath is the part of path inside the repo, e.g. "tables/1/10.yaml", content is the content of this file; comment, name, email and when are attributes of the commit.
Click to show internal directories.
Click to hide internal directories.