plugin

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2017 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

package plugin is a generated protocol buffer package.

It is generated from these files:

message.proto

It has these top-level messages:

Message

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddTrailingSlash

type AddTrailingSlash struct {
	Base                           `json:",squash"`
	middleware.TrailingSlashConfig `json:",squash"`
}

func (*AddTrailingSlash) Init added in v0.2.1

func (s *AddTrailingSlash) Init() (err error)

func (*AddTrailingSlash) Priority

func (*AddTrailingSlash) Priority() int

func (*AddTrailingSlash) Process

type Balancer

type Balancer interface {
	Next(int) *Target
	Length() int
}

type Base

type Base struct {
	Skip       string              `json:"skip"`
	Middleware echo.MiddlewareFunc `json:"-"`
	Armor      *armor.Armor        `json:"-"`
	Echo       *echo.Echo          `json:"-"`
	Logger     *log.Logger         `json:"-"`
	// contains filtered or unexported fields
}

Base defines the base struct for plugins.

func (*Base) Name

func (b *Base) Name() string

type BodyLimit

type BodyLimit struct {
	Base                       `json:",squash"`
	middleware.BodyLimitConfig `json:",squash"`
}

func (*BodyLimit) Init added in v0.2.1

func (l *BodyLimit) Init() (err error)

func (*BodyLimit) Priority

func (*BodyLimit) Priority() int

func (*BodyLimit) Process

func (l *BodyLimit) Process(next echo.HandlerFunc) echo.HandlerFunc

type CORS

type CORS struct {
	Base                  `json:",squash"`
	middleware.CORSConfig `json:",squash"`
}

func (*CORS) Init added in v0.2.1

func (c *CORS) Init() (err error)

func (*CORS) Priority

func (*CORS) Priority() int

func (*CORS) Process

func (c *CORS) Process(next echo.HandlerFunc) echo.HandlerFunc

type Cube added in v0.2.7

type Cube struct {
	Base `json:",squash"`
	Path string `json:"path"`
	Key  string `json:"key"`
	// contains filtered or unexported fields
}

func (*Cube) Init added in v0.2.7

func (c *Cube) Init() (err error)

func (*Cube) Priority added in v0.2.7

func (*Cube) Priority() int

func (*Cube) Process added in v0.2.7

func (c *Cube) Process(next echo.HandlerFunc) echo.HandlerFunc

type Expression added in v0.2.7

type Expression struct {
	*fasttemplate.Template
}

func NewExpression added in v0.2.7

func NewExpression(t string) *Expression

func (*Expression) Evaluate added in v0.2.7

func (e *Expression) Evaluate(c echo.Context) (interface{}, error)

type File added in v0.2.1

type File struct {
	Base `json:",squash"`
	Path string `json:"path"`
}

func (*File) Init added in v0.2.1

func (f *File) Init() (err error)

func (*File) Priority added in v0.2.1

func (*File) Priority() int

func (*File) Process added in v0.2.1

func (f *File) Process(next echo.HandlerFunc) echo.HandlerFunc

type Gzip

type Gzip struct {
	Base                  `json:",squash"`
	middleware.GzipConfig `json:",squash"`
}

func (*Gzip) Init added in v0.2.1

func (g *Gzip) Init() (err error)

func (*Gzip) Priority

func (*Gzip) Priority() int

func (*Gzip) Process

func (g *Gzip) Process(next echo.HandlerFunc) echo.HandlerFunc

type HTTPSNonWWWRedirect

type HTTPSNonWWWRedirect struct {
	Base                      `json:",squash"`
	middleware.RedirectConfig `json:",squash"`
}

func (*HTTPSNonWWWRedirect) Init added in v0.2.1

func (r *HTTPSNonWWWRedirect) Init() (err error)

func (*HTTPSNonWWWRedirect) Priority

func (*HTTPSNonWWWRedirect) Priority() int

func (*HTTPSNonWWWRedirect) Process

type HTTPSRedirect

type HTTPSRedirect struct {
	Base                      `json:",squash"`
	middleware.RedirectConfig `json:",squash"`
}

func (*HTTPSRedirect) Init added in v0.2.1

func (r *HTTPSRedirect) Init() (err error)

func (*HTTPSRedirect) Priority

func (*HTTPSRedirect) Priority() int

func (*HTTPSRedirect) Process

func (r *HTTPSRedirect) Process(next echo.HandlerFunc) echo.HandlerFunc

type HTTPSWWWRedirect

type HTTPSWWWRedirect struct {
	Base                      `json:",squash"`
	middleware.RedirectConfig `json:",squash"`
}

func (*HTTPSWWWRedirect) Init added in v0.2.1

func (r *HTTPSWWWRedirect) Init() (err error)

func (*HTTPSWWWRedirect) Priority

func (*HTTPSWWWRedirect) Priority() int

func (*HTTPSWWWRedirect) Process

type Header struct {
	Base `json:",squash"`
	Set  map[string]string `json:"set"`
	Add  map[string]string `json:"add"`
	Del  []string          `json:"del"`
}

func (*Header) Init added in v0.2.1

func (*Header) Init() (err error)

func (*Header) Priority

func (*Header) Priority() int

func (*Header) Process

func (h *Header) Process(next echo.HandlerFunc) echo.HandlerFunc

type Logger

type Logger struct {
	middleware.LoggerConfig `json:",squash"`
	Base                    `json:",squash"`
}

