Documentation ¶
Index ¶
- Constants
- func Middleware(gdb goydb.Goydb) http.Handler
- func NewProxyDBHandler(prefix, targetDB string, c *VirtualHost) http.Handler
- type VirtualHost
- func (c *VirtualHost) FindAllVHosts(ctx context.Context) ([]*model.VirtualHostConfiguration, error)
- func (c *VirtualHost) Middleware() func(next http.Handler) http.Handler
- func (c *VirtualHost) RebuildHandler() error
- func (c *VirtualHost) Run(ctx context.Context)
- func (c *VirtualHost) ServeHTTP(w http.ResponseWriter, r *http.Request)
Constants ¶
View Source
const ( VirtualHostDB = "_admin" VirtualHostPrefix = "goydb.vhost:" VirtualHostFiles = "files.zip" )
Variables ¶
This section is empty.
Functions ¶
func NewProxyDBHandler ¶
func NewProxyDBHandler(prefix, targetDB string, c *VirtualHost) http.Handler
Types ¶
type VirtualHost ¶
VirtualHost Virtual host implements a http middleware. The middleware is configured using the vhost configration in the _admin database.
func (*VirtualHost) FindAllVHosts ¶
func (c *VirtualHost) FindAllVHosts(ctx context.Context) ([]*model.VirtualHostConfiguration, error)
FindAllVHosts find all virtual host configurations in the database
func (*VirtualHost) Middleware ¶
func (c *VirtualHost) Middleware() func(next http.Handler) http.Handler
func (*VirtualHost) RebuildHandler ¶
func (c *VirtualHost) RebuildHandler() error
func (*VirtualHost) Run ¶
func (c *VirtualHost) Run(ctx context.Context)
func (*VirtualHost) ServeHTTP ¶
func (c *VirtualHost) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.