plugin

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2017 License: MIT Imports: 17 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 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"`
	cube.Config `json:",squash"`
}

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"`
	middleware.ProxyConfig `json:",squash"`
	Balance                string    `json:"balance"`
	Targets                []*Target `json:"targets"`
}

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(next echo.HandlerFunc) echo.HandlerFunc

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 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"`
	middleware.StaticConfig `json:",squash"`
}

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"`
}

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