plugin

package
Version: v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2016 License: MIT Imports: 18 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) Initialize

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

func (*AddTrailingSlash) Priority

func (*AddTrailingSlash) Priority() int

func (*AddTrailingSlash) Process

func (*AddTrailingSlash) Terminate

func (*AddTrailingSlash) Terminate()

type Balancer

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

type Base

type Base struct {
	Middleware echo.MiddlewareFunc `json:"-"`
	Armor      *armor.Armor        `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) Initialize

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

func (*BodyLimit) Priority

func (*BodyLimit) Priority() int

func (*BodyLimit) Process

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

func (*BodyLimit) Terminate

func (*BodyLimit) Terminate()

type CORS

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

func (*CORS) Initialize

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

func (*CORS) Priority

func (*CORS) Priority() int

func (*CORS) Process

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

func (*CORS) Terminate

func (*CORS) Terminate()

type Gzip

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

func (*Gzip) Initialize

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

func (*Gzip) Priority

func (*Gzip) Priority() int

func (*Gzip) Process

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

func (*Gzip) Terminate

func (*Gzip) Terminate()

type HTTPSNonWWWRedirect

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

func (*HTTPSNonWWWRedirect) Initialize

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

func (*HTTPSNonWWWRedirect) Priority

func (*HTTPSNonWWWRedirect) Priority() int

func (*HTTPSNonWWWRedirect) Process

func (*HTTPSNonWWWRedirect) Terminate

func (*HTTPSNonWWWRedirect) Terminate()

type HTTPSRedirect

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

func (*HTTPSRedirect) Initialize

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

func (*HTTPSRedirect) Priority

func (*HTTPSRedirect) Priority() int

func (*HTTPSRedirect) Process

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

func (*HTTPSRedirect) Terminate

func (*HTTPSRedirect) Terminate()

type HTTPSWWWRedirect

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

func (*HTTPSWWWRedirect) Initialize

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

func (*HTTPSWWWRedirect) Priority

func (*HTTPSWWWRedirect) Priority() int

func (*HTTPSWWWRedirect) Process

func (*HTTPSWWWRedirect) Terminate

func (*HTTPSWWWRedirect) Terminate()
type Header struct {
	Base `json:",squash"`
	Set  map[string]string `json:"set"`
	Add  map[string]string `json:"add"`
	Del  []string          `json:"del"`
}

func (*Header) Initialize

func (*Header) Initialize() (err error)

func (*Header) Priority

func (*Header) Priority() int

func (*Header) Process

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

func (*Header) Terminate

func (*Header) Terminate()

type Logger

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

func (*Logger) Initialize

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

func (*Logger) Priority

func (*Logger) Priority() int

func (*Logger) Process

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

func (*Logger) Terminate

func (*Logger) Terminate()

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 NATS

type NATS struct {
	Base    `json:",squash"`
	Subject string `json:"subject"`
	// Publish *natsPub `json:"publish"`
	// Request *natsReq `json:"request"`
	Async bool `json:"async"`
	// contains filtered or unexported fields
}

func (*NATS) Initialize

func (n *NATS) Initialize() (err error)

func (*NATS) Priority

func (*NATS) Priority() int

func (*NATS) Process

func (n *NATS) Process(next echo.HandlerFunc) echo.HandlerFunc

func (*NATS) Terminate

func (*NATS) Terminate()

type NonWWWRedirect

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

func (*NonWWWRedirect) Initialize

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

func (*NonWWWRedirect) Priority

func (*NonWWWRedirect) Priority() int

func (*NonWWWRedirect) Process

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

func (*NonWWWRedirect) Terminate

func (*NonWWWRedirect) Terminate()

type Plugin

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

func Decode

func Decode(name string, i interface{}, a *armor.Armor) (p Plugin, err error)

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

func Lookup

func Lookup(base Base) (p Plugin)

Lookup returns a plugin by name.

type Proxy

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

func (*Proxy) Initialize

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

func (*Proxy) Priority

func (*Proxy) Priority() int

func (*Proxy) Process

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

func (*Proxy) Terminate

func (*Proxy) Terminate()

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"`
	To   string `json:"to"`
	Code string `json:"code"`
	When string `json:"when"`
}

func (*Redirect) Initialize

func (*Redirect) Initialize() (err error)

func (*Redirect) Priority

func (*Redirect) Priority() int

func (*Redirect) Process

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

func (*Redirect) Terminate

func (*Redirect) Terminate()

type RemoveTrailingSlash

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

func (*RemoveTrailingSlash) Initialize

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

func (*RemoveTrailingSlash) Priority

func (*RemoveTrailingSlash) Priority() int

func (*RemoveTrailingSlash) Process

func (*RemoveTrailingSlash) Terminate

func (*RemoveTrailingSlash) Terminate()

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) Initialize

func (*Secure) Initialize() (err error)

func (*Secure) Priority

func (*Secure) Priority() int

func (*Secure) Process

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

func (*Secure) Terminate

func (*Secure) Terminate()

type Static

type Static struct {
	Base                    `json:",squash"`
	middleware.StaticConfig `json:",squash"`
}

func (*Static) Initialize

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

func (*Static) Priority

func (*Static) Priority() int

func (*Static) Process

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

func (*Static) Terminate

func (*Static) Terminate()

type Target

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

type WWWRedirect

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

func (*WWWRedirect) Initialize

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

func (*WWWRedirect) Priority

func (*WWWRedirect) Priority() int

func (*WWWRedirect) Process

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

func (*WWWRedirect) Terminate

func (*WWWRedirect) Terminate()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to