nethttp

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Content

func Content(handler HandlerFunc) http.HandlerFunc

Types

type Context

type Context struct {
	Request  *http.Request
	Response http.ResponseWriter
}

Context wraps the Request and Response object of Chi.

type HandleFun

type HandleFun func(pattern string, handlerFn http.HandlerFunc)

HandleFun is type of route methods of chi.

type HandlerFunc

type HandlerFunc func(ctx Context) (types.Panel, error)

type NetHTTP

type NetHTTP struct {
	adapter.BaseAdapter
	// contains filtered or unexported fields
}

func (*NetHTTP) AddHandler

func (nh *NetHTTP) AddHandler(method, path string, handlers context.Handlers)

AddHandler implements the method Adapter.AddHandler.

func (*NetHTTP) Content

func (nh *NetHTTP) Content(ctx interface{}, getPanelFn types.GetPanelFn, fn context.NodeProcessor, btns ...types.Button)

Content implements the method Adapter.Content.

func (*NetHTTP) FormParam

func (nh *NetHTTP) FormParam() url.Values

FormParam implements the method Adapter.FormParam.

func (*NetHTTP) GetCookie

func (nh *NetHTTP) GetCookie() (string, error)

GetCookie implements the method Adapter.GetCookie.

func (*NetHTTP) IsPjax

func (nh *NetHTTP) IsPjax() bool

IsPjax implements the method Adapter.IsPjax.

func (*NetHTTP) Lang

func (nh *NetHTTP) Lang() string

Lang implements the method Adapter.Lang.

func (*NetHTTP) Method

func (nh *NetHTTP) Method() string

Method implements the method Adapter.Method.

func (*NetHTTP) Name

func (*NetHTTP) Name() string

Name implements the method Adapter.Name.

func (*NetHTTP) Path

func (nh *NetHTTP) Path() string

Path implements the method Adapter.Path.

func (*NetHTTP) Query

func (nh *NetHTTP) Query() url.Values

Query implements the method Adapter.Query.

func (*NetHTTP) Redirect

func (nh *NetHTTP) Redirect()

Redirect implements the method Adapter.Redirect.

func (*NetHTTP) Request

func (nh *NetHTTP) Request() *http.Request

Request implements the method Adapter.Request.

func (*NetHTTP) SetApp

func (nh *NetHTTP) SetApp(app interface{}) error

SetApp implements the method Adapter.SetApp.

func (*NetHTTP) SetContentType

func (nh *NetHTTP) SetContentType()

SetContentType implements the method Adapter.SetContentType.

func (*NetHTTP) SetContext

func (*NetHTTP) SetContext(contextInterface interface{}) adapter.WebFrameWork

SetContext implements the method Adapter.SetContext.

func (*NetHTTP) Use

func (nh *NetHTTP) Use(app interface{}, plugs []plugins.Plugin) error

Use implements the method Adapter.Use.

func (*NetHTTP) User

func (nh *NetHTTP) User(ctx interface{}) (models.UserModel, bool)

User implements the method Adapter.User.

func (*NetHTTP) Write

func (nh *NetHTTP) Write(body []byte)

Write implements the method Adapter.Write.

Jump to

Keyboard shortcuts

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