response_rewrite

package
v0.0.0-...-034c2bd Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "response_rewrite"
)

Variables

This section is empty.

Functions

func B64Decode

func B64Decode(input string) (string, error)

B64Decode base64解密

func Register

func Register(register eosc.IExtenderDriverRegister)

Types

type Config

type Config struct {
	StatusCode int               `json:"status_code"`
	Body       string            `json:"body"`
	BodyBase64 bool              `json:"body_base64"`
	Headers    map[string]string `json:"headers"`
	Match      *MatchConf        `json:"match"`
}

type Driver

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

func (*Driver) Check

func (d *Driver) Check(v interface{}, workers map[eosc.RequireId]interface{}) error

func (*Driver) ConfigType

func (d *Driver) ConfigType() reflect.Type

func (*Driver) Create

func (d *Driver) Create(id, name string, v interface{}, workers map[eosc.RequireId]interface{}) (eosc.IWorker, error)

type Factory

type Factory struct {
}

func NewFactory

func NewFactory() *Factory

func (*Factory) Create

func (f *Factory) Create(profession string, name string, label string, desc string, params map[string]interface{}) (eosc.IExtenderDriver, error)

type MatchConf

type MatchConf struct {
	Code []int `json:"code"`
}

type ResponseRewrite

type ResponseRewrite struct {
	*Driver
	// contains filtered or unexported fields
}

func (*ResponseRewrite) CheckSkill

func (r *ResponseRewrite) CheckSkill(skill string) bool

func (*ResponseRewrite) Destroy

func (r *ResponseRewrite) Destroy()

func (*ResponseRewrite) DoFilter

func (r *ResponseRewrite) DoFilter(ctx http_service.IHttpContext, next http_service.IChain) (err error)

func (*ResponseRewrite) Id

func (r *ResponseRewrite) Id() string

func (*ResponseRewrite) Reset

func (r *ResponseRewrite) Reset(v interface{}, workers map[eosc.RequireId]interface{}) error

func (*ResponseRewrite) Start

func (r *ResponseRewrite) Start() error

func (*ResponseRewrite) Stop

func (r *ResponseRewrite) Stop() error

Jump to

Keyboard shortcuts

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