cgw

package
v0.0.0-...-ae88a46 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

README

cgw

cgw参考

Documentation

Overview

Package cgw

@author: xwc1125

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrConfConvert = fmt.Errorf("convert to conf err")
)

Functions

This section is empty.

Types

type CgwInterfacePart

type CgwInterfacePart struct {
	plugins.DefaultPlugin
	// contains filtered or unexported fields
}

func (*CgwInterfacePart) Name

func (p *CgwInterfacePart) Name() string

func (*CgwInterfacePart) ParseConf

func (p *CgwInterfacePart) ParseConf(in []byte) (interface{}, error)

func (*CgwInterfacePart) Priority

func (p *CgwInterfacePart) Priority() int64

func (*CgwInterfacePart) RequestFilter

func (p *CgwInterfacePart) RequestFilter(conf interface{}, r *fasthttp.Request, w *fasthttp.Response) (err error)

func (*CgwInterfacePart) Version

func (p *CgwInterfacePart) Version() string

type CgwInterfacePartConf

type CgwInterfacePartConf struct {
	Disable    bool            `json:"disable"`
	Interfaces []InterfaceInfo `json:"interfaces"` // InterfaceName-->api info
}

type InterfaceInfo

type InterfaceInfo struct {
	InterfaceName string `json:"interface_name" comment:"InterfaceName"`
	DestUri       string `json:"dest_uri" comment:"目标URI"`
	Method        string `json:"method,omitempty" comment:"代理的方法"`
}

type InterfacePart

type InterfacePart struct {
	InterfaceName string      `json:"interfaceName,omitempty"`
	Param         interface{} `json:"para"` // json params for different products
}

InterfacePart defines the inner content of cgw-request

type InterfaceReq

type InterfaceReq struct {
	InterfaceName string      `json:"InterfaceName" comment:"InterfaceName"`
	Data          interface{} `json:"Data,omitempty" comment:"业务内容"`
}

Directories

Path Synopsis
Package cgw_v2
Package cgw_v2

Jump to

Keyboard shortcuts

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