easygo

package module
v0.0.0-...-f52f705 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

README

easy-go

一个简化业务逻辑开发,开发者只需要关心业务逻辑,无需关心参数解析过程

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EasyGo

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

EasyGo 启动实例

func NewEasyGo

func NewEasyGo(options ...Option) *EasyGo

func (EasyGo) NewRouter

func (g EasyGo) NewRouter() router.EasyGoHttpRouter

func (EasyGo) Run

func (g EasyGo) Run()

type Option

type Option func(*EasyGo)

func WithConfigPath

func WithConfigPath(yamlFilePath string) Option

func WithCtx

func WithCtx(ctx context.Context) Option

func WithHttpServerFunc

func WithHttpServerFunc(httpServerFunc *http.Server) Option

func WithMaxConn

func WithMaxConn(maxConn int64) Option

func WithName

func WithName(name string) Option

func WithPort

func WithPort(port string) Option

func WithTimeOut

func WithTimeOut(t time.Duration) Option

type RouteRegister

type RouteRegister interface {
	Get(patten string, handler any)
	Post(patten string, handler any)
	Put(patten string, handler any)
	Delete(patten string, handler any)
	RestGroup(patten string, controller router.RestFulGroup)
}

Directories

Path Synopsis
log
api

Jump to

Keyboard shortcuts

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