chi

package
v0.0.0-...-0d5b6d2 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 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 Chi

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

Chi structure value is a Chi GoAdmin adapter.

func (*Chi) AddHandler

func (ch *Chi) AddHandler(method, path string, handlers context.Handlers)

AddHandler implements the method Adapter.AddHandler.

func (*Chi) Content

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

Content implements the method Adapter.Content.

func (*Chi) FormParam

func (ch *Chi) FormParam() url.Values

FormParam implements the method Adapter.FormParam.

func (*Chi) GetCookie

func (ch *Chi) GetCookie() (string, error)

GetCookie implements the method Adapter.GetCookie.

func (*Chi) IsPjax

func (ch *Chi) IsPjax() bool

IsPjax implements the method Adapter.IsPjax.

func (*Chi) Lang

func (ch *Chi) Lang() string

Lang implements the method Adapter.Lang.

func (*Chi) Method

func (ch *Chi) Method() string

Method implements the method Adapter.Method.

func (*Chi) Name

func (*Chi) Name() string

Name implements the method Adapter.Name.

func (*Chi) Path

func (ch *Chi) Path() string

Path implements the method Adapter.Path.

func (*Chi) Query

func (ch *Chi) Query() url.Values

Query implements the method Adapter.Query.

func (*Chi) Redirect

func (ch *Chi) Redirect()

Redirect implements the method Adapter.Redirect.

func (*Chi) SetApp

func (ch *Chi) SetApp(app interface{}) error

SetApp implements the method Adapter.SetApp.

func (*Chi) SetContentType

func (ch *Chi) SetContentType()

SetContentType implements the method Adapter.SetContentType.

func (*Chi) SetContext

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

SetContext implements the method Adapter.SetContext.

func (*Chi) Use

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

Use implements the method Adapter.Use.

func (*Chi) User

func (ch *Chi) User(ctx interface{}) (models.UserModel, bool)

User implements the method Adapter.User.

func (*Chi) Write

func (ch *Chi) Write(body []byte)

Write implements the method Adapter.Write.

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)

Jump to

Keyboard shortcuts

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