func (*Logger) Init added in v0.2.1

func (l *Logger) Init() (err error)

func (*Logger) Priority

func (*Logger) Priority() int

func (*Logger) Process

func (l *Logger) Process(next echo.HandlerFunc) echo.HandlerFunc

type Message

type Message struct {
	ExternalId string `protobuf:"bytes,1,opt,name=externalId" json:"externalId,omitempty"`
	Body       []byte `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
}

func (*Message) Descriptor

func (*Message) Descriptor() ([]byte, []int)

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) Reset

func (m *Message) Reset()

func (*Message) String

func (m *Message) String() string

type NonWWWRedirect

type NonWWWRedirect struct {
	Base                      `json:",squash"`
	middleware.RedirectConfig `json:",squash"`
}

func (*NonWWWRedirect) Init added in v0.2.1

func (r *NonWWWRedirect) Init() (err error)

func (*NonWWWRedirect) Priority

func (*NonWWWRedirect) Priority() int

func (*NonWWWRedirect) Process

func (r *NonWWWRedirect) Process(next echo.HandlerFunc) echo.HandlerFunc

type Plugin

type Plugin interface {
	Name() string
	Init() error
	Process(echo.HandlerFunc) echo.HandlerFunc
	Priority() int
}

func Decode

func Decode(pi armor.Plugin, a *armor.Armor, e *echo.Echo) (p Plugin, err error)

Decode searches the plugin by name, decodes the provided map into plugin and calls Plugin#Init().

type Proxy

type Proxy struct {
	Base    `json:",squash"`
	Balance string    `json:"balance"`
	Targets []*Target `json:"targets"`
	// contains filtered or unexported fields
}

func (*Proxy) Init added in v0.2.1

func (p *Proxy) Init() (err error)

func (*Proxy) Priority

func (*Proxy) Priority() int

func (*Proxy) Process

func (p *Proxy) Process(echo.HandlerFunc) echo.HandlerFunc

type Random

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

func (*Random) Length

func (r *Random) Length() int

func (*Random) Next

func (r *Random) Next(i int) *Target

type Redirect

type Redirect struct {
	Base `json:",squash"`
	From string `json:"from"`
	To   string `json:"to"`
	Code int    `json:"code"`
}

func (*Redirect) Init added in v0.2.1

func (r *Redirect) Init() (err error)

func (*Redirect) Priority

func (*Redirect) Priority() int

func (*Redirect) Process

func (r *Redirect) Process(next echo.HandlerFunc) echo.HandlerFunc

type RemoveTrailingSlash

type RemoveTrailingSlash struct {
	Base                           `json:",squash"`
	middleware.TrailingSlashConfig `json:",squash"`
}

func (*RemoveTrailingSlash) Init added in v0.2.1

func (s *RemoveTrailingSlash) Init() (err error)

func (*RemoveTrailingSlash) Priority

func (*RemoveTrailingSlash) Priority() int

func (*RemoveTrailingSlash) Process

type Rewrite

type Rewrite struct {
	Base `json:",squash"`
	From string `json:"from"`
	To   string `json:"to"`
	Code string `json:"code"`
	When string `json:"when"`
}

type RoundRobin

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

func (*RoundRobin) Length

func (r *RoundRobin) Length() int

func (*RoundRobin) Next

func (r *RoundRobin) Next(i int) *Target

type Secure

type Secure struct {
	Base                    `json:",squash"`
	middleware.SecureConfig `json:",squash"`
}

func (*Secure) Init added in v0.2.1

func (*Secure) Init() (err error)

func (*Secure) Priority

func (*Secure) Priority() int

func (*Secure) Process

func (s *Secure) Process(next echo.HandlerFunc) echo.HandlerFunc

type Static

type Static struct {
	Base `json:",squash"`

	// Root directory from where the static content is served.
	// Required.
	Root string `json:"root"`

	// Index file for serving a directory.
	// Optional. Default value "index.html".
	Index string `json:"index"`

	// Enable HTML5 mode by forwarding all not-found requests to root so that
	// SPA (single-page application) can handle the routing.
	// Optional. Default value false.
	HTML5 bool `json:"html5"`

	// Enable directory browsing.
	// Optional. Default value false.
	Browse bool `json:"browse"`
}

func (*Static) Init added in v0.2.1

func (s *Static) Init() (err error)

func (*Static) Priority

func (*Static) Priority() int

func (*Static) Process

func (s *Static) Process(next echo.HandlerFunc) echo.HandlerFunc

type Target

type Target struct {
	Name string `json:"name,omitempty"`
	URL  string `json:"url"`
	// contains filtered or unexported fields
}

type Template added in v0.2.1

type Template struct {
	*fasttemplate.Template
}

func NewTemplate added in v0.2.1

func NewTemplate(t string) *Template

func (*Template) Execute added in v0.2.1

func (t *Template) Execute(c echo.Context) (string, error)

type WWWRedirect

type WWWRedirect struct {
	Base                      `json:",squash"`
	middleware.RedirectConfig `json:",squash"`
}

func (*WWWRedirect) Init added in v0.2.1

func (r *WWWRedirect) Init() (err error)

func (*WWWRedirect) Priority

func (*WWWRedirect) Priority() int

func (*WWWRedirect) Process

func (r *WWWRedirect) Process(next echo.HandlerFunc) echo.HandlerFunc

Jump to

Keyboard shortcuts

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