Documentation ¶
Index ¶
- Variables
- func AddResources(root string)
- func CanonicalHost(canonical string) http.HandlerFunc
- func Put(r *Resource)
- type Hub
- type Message
- type Resource
- type ResourceHandler
- func (rh *ResourceHandler) Init(bucket string, host string)
- func (rh *ResourceHandler) Match(r *http.Request) bool
- func (rh *ResourceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (rh *ResourceHandler) ServeStatic(w http.ResponseWriter, r *http.Request)
- func (rh *ResourceHandler) URL(r *http.Request) *url.URL
- type TemplateData
Constants ¶
This section is empty.
Variables ¶
View Source
var PERM = regexp.MustCompile("[0-9a-f]{8}~")
Functions ¶
func AddResources ¶
func AddResources(root string)
func CanonicalHost ¶
func CanonicalHost(canonical string) http.HandlerFunc
Types ¶
type Resource ¶
type ResourceHandler ¶
type ResourceHandler struct { Static bool Root http.Dir Aliases map[string]string GetData func(r *Resource) TemplateData `json:"-"` }
func (*ResourceHandler) Init ¶
func (rh *ResourceHandler) Init(bucket string, host string)
func (*ResourceHandler) ServeHTTP ¶
func (rh *ResourceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*ResourceHandler) ServeStatic ¶
func (rh *ResourceHandler) ServeStatic(w http.ResponseWriter, r *http.Request)
type TemplateData ¶
type TemplateData interface{}
Click to show internal directories.
Click to hide internal directories.