Documentation ¶
Index ¶
- type AssetContainer
- type HTTPContainer
- type PluginState
- func (m *PluginState) Assets(requestID string) (*AssetContainer, bool)
- func (m *PluginState) Context(requestID string) (context.Context, bool)
- func (m *PluginState) DeleteAssets(requestID string)
- func (m *PluginState) DeleteContextDelayed(requestID string)
- func (m *PluginState) DeleteHandleMap(requestID string)
- func (m *PluginState) HandleMap(method string, path string) (func(http.ResponseWriter, *http.Request) error, bool)
- func (m *PluginState) SaveAssets(c *AssetContainer, requestID string)
- func (m *PluginState) SaveContext(c context.Context, requestID string)
- func (m *PluginState) SaveHandleMap(c func(http.ResponseWriter, *http.Request) error, method string, path string)
- type ServerState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssetContainer ¶
type AssetContainer struct { FuncMap template.FuncMap FS ambient.FileSystemReader }
AssetContainer contains a FuncMap and a virtual filesystem.
type HTTPContainer ¶
type HTTPContainer struct { Request *http.Request Response http.ResponseWriter FuncMap template.FuncMap }
HTTPContainer contains the request and response writer for a call.
type PluginState ¶
type PluginState struct {
// contains filtered or unexported fields
}
PluginState contains state used by a plugin.
func NewPluginState ¶
func NewPluginState() *PluginState
NewPluginState returns a thread safe plugin state object.
func (*PluginState) Assets ¶
func (m *PluginState) Assets(requestID string) (*AssetContainer, bool)
Assets will return the assets.
func (*PluginState) Context ¶
func (m *PluginState) Context(requestID string) (context.Context, bool)
Context will return the request context.
func (*PluginState) DeleteAssets ¶
func (m *PluginState) DeleteAssets(requestID string)
DeleteAssets will delete the assets.
func (*PluginState) DeleteContextDelayed ¶
func (m *PluginState) DeleteContextDelayed(requestID string)
DeleteContextDelayed will delete the request context after 30 seconds.
func (*PluginState) DeleteHandleMap ¶
func (m *PluginState) DeleteHandleMap(requestID string)
DeleteHandleMap will delete the handle map.
func (*PluginState) HandleMap ¶
func (m *PluginState) HandleMap(method string, path string) (func(http.ResponseWriter, *http.Request) error, bool)
HandleMap will return the handle map.
func (*PluginState) SaveAssets ¶
func (m *PluginState) SaveAssets(c *AssetContainer, requestID string)
SaveAssets will save the request assets.
func (*PluginState) SaveContext ¶
func (m *PluginState) SaveContext(c context.Context, requestID string)
SaveContext will save the request context.
func (*PluginState) SaveHandleMap ¶
func (m *PluginState) SaveHandleMap(c func(http.ResponseWriter, *http.Request) error, method string, path string)
SaveHandleMap will save the handle map.
type ServerState ¶
type ServerState struct {
// contains filtered or unexported fields
}
ServerState .