orange-cat: github.com/noraesae/orange-cat Index | Files | Directories

package orange

import "github.com/noraesae/orange-cat"

Index

Package Files

http_server.go md_converter.go orange.go template.go watcher.go websocket.go

Constants

const (
    ListeningTestInterval = 500
    MaxListeningTestCount = 10
)
const (
    MarkdownChanSize = 3
    Version          = "0.2.2-dev"
)
const (
    WatcherInterval = 500
    DataChanSize    = 10
)
const (
    WriteTimeout = 5 * time.Second
    BufferSize   = 2048
)

Variables

var DefaultStyle = "" /* 7127 byte string literal not displayed */
var MdConverter = NewMarkdownConverter()

Global Converter

func CustomCSS Uses

func CustomCSS() (*string, error)

func Template Uses

func Template(w http.ResponseWriter, filepath string)

type DataChan Uses

type DataChan struct {
    Raw chan *[]byte
    Req chan bool
}

type HTTPServer Uses

type HTTPServer struct {
    // contains filtered or unexported fields
}

func NewHTTPServer Uses

func NewHTTPServer(port int) *HTTPServer

func (*HTTPServer) Addr Uses

func (s *HTTPServer) Addr() string

func (*HTTPServer) Listen Uses

func (s *HTTPServer) Listen()

func (*HTTPServer) ListenAndServe Uses

func (s *HTTPServer) ListenAndServe()

func (*HTTPServer) ServeHTTP Uses

func (s *HTTPServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*HTTPServer) ServeStatic Uses

func (s *HTTPServer) ServeStatic(w http.ResponseWriter, path string)

func (*HTTPServer) Stop Uses

func (s *HTTPServer) Stop()

type MarkdownConverter Uses

type MarkdownConverter struct {
    // contains filtered or unexported fields
}

func NewMarkdownConverter Uses

func NewMarkdownConverter() *MarkdownConverter

func (*MarkdownConverter) Convert Uses

func (md *MarkdownConverter) Convert(raw []byte) []byte

func (*MarkdownConverter) UseBasic Uses

func (md *MarkdownConverter) UseBasic()

type Orange Uses

type Orange struct {
    // contains filtered or unexported fields
}

func NewOrange Uses

func NewOrange(port int) *Orange

func (*Orange) Run Uses

func (o *Orange) Run(files ...string)

func (*Orange) Stop Uses

func (o *Orange) Stop()

func (*Orange) UseBasic Uses

func (o *Orange) UseBasic()

type Watcher Uses

type Watcher struct {
    C *DataChan
    // contains filtered or unexported fields
}

func NewWatcher Uses

func NewWatcher(path string) *Watcher

func (*Watcher) Start Uses

func (w *Watcher) Start()

func (*Watcher) Stop Uses

func (w *Watcher) Stop()

type Websocket Uses

type Websocket struct {
    // contains filtered or unexported fields
}

func NewWebsocket Uses

func NewWebsocket(path string) *Websocket

func (*Websocket) Reader Uses

func (ws *Websocket) Reader(c *goWs.Conn, closed chan<- bool)

func (*Websocket) Serve Uses

func (ws *Websocket) Serve(w http.ResponseWriter, r *http.Request)

func (*Websocket) Writer Uses

func (ws *Websocket) Writer(c *goWs.Conn, closed <-chan bool)

Directories

PathSynopsis
cmd/orange

Package orange imports 16 packages (graph) and is imported by 1 packages. Updated 2016-07-15. Refresh now. Tools for package owners.