Documentation ¶
Index ¶
- func NewHttp2(opts ...Option) toybox.Option
- type Http2GinServer
- func (hgs *Http2GinServer) DELETE(relativePath string, handlers ...gin.HandlerFunc)
- func (hgs *Http2GinServer) Do(key string, fn func() (interface{}, error)) (v interface{}, err error, shared bool)
- func (hgs *Http2GinServer) Engine() *gin.Engine
- func (hgs *Http2GinServer) GET(relativePath string, handlers ...gin.HandlerFunc)
- func (hgs *Http2GinServer) Group(relativePath string, handlers ...gin.HandlerFunc) *gin.RouterGroup
- func (hgs *Http2GinServer) Handle(method, path string, handlers ...gin.HandlerFunc)
- func (hgs *Http2GinServer) IsReady()
- func (h2gs *Http2GinServer) Name() string
- func (hgs *Http2GinServer) POST(relativePath string, handlers ...gin.HandlerFunc)
- func (hgs *Http2GinServer) PUT(relativePath string, handlers ...gin.HandlerFunc)
- func (h2gs *Http2GinServer) Ready() bool
- func (h2gs *Http2GinServer) Run(ctx context.Context) error
- func (hgs *Http2GinServer) Use(middleware ...gin.HandlerFunc)
- type Option
- func WithHandlers(cols ...ginsvr.Handler) Option
- func WithMaxHeaderBytes(maxHeaderBytes int) Option
- func WithMiddleware(mids ...gin.HandlerFunc) Option
- func WithName(name string) Option
- func WithPort(port string) Option
- func WithReadTimeout(readTimeout int) Option
- func WithTLS(cert, key string) Option
- func WithValidator(valid ...validaton.Validaton) Option
- func WithWriteTimeout(writeTimeout int) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Http2GinServer ¶
type Http2GinServer struct { Port string `toml:"port" json:"port"` ReadTimeout int `toml:"read_timeout" json:"read_timeout"` WriteTimeout int `toml:"write_timeout" json:"write_timeout"` MaxHeaderBytes int `toml:"max_header_bytes" json:"max_header_bytes"` TLS bool `toml:"tls" json:"tls"` Cert string `toml:"cert" json:"cert"` Key string `toml:"key" json:"key"` // contains filtered or unexported fields }
func (*Http2GinServer) DELETE ¶
func (hgs *Http2GinServer) DELETE(relativePath string, handlers ...gin.HandlerFunc)
func (*Http2GinServer) Do ¶
func (hgs *Http2GinServer) Do(key string, fn func() (interface{}, error)) (v interface{}, err error, shared bool)
func (*Http2GinServer) Engine ¶
func (hgs *Http2GinServer) Engine() *gin.Engine
func (*Http2GinServer) GET ¶
func (hgs *Http2GinServer) GET(relativePath string, handlers ...gin.HandlerFunc)
func (*Http2GinServer) Group ¶
func (hgs *Http2GinServer) Group(relativePath string, handlers ...gin.HandlerFunc) *gin.RouterGroup
func (*Http2GinServer) Handle ¶
func (hgs *Http2GinServer) Handle(method, path string, handlers ...gin.HandlerFunc)
func (*Http2GinServer) IsReady ¶
func (hgs *Http2GinServer) IsReady()
func (*Http2GinServer) Name ¶
func (h2gs *Http2GinServer) Name() string
func (*Http2GinServer) POST ¶
func (hgs *Http2GinServer) POST(relativePath string, handlers ...gin.HandlerFunc)
func (*Http2GinServer) PUT ¶
func (hgs *Http2GinServer) PUT(relativePath string, handlers ...gin.HandlerFunc)
func (*Http2GinServer) Ready ¶
func (h2gs *Http2GinServer) Ready() bool
func (*Http2GinServer) Use ¶
func (hgs *Http2GinServer) Use(middleware ...gin.HandlerFunc)
type Option ¶
type Option func(*Http2GinServer)
func WithHandlers ¶
func WithMaxHeaderBytes ¶
func WithMiddleware ¶
func WithMiddleware(mids ...gin.HandlerFunc) Option
func WithReadTimeout ¶
func WithValidator ¶ added in v1.2.2
func WithWriteTimeout ¶
Click to show internal directories.
Click to hide internal directories.