Documentation
¶
Index ¶
- Constants
- Variables
- type ApiRouter
- func (a *ApiRouter) BasicAuthMiddleware(nextHandler http.HandlerFunc) http.HandlerFunc
- func (a *ApiRouter) RSVPCreate(w http.ResponseWriter, r *http.Request)
- func (a *ApiRouter) RSVPDelete(w http.ResponseWriter, r *http.Request)
- func (a *ApiRouter) RSVPGetAll(w http.ResponseWriter, r *http.Request)
- func (a *ApiRouter) SetupRoutes(router *mux.Router)
- type MiddlewareFunc
- type RenderContext
- type Route
- type Server
Constants ¶
View Source
const (
Port = "8081"
)
Variables ¶
View Source
var ( TemplatesDir = filepath.FromSlash(filepath.Join("web", "templates")) TemplateFiles = []string{ filepath.Join(TemplatesDir, "layout"), filepath.Join(TemplatesDir, "nav"), filepath.Join(TemplatesDir, "analytics"), filepath.Join(TemplatesDir, "typography"), } ReservedFiles = append(TemplateFiles, filepath.Join(TemplatesDir, "adminView")) StaticDir = filepath.FromSlash(filepath.Join("web", "static")) SiteFilesDir = filepath.FromSlash(filepath.Join("web", "site_files")) )
Functions ¶
This section is empty.
Types ¶
type ApiRouter ¶
type ApiRouter struct {
// contains filtered or unexported fields
}
func NewApiRouter ¶
func (*ApiRouter) BasicAuthMiddleware ¶
func (a *ApiRouter) BasicAuthMiddleware(nextHandler http.HandlerFunc) http.HandlerFunc
BasicAuthMiddleware wraps a http.HandlerFunc in a Basic Auth check. ToDo: Could probably live in a middleware only file
func (*ApiRouter) RSVPCreate ¶
func (a *ApiRouter) RSVPCreate(w http.ResponseWriter, r *http.Request)
func (*ApiRouter) RSVPDelete ¶
func (a *ApiRouter) RSVPDelete(w http.ResponseWriter, r *http.Request)
func (*ApiRouter) RSVPGetAll ¶
func (a *ApiRouter) RSVPGetAll(w http.ResponseWriter, r *http.Request)
func (*ApiRouter) SetupRoutes ¶
type MiddlewareFunc ¶
type MiddlewareFunc func(nextHandler http.HandlerFunc) http.HandlerFunc
type RenderContext ¶
type Route ¶
type Route struct { Path string Method string Handler http.HandlerFunc MiddleWare MiddlewareFunc }
Click to show internal directories.
Click to hide internal directories.