Documentation
¶
Index ¶
Constants ¶
const ShutdownTimeOut = 10 * time.Second
ShutdownTimeOut is time to terminate queries when quit signal given.
Variables ¶
var ErrLockedServer = errors.New("http server is locked")
ErrLockedServer returned on repeated call Close() the HTTP server.
Functions ¶
This section is empty.
Types ¶
type Binder ¶
type Binder interface {
Bind(c echo.Context, req interface{}) error
BindAndValidate(c echo.Context, req interface{}) error
}
Binder represents Bind and BindAndValidate functions.
type Logger ¶
type Logger interface {
Infof(format string, args ...interface{})
Fatalf(format string, args ...interface{})
Debug(args ...interface{})
Error(args ...interface{})
Writer() io.Writer
}
Logger describes Error and Info functions.
type Option ¶
type Option func(server *Server)
Option infects params to Server.
func WithRecover ¶
func WithResponder ¶
WithResponder injects Responder to Server.
type Param ¶ added in v0.2.2
type ReplacementFields ¶ added in v0.2.2
type ReplacementFields struct {
// Fields that apply to the entire row.
Keys []string
// Fields related to the filter key `q`, which are then included in the SQL query.
Query []string
}
ReplacementFields contains the fields that need to be replaced in the query string.
type Responder ¶
type Responder interface {
ServeResult(c echo.Context, i interface{}) error
ServeError(c echo.Context, err error, logPrefix ...string) error
}
Responder represents ServeResult and ServeError functions.
type Server ¶
A Server defines parameters for running an HTTP server.
func (*Server) ParseQueryString ¶ added in v0.2.2
ParseQueryString parses the query string, does unescaping.
func (*Server) ReportError ¶
ReportError publishes error to the errors channel. if you do not read errors from the errors channel then after the channel buffer overflows the application exits with a fatal level and the os.Exit(1) exit code.