Documentation
¶
Overview ¶
Extra middleware
Index ¶
- Variables
- func CORSHandler(next echo.HandlerFunc) echo.HandlerFunc
- func DeleteHandler(c echo.Context) error
- func ETagMatch(header string, etag string) bool
- func ETagNoneMatch(header string, etag string) bool
- func GetCurrentRoot() string
- func GetHandler(c echo.Context) error
- func HeadHandler(c echo.Context) error
- func LoggerMiddleware(next echo.HandlerFunc) echo.HandlerFunc
- func NewServer(conf *HelixConfig) *echo.Echo
- func NewTLSConfig(cert, key string) (*tls.Config, error)
- func OptionsHandler(c echo.Context) error
- func PatchHandler(c echo.Context) error
- func PostHandleRDF(c echo.Context) error
- func PostHandler(c echo.Context) error
- func PutHandler(c echo.Context) error
- func ServerHeader(next echo.HandlerFunc) echo.HandlerFunc
- func ServerInfo(c echo.Context) error
- type HelixConfig
- type Stats
Constants ¶
This section is empty.
Variables ¶
View Source
var (
HELIX_VERSION = "0.1"
)
Functions ¶
func CORSHandler ¶
func CORSHandler(next echo.HandlerFunc) echo.HandlerFunc
func DeleteHandler ¶
func ETagNoneMatch ¶
func GetCurrentRoot ¶
func GetCurrentRoot() string
func GetHandler ¶
func HeadHandler ¶
func LoggerMiddleware ¶
func LoggerMiddleware(next echo.HandlerFunc) echo.HandlerFunc
func NewServer ¶
func NewServer(conf *HelixConfig) *echo.Echo
NewServer creates a new server handler
func OptionsHandler ¶
OptionsHandler uses a closure with the signature func(http.ResponseWriter, *http.Request). It sets extra headers that are needed for the CORS preflight requests.
func PatchHandler ¶
func PostHandleRDF ¶
func PostHandler ¶
func PutHandler ¶
func ServerHeader ¶
func ServerHeader(next echo.HandlerFunc) echo.HandlerFunc
ServerHeader middleware sets a Server header to the response.
func ServerInfo ¶
Types ¶
type HelixConfig ¶
type HelixConfig struct { Conf string Port string Debug bool Logfile string Root string Cert string Key string }
func NewHelixConfig ¶
func NewHelixConfig() *HelixConfig
func (*HelixConfig) GetLogger ¶
func (c *HelixConfig) GetLogger() io.Writer
func (*HelixConfig) LoadJSONFile ¶
func (c *HelixConfig) LoadJSONFile(filename string) error
LoadJSONFile loads server configuration
type Stats ¶
type Stats struct { Uptime time.Time `json:"uptime"` RequestCount uint64 `json:"requestCount"` Statuses map[string]int `json:"statuses"` // contains filtered or unexported fields }
func (*Stats) StatsMiddleware ¶
func (s *Stats) StatsMiddleware(next echo.HandlerFunc) echo.HandlerFunc
Process is the middleware function.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.