Documentation
¶
Index ¶
- Constants
- Variables
- func SetArgsHeader(ctx context.Context, header http.Header) context.Context
- func SetArgsQuery(ctx context.Context, values url.Values) context.Context
- type Client
- type ClientConfig
- type Config
- type Context
- func (c *Context) Bind(a any) error
- func (c *Context) Query() url.Values
- func (c *Context) RHeader() http.Header
- func (c *Context) WHeader() http.Header
- func (c *Context) Write(b []byte) (int, error)
- func (c *Context) WriteAny(a any) error
- func (c *Context) WriteFlush(b []byte) (int, error)
- func (c *Context) WriteLn(b []byte) (int, error)
- func (c *Context) WriteString(s string) (int, error)
- func (c *Context) WriteStringLn(s string) (int, error)
- type Handler
- type Server
- func (s *Server) AutoServe(ln net.Listener) error
- func (s *Server) Close() error
- func (s *Server) Context() context.Context
- func (s *Server) Serve(ln net.Listener) error
- func (s *Server) ServeTLS(l net.Listener, certFile string, keyFile string) error
- func (s *Server) Set(name string, handlers ...Handler)
- type Type
Constants ¶
View Source
const ( ArgsQuery = "xhttp-query" ArgsHeader = "xhttp-header" )
Variables ¶
View Source
var ErrAuthFailed = errors.New("auth failed")
View Source
var ErrRejectHandle = errors.New("reject handle")
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(cfg *ClientConfig) *Client
type ClientConfig ¶
Click to show internal directories.
Click to hide internal directories.