adapter

package
v1.2.13 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseAdapter added in v1.2.12

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

func (*BaseAdapter) CookieKey added in v1.2.12

func (base *BaseAdapter) CookieKey() string

func (*BaseAdapter) GetConnection added in v1.2.12

func (base *BaseAdapter) GetConnection() db.Connection

func (*BaseAdapter) GetContent added in v1.2.12

func (base *BaseAdapter) GetContent(ctx interface{}, getPanelFn types.GetPanelFn, wf WebFrameWork)

func (*BaseAdapter) GetUse added in v1.2.12

func (base *BaseAdapter) GetUse(router interface{}, plugin []plugins.Plugin, wf WebFrameWork) error

func (*BaseAdapter) GetUser added in v1.2.12

func (base *BaseAdapter) GetUser(ci interface{}, wf WebFrameWork) (models.UserModel, bool)

func (*BaseAdapter) HTMLContentType added in v1.2.12

func (base *BaseAdapter) HTMLContentType() string

func (*BaseAdapter) SetConnection added in v1.2.12

func (base *BaseAdapter) SetConnection(conn db.Connection)

type WebFrameWork

type WebFrameWork interface {
	Use(interface{}, []plugins.Plugin) error
	Content(interface{}, types.GetPanelFn)
	SetConnection(db.Connection)
	GetConnection() db.Connection
	SetContext(ctx interface{}) WebFrameWork
	GetCookie() (string, error)
	Path() string
	Method() string
	FormParam() url.Values
	PjaxHeader() string
	Redirect()
	SetContentType()
	Write(body []byte)
	CookieKey() string
	HTMLContentType() string
	Name() string
	User(ci interface{}) (models.UserModel, bool)
	SetApp(app interface{}) error
	AddHandler(method, path string, handlers context.Handlers)
}

WebFrameWork is an interface which is used as an adapter of framework and goAdmin. It must implement two methods. Use registers the routes and the corresponding handlers. Content writes the response to the corresponding context of framework.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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