func Only(op Operation) Matcher {
	return func(ctx *Context) bool {
		return ctx.Operation&op != 0
	}
}
Only will match if the operation is present in the provided list.
package fire
import (
	"time"
	"github.com/256dpi/xo"
)
type Callback struct {
	Name string
	Stage Stage
	Matcher Matcher
	Handler Handler
}
type L = []*Callback
func C(name string, s Stage, m Matcher, h Handler) *Callback {
	if name == "" || m == nil || h == nil {
		panic("fire: missing parameters")
	}
	return &Callback{
		Name:    name,
		Stage:   s,
		Matcher: m,
		Handler: func(ctx *Context) error {
			ctx.Tracer.Push(name)
			defer ctx.Tracer.Pop()
			err := h(ctx)
			if err != nil {
				return xo.W(err)
			}
			return nil
		},
	}
}
type Action struct {
	Methods []string
	BodyLimit int64
	Timeout time.Duration
	Handler Handler
}
type M = map[string]*Action
func A(name string, methods []string, bodyLimit int64, h Handler) *Action {
	if len(methods) == 0 || h == nil {
		panic("fire: missing methods or handler")
	}
	return &Action{
		Methods:   methods,
		BodyLimit: bodyLimit,
		Handler: func(ctx *Context) error {
			ctx.Tracer.Push(name)
			defer ctx.Tracer.Pop()
			err := h(ctx)
			if err != nil {
				return xo.W(err)
			}
			return nil
		},
	}
}
type Handler func(ctx *Context) error
type Matcher func(ctx *Context) bool
func All() Matcher {
	return func(ctx *Context) bool {
		return true
	}
}