web

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

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

Go to latest
Published: Mar 15, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CRUDWeb

type CRUDWeb struct {
	Crud        kitty.CRUDInterface
	Ctx         externCtx
	Params      map[string]interface{}
	WebResponse WebResponse
}

CRUDWeb web接口

func NewLocalWeb

func NewLocalWeb(conf *Config) *CRUDWeb

NewLocalWeb ..

func NewRPCWeb

func NewRPCWeb(conf *Config) *CRUDWeb

NewRPCWeb .

func (*CRUDWeb) CallRPC

func (web *CRUDWeb) CallRPC(c *gin.Context)

CallRPC ..

func (*CRUDWeb) CallRPC2

func (web *CRUDWeb) CallRPC2(w http.ResponseWriter, r *http.Request)

CallRPC2 ..

func (*CRUDWeb) Create

func (web *CRUDWeb) Create(c *gin.Context)

Create ...

func (*CRUDWeb) Create2

func (web *CRUDWeb) Create2(w http.ResponseWriter, r *http.Request)

Create2 ...

func (*CRUDWeb) List

func (web *CRUDWeb) List(c *gin.Context)

List ...

func (*CRUDWeb) List2

func (web *CRUDWeb) List2(w http.ResponseWriter, r *http.Request)

List2 ..

func (*CRUDWeb) One

func (web *CRUDWeb) One(c *gin.Context)

One ...

func (*CRUDWeb) One2

func (web *CRUDWeb) One2(w http.ResponseWriter, r *http.Request)

One2 ...

func (*CRUDWeb) Update

func (web *CRUDWeb) Update(c *gin.Context)

Update ...

func (*CRUDWeb) Update2

func (web *CRUDWeb) Update2(w http.ResponseWriter, r *http.Request)

Update2 ...

type Config

type Config struct {
	Model       interface{}
	Ctx         externCtx
	DB          *gorm.DB
	RPC         kitty.RPC
	Callbk      kitty.SuccessCallback
	Params      map[string]interface{}
	WebResponse WebResponse
}

Config 配置

type WebResponse

type WebResponse interface {
	Response(kitty.Context, interface{}, error)
}

WebResponse default json output

Jump to

Keyboard shortcuts

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