Documentation ¶ Index ¶ func JsonError(w http.ResponseWriter, _ *http.Request, err error, code int) error type Config type JsonErr type SpaBox func New(cnf Config) *SpaBox func (sb *SpaBox) DistHandler() http.Handler func (sb *SpaBox) IndexHandler() http.Handler Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func JsonError ¶ func JsonError(w http.ResponseWriter, _ *http.Request, err error, code int) error Types ¶ type Config ¶ type Config struct { // Path to dist directory is always relative to the root of current module PathToDist string // Path to Index is the relative path PathToIndex string PathToIndexAbsolute bool } type JsonErr ¶ type JsonErr struct { Code int `json:"code"` Message string `json:"message"` } type SpaBox ¶ type SpaBox struct { // contains filtered or unexported fields } func New ¶ func New(cnf Config) *SpaBox func (*SpaBox) DistHandler ¶ func (sb *SpaBox) DistHandler() http.Handler func (*SpaBox) IndexHandler ¶ func (sb *SpaBox) IndexHandler() http.Handler Source Files ¶ View all Source files spabox.go Click to show internal directories. Click to hide internal directories.