Documentation ¶
Index ¶
- func EditLxcAddLine(n string, find, duplicate *regexp.Regexp, line string) error
- func FindFileLists(repoPath string) ([]string, error)
- func MakeEndpoint(pr *PrintRequest) string
- func PrintCommand() *commander.Command
- func PrintInContainer(repoPath, book, printOrScreen string, C chan PrintMessage) (string, error)
- func PrintLocal(repoPath, bookName, printOrScreen, fileListDir string, C chan PrintMessage) (string, error)
- func PrintLogWriter(C chan PrintMessage, level string) io.WriteCloser
- func PrintRoutes(r *mux.Router)
- func Rvm(cout, cerr io.Writer, dir string, args ...string) *exec.Cmd
- type Jekyll
- type JekyllManager
- type JekyllPorts
- type Line
- type OutErrMerge
- type PrintMessage
- type PrintRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EditLxcAddLine ¶
EditLxcAddLine adds a line to the LXC config file. It will add the line, after it finds a line matching the `find` regexp. It will remove any line matching the 'duplicate' regexp. `n` is the name of the container to whose config this is being added.
func FindFileLists ¶
FindFileLists finds all the 'file-list' files in the repoPath, and returns an array of the directories where they were found relative to the repoPath
func MakeEndpoint ¶
func MakeEndpoint(pr *PrintRequest) string
func PrintCommand ¶
func PrintInContainer ¶
func PrintInContainer(repoPath, book, printOrScreen string, C chan PrintMessage) (string, error)
func PrintLocal ¶
func PrintLocal(repoPath, bookName, printOrScreen, fileListDir string, C chan PrintMessage) (string, error)
PrintLocal prints the book using the localhost for printing - not as safe as printing in a container, but on the other hand much easier to manage/code.
func PrintLogWriter ¶
func PrintLogWriter(C chan PrintMessage, level string) io.WriteCloser
PrintLogWriter returns a Writer which will channel all writes across the given PrintMessage channel as log messages of the given level.
func PrintRoutes ¶
PrintRoutes sets up the routes for printing on the given router
Types ¶
type Jekyll ¶
type Jekyll struct { ConfigFiles string BaseUrl string RepoDir string Port int64 ServerStarting bool RestartPath string KILL chan (bool) // contains filtered or unexported fields }
Jekyll manages a Jekyll process
type JekyllManager ¶
type JekyllManager struct {
// contains filtered or unexported fields
}
JekyllManager manages a bunch of Jekyll processes that will serve files for a repo. Importantly a Jekyll process needs to be started, build the repo, and automatically update if any files in the repo change.
func NewJekyllManager ¶
func NewJekyllManager() *JekyllManager
func (*JekyllManager) ClearJekyll ¶
func (jm *JekyllManager) ClearJekyll(user, repoOwner, repoName string) error
type JekyllPorts ¶
type JekyllPorts struct {
// contains filtered or unexported fields
}
JekyllPorts handles assigning ports to Jekyll servers. We don't perform very complex checking on port availability, which could be done down the line, but for now simply assume that a port will be available across a sufficient range for our requirements.
func NewJekyllPorts ¶
func NewJekyllPorts() *JekyllPorts
func (*JekyllPorts) Assign ¶
func (jp *JekyllPorts) Assign() int64
func (*JekyllPorts) Release ¶
func (jp *JekyllPorts) Release(p int64)
type OutErrMerge ¶
type OutErrMerge struct { Out io.WriteCloser Err io.WriteCloser // contains filtered or unexported fields }
func NewOutErrMerge ¶
func NewOutErrMerge() *OutErrMerge
func (*OutErrMerge) Lines ¶
func (oem *OutErrMerge) Lines() []*Line
func (*OutErrMerge) Scan ¶
func (oem *OutErrMerge) Scan(in io.ReadCloser, lvl string)
type PrintMessage ¶
type PrintMessage struct { Event string Data interface{} }
func PrintMessageLog ¶
func PrintMessageLog(strfmt string, args ...interface{}) PrintMessage