biz

package
v0.0.0-...-c2d1e89 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Biz

type Biz struct {
	Router *mux.Router
	DB     *gorm.DB
}

func (*Biz) CreateEmployee

func (b *Biz) CreateEmployee(writer http.ResponseWriter, request *http.Request)

func (*Biz) Delete

func (b *Biz) Delete(path string, f func(writer http.ResponseWriter, request *http.Request))

包装router的DELETE方法

func (*Biz) DeleteEmployee

func (b *Biz) DeleteEmployee(writer http.ResponseWriter, request *http.Request)

func (*Biz) DisableEmployee

func (b *Biz) DisableEmployee(writer http.ResponseWriter, request *http.Request)

func (*Biz) EnableEmployee

func (b *Biz) EnableEmployee(writer http.ResponseWriter, request *http.Request)

func (*Biz) Get

func (b *Biz) Get(path string, f func(writer http.ResponseWriter, request *http.Request))

包装router的GET方法

func (*Biz) GetAllEmployees

func (b *Biz) GetAllEmployees(writer http.ResponseWriter, request *http.Request)

处理Employee相关的请求

func (*Biz) GetEmployee

func (b *Biz) GetEmployee(writer http.ResponseWriter, request *http.Request)

func (*Biz) Initialize

func (b *Biz) Initialize(config *config.Config)

配置初始化

func (*Biz) Post

func (b *Biz) Post(path string, f func(writer http.ResponseWriter, request *http.Request))

包装router的POST方法

func (*Biz) Put

func (b *Biz) Put(path string, f func(writer http.ResponseWriter, request *http.Request))

包装router的PUT方法

func (*Biz) Run

func (b *Biz) Run(host string)

照所配置的路由运行

func (*Biz) UpdateEmployee

func (b *Biz) UpdateEmployee(writer http.ResponseWriter, request *http.Request)

Jump to

Keyboard shortcuts

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