armor

package module
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2016 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Armor License Build Status Twitter

Uncomplicated HTTP server, supports HTTP/2 and auto TLS

Armor is written in Go. It is based on the upcoming Echo v3.

What can it do today?

  • Serve HTTP/2
  • Automatically install TLS certificates from https://letsencrypt.org
  • Proxy HTTP and WebSocket requests
  • Define virtual hosts with path level routing
  • Graceful shutdown
  • Limit request body
  • Serve static files
  • Log requests
  • Gzip response
  • Cross-origin Resource Sharing (CORS)
  • Security
    • XSSProtection
    • ContentTypeNosniff
    • ContentSecurityPolicy
    • HTTP Strict Transport Security (HSTS)
  • Add / Remove trailing slash from the URL with option to redirect
  • Redirect requests
  • http to https
  • http to https www
  • http to https non www
  • non www to www
  • www to non www

Most of the functionality is implemented via Plugin interface which makes writing a custom plugin super easy.

Getting Started

What's on the roadmap?

  • Website
  • Code coverage
  • Test cases

Documentation

Index

Constants

View Source
const (
	Version = "0.2.3"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Armor

type Armor struct {
	Address      string           `json:"address"`
	TLS          *TLS             `json:"tls"`
	ReadTimeout  time.Duration    `json:"read_timeout"`
	WriteTimeout time.Duration    `json:"write_timeout"`
	Plugins      []Plugin         `json:"plugins"`
	Hosts        map[string]*Host `json:"hosts"`
	Logger       *log.Logger      `json:"-"`
}

type Host

type Host struct {
	Name     string           `json:"-"`
	CertFile string           `json:"cert_file"`
	KeyFile  string           `json:"key_file"`
	Plugins  []Plugin         `json:"plugins"`
	Paths    map[string]*Path `json:"paths"`
	Echo     *echo.Echo       `json:"-"`
}

type Path

type Path struct {
	Plugins []Plugin `json:"plugins"`
}

type Plugin added in v0.2.3

type Plugin map[string]interface{}

type TLS

type TLS struct {
	Address   string `json:"address"`
	CertFile  string `json:"cert_file"`
	KeyFile   string `json:"key_file"`
	Auto      bool   `json:"auto"`
	CacheFile string `json:"cache_file"`
}

Directories

Path Synopsis
cmd
armor command
package plugin is a generated protocol buffer package.
package plugin is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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