spabox

package
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL