Documentation
¶
Index ¶
- type AddSettings
- type Config
- type DefaultErrorHandler
- type ErrorHandlerFunc
- type FilterKind
- type FilterMeta
- type FilterMetaArg
- type FilterMetaList
- type HTTPErrorHandler
- type HTTPHandler
- type Handler
- type HandlerFunc
- type MockErrorHandler
- type MockExecer
- type MockHandler
- type MockRoundTripper
- type MockStorer
- type Scp
- func (s *Scp) Dict() map[string]interface{}
- func (s *Scp) Filter(fn func(k string, v interface{}) bool) *Scp
- func (s Scp) Get(k string) (v interface{}, err error)
- func (s Scp) Has(k string) (has bool)
- func (s Scp) Keys() (kk []string)
- func (s Scp) Opts() *options.ApigwOpt
- func (s Scp) Request() *h.Request
- func (s Scp) Set(k string, v interface{})
- func (s Scp) Writer() http.ResponseWriter
- type SecureStorager
- type Setter
- type Settings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddSettings ¶
type AddSettings func(s Setter)
type DefaultErrorHandler ¶
type DefaultErrorHandler struct {
// contains filtered or unexported fields
}
func NewDefaultErrorHandler ¶
func NewDefaultErrorHandler(log *zap.Logger) DefaultErrorHandler
func (DefaultErrorHandler) Handler ¶
func (h DefaultErrorHandler) Handler() ErrorHandlerFunc
type ErrorHandlerFunc ¶
type ErrorHandlerFunc func(rw http.ResponseWriter, r *http.Request, err error)
type FilterKind ¶
type FilterKind string
const ( PreFilter FilterKind = "prefilter" PostFilter FilterKind = "postfilter" Processer FilterKind = "processer" )
type FilterMeta ¶
type FilterMeta struct {
Wgt int `json:"-"`
Name string `json:"name"`
Label string `json:"label"`
Kind FilterKind `json:"kind"`
Args []*FilterMetaArg `json:"params,omitempty"`
}
type FilterMetaArg ¶
type FilterMetaList ¶
type FilterMetaList []*FilterMeta
func (FilterMetaList) Filter ¶
func (fm FilterMetaList) Filter(f func(*FilterMeta) (bool, error)) (out FilterMetaList, err error)
type HTTPErrorHandler ¶
type HTTPErrorHandler interface {
Handler() ErrorHandlerFunc
}
type HTTPHandler ¶
type HTTPHandler interface {
Handler() HandlerFunc
}
type HandlerFunc ¶
type HandlerFunc func(rw http.ResponseWriter, r *http.Request) error
type MockErrorHandler ¶
type MockErrorHandler struct {
Handler_ ErrorHandlerFunc
}
func (MockErrorHandler) Handler ¶
func (h MockErrorHandler) Handler() ErrorHandlerFunc
type MockExecer ¶
type MockExecer struct {
Exec_ func(context.Context, *Scp) (err error)
Type_ func() FilterKind
}
type MockHandler ¶
type MockHandler struct {
Foo string `json:"foo"`
Handler_ HandlerFunc
}
func (MockHandler) Enabled ¶
func (h MockHandler) Enabled() bool
func (MockHandler) Handler ¶
func (h MockHandler) Handler() HandlerFunc
func (MockHandler) Meta ¶
func (h MockHandler) Meta() FilterMeta
func (MockHandler) New ¶
func (h MockHandler) New(cfg Config) Handler
func (MockHandler) String ¶
func (h MockHandler) String() string
type MockRoundTripper ¶
type MockStorer ¶
type MockStorer struct {
F func(context.Context, st.ApigwFilterFilter) (st.ApigwFilterSet, st.ApigwFilterFilter, error)
R func(context.Context, st.ApigwRouteFilter) (st.ApigwRouteSet, st.ApigwRouteFilter, error)
}
func (MockStorer) SearchApigwFilters ¶
func (td MockStorer) SearchApigwFilters(ctx context.Context, f st.ApigwFilterFilter) (s st.ApigwFilterSet, ff st.ApigwFilterFilter, err error)
func (MockStorer) SearchApigwRoutes ¶
func (td MockStorer) SearchApigwRoutes(ctx context.Context, f st.ApigwRouteFilter) (s st.ApigwRouteSet, ff st.ApigwRouteFilter, err error)
type Scp ¶
type Scp map[string]interface{}
func (Scp) Writer ¶
func (s Scp) Writer() http.ResponseWriter
type SecureStorager ¶
type SecureStorager interface{}
type Setter ¶
type Setter interface {
UpdateSettings(st ...AddSettings)
}
Click to show internal directories.
Click to hide internal directories.