internal

package
v0.0.0-...-2c721bc Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrModelRequired = errors.New("model is required")
	ErrNotSupport    = errors.New("not support")
)

Functions

This section is empty.

Types

type Request

type Request struct {
	Method      string              `json:"method,omitempty"`
	URL         string              `json:"url,omitempty"`
	Path        string              `json:"path,omitempty"`
	QueryParams map[string][]string `json:"query_params,omitempty"`
	Body        []byte              `json:"body,omitempty"`
}

Request 代理请求对象

type Server

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

func NewServer

func NewServer(conf *config.Config) (*Server, error)

func (*Server) Dispatch

func (s *Server) Dispatch(w http.ResponseWriter, r *http.Request) error

Dispatch 请求分发实现逻辑

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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