restful

package
v0.0.0-...-63a9e4b Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2020 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewH2

func NewH2(cmd *cmdr.Command, args []string, stopCh, doneCh chan struct{}, port int, buildRoutes func(mux *http.ServeMux) (err error)) (err error)

func NewXsServer

func NewXsServer(cmd *cmdr.Command, args []string, stopCh, doneCh chan struct{}, h Handlers) (err error)

Types

type Fwdr

type Fwdr struct {
	Balancer string
	Prefix   string
	Targets  []Target `yaml:"targets,omitempty"`
}

type FwdrList

type FwdrList struct {
	List    []Fwdr
	Rewrite map[string]string `yaml:"rewrite,omitempty"`
}

type H2

type H2 struct {
	// contains filtered or unexported fields
}

type Handlers

type Handlers interface {
	OnGetBanner() string
	InitRoutes(e *echo.Echo, s vxconf.CoolServer) (ready bool)
	InitWebSocket(e *echo.Echo, s vxconf.CoolServer) (ready bool)
}

type Target

type Target struct {
	Url     string            `yaml:"url,omitempty"`
	Name    string            `yaml:"name,omitempty"`
	Meta    map[string]string `yaml:"meta,omitempty"`
	Rewrite map[string]string `yaml:"rewrite,omitempty"`
}

type TemplateRenderer

type TemplateRenderer struct {
	// contains filtered or unexported fields
}

TemplateRenderer is a custom html/template renderer for Echo framework

func (*TemplateRenderer) Render

func (t *TemplateRenderer) Render(w io.Writer, name string, data interface{}, c echo.Context) error

Render renders a template document

Jump to

Keyboard shortcuts

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