xs

package
v0.0.0-...-0e6b51b Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfig

func GetConfig() (interface{}, error)

func GetConfigWithFile

func GetConfigWithFile(configFile string) (interface{}, error)

func GetConfigWithFileEnv

func GetConfigWithFileEnv(configFile string, env interface{}) (interface{}, error)

func GetFileContent

func GetFileContent(configFile string) ([]byte, error)

func GetPlugin

func GetPlugin(path string) (*plugin.Plugin, error)

func In

func In(p *plugin.Plugin, config interface{}, s def.IService) error

Types

type App

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

func NewApp

func NewApp(configFile string, env interface{}) (*App, error)

func (*App) GetConfigFile

func (A *App) GetConfigFile() string

func (*App) GetPluginFile

func (A *App) GetPluginFile() string

func (*App) Handle

func (A *App) Handle(resp http.ResponseWriter, req *http.Request) bool

func (*App) Recycle

func (A *App) Recycle()

func (*App) Valid

func (A *App) Valid() error

type Service

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

func NewService

func NewService() *Service

func (*Service) Handle

func (S *Service) Handle(resp http.ResponseWriter, req *http.Request) bool

func (*Service) HandleFunc

func (S *Service) HandleFunc(prefix string, recycle def.IRecycle, handler func(resp http.ResponseWriter, req *http.Request))

func (*Service) Recycle

func (S *Service) Recycle()

type ServiceItem

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

type Srv

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

func NewSrv

func NewSrv(config interface{}) (*Srv, error)

func (*Srv) ServeHTTP

func (S *Srv) ServeHTTP(resp http.ResponseWriter, req *http.Request)

func (*Srv) Valid

func (S *Srv) Valid()

Jump to

Keyboard shortcuts

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