server

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Http

type Http struct {
	Name string
	Port string
	// contains filtered or unexported fields
}

func (*Http) Init

func (t *Http) Init(app interfaces.IService) error

func (*Http) PushRoute added in v0.0.2

func (t *Http) PushRoute(method string, path string, handler interfaces.RouteFunc)

func (*Http) ServeHTTP

func (t *Http) ServeHTTP(w http.ResponseWriter, req *http.Request)

func (*Http) Start added in v0.0.3

func (t *Http) Start() error

func (*Http) Stop

func (t *Http) Stop() error

func (*Http) String

func (t *Http) String() string

type Mock

type Mock struct {
	Name          string
	RouteRegister func(router *Router)
	// contains filtered or unexported fields
}

func (*Mock) Init

func (t *Mock) Init(app interfaces.IService) error

func (*Mock) PushRoute added in v0.0.2

func (t *Mock) PushRoute(method string, path string, handler interfaces.RouteFunc)

func (*Mock) Start added in v0.0.3

func (t *Mock) Start() error

func (*Mock) Stop

func (t *Mock) Stop() error

func (*Mock) String

func (t *Mock) String() string

type Router

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

func NewRouter

func NewRouter() *Router

func (*Router) Find

func (t *Router) Find(method string, path string) interfaces.RouteFunc

func (*Router) PushRoute

func (t *Router) PushRoute(method string, path string, handler interfaces.RouteFunc)

Jump to

Keyboard shortcuts

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