Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConsoleRenderer ¶
type ConsoleRenderer struct {
// contains filtered or unexported fields
}
ConsoleRenderer - designed to render to the console for testing
func (ConsoleRenderer) Initialise ¶
func (c ConsoleRenderer) Initialise()
Initialise - start the rendering process
type FileRenderer ¶
type FileRenderer struct {
// contains filtered or unexported fields
}
FileRenderer - designed to render to the file system for testing
func (FileRenderer) Initialise ¶
func (c FileRenderer) Initialise()
Initialise - start the rendering process
type LiveReload ¶
type LiveReload struct {
// contains filtered or unexported fields
}
LiveReload -
func (*LiveReload) GetMiddleware ¶
func (live *LiveReload) GetMiddleware(next http.Handler) http.Handler
GetMiddleware - return a handler
func (*LiveReload) Handler ¶
func (live *LiveReload) Handler(w http.ResponseWriter, req *http.Request)
Handler - handle the live reload
func (*LiveReload) StartLiveReload ¶
func (live *LiveReload) StartLiveReload(port int32, fn func())
StartLiveReload - start the process to watch the files and wait for a reload
type Prox ¶
type Prox struct {
// contains filtered or unexported fields
}
Prox - RerverseProxy object
type WrapperResponseWriter ¶
type WrapperResponseWriter struct { http.ResponseWriter // contains filtered or unexported fields }
WrapperResponseWriter - wraps request intercepts all write calls so as to append the live reload script
func NewWrapperResponseWriter ¶
func NewWrapperResponseWriter(w http.ResponseWriter) *WrapperResponseWriter
NewWrapperResponseWriter - create a new response writer
func (*WrapperResponseWriter) Done ¶
func (w *WrapperResponseWriter) Done() (n int, err error)
Done - called when are ready to return a result
func (*WrapperResponseWriter) PrefixWithLogs ¶
func (w *WrapperResponseWriter) PrefixWithLogs(logs []string)
PrefixWithLogs - write the logs to the head of the page
func (*WrapperResponseWriter) Status ¶
func (w *WrapperResponseWriter) Status() int
Status - get the status
func (*WrapperResponseWriter) Write ¶
func (w *WrapperResponseWriter) Write(p []byte) (n int, err error)
Write - wrap the write
func (*WrapperResponseWriter) WriteHeader ¶
func (w *WrapperResponseWriter) WriteHeader(code int)
WriteHeader - wrap the write header