types

package
v0.0.0-...-dfb39b5 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddSettings

type AddSettings func(s Setter)

type Config

type Config struct {
	Enabled bool

	Profiler struct {
		Enabled bool
		Global  bool
	}

	Proxy struct {
		FollowRedirects bool
		OutboundTimeout time.Duration
	}
}

type DefaultErrorHandler

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

func NewDefaultErrorHandler

func NewDefaultErrorHandler(log *zap.Logger) DefaultErrorHandler

func (DefaultErrorHandler) Handler

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 FilterMetaArg struct {
	Label   string                 `json:"label"`
	Type    string                 `json:"type"`
	Example string                 `json:"example"`
	Options map[string]interface{} `json:"options"`
}

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 Handler

type Handler interface {
	HTTPHandler
	fmt.Stringer

	New(Config) Handler
	Merge([]byte, Config) (Handler, error)
	Meta() FilterMeta
	Enabled() bool
}

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

func (h MockHandler) Merge(params []byte, cfg Config) (Handler, error)

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 MockRoundTripper func(*http.Request) (*http.Response, error)

func (MockRoundTripper) RoundTrip

func (mrt MockRoundTripper) RoundTrip(rq *http.Request) (r *http.Response, err error)

type MockStorer

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

func (s *Scp) Dict() map[string]interface{}

func (*Scp) Filter

func (s *Scp) Filter(fn func(k string, v interface{}) bool) *Scp

func (Scp) Get

func (s Scp) Get(k string) (v interface{}, err error)

func (Scp) Has

func (s Scp) Has(k string) (has bool)

func (Scp) Keys

func (s Scp) Keys() (kk []string)

func (Scp) Opts

func (s Scp) Opts() *options.ApigwOpt

func (Scp) Request

func (s Scp) Request() *h.Request

func (Scp) Set

func (s Scp) Set(k string, v interface{})

func (Scp) Writer

func (s Scp) Writer() http.ResponseWriter

type SecureStorager

type SecureStorager interface{}

type Setter

type Setter interface {
	UpdateSettings(st ...AddSettings)
}

type Settings

type Settings struct {
	Enabled         bool
	ProfilerGlobal  bool
	ProfilerEnabled bool
}

Jump to

Keyboard shortcuts

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