proxy

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetData

func GetData(response *http.Response) []byte

func ResponseFormat

func ResponseFormat(response *http.Response) []byte

Types

type Proxy

type Proxy struct {
	Interceptors interceptors
	// contains filtered or unexported fields
}

Proxy is a gateway proxy.

func New

func New(clientFactory client.Factory, middlewareFactory middleware.FactoryV2) (*Proxy, error)

New is new a gateway proxy.

func (*Proxy) DebugHandler

func (p *Proxy) DebugHandler() http.Handler

DebugHandler implemented debug handler.

func (*Proxy) ServeHTTP

func (p *Proxy) ServeHTTP(w http.ResponseWriter, req *http.Request)

func (*Proxy) Update

func (p *Proxy) Update(c *config.Config) (retError error)

Update updates service endpoint.

type Response

type Response struct {
	Code     int32             `json:"code,omitempty"`
	Reason   string            `json:"reason,omitempty"`
	Data     any               `json:"data"`
	Message  string            `json:"message,omitempty"`
	Metadata map[string]string `json:"metadata,omitempty"`
	TraceID  string            `json:"trace_id,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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