Documentation
¶
Index ¶
- type Application
- type ContextCustomizer
- type DefaultServer
- type Server
- type ServerContext
- func (c *ServerContext) Abort()
- func (c *ServerContext) Deadline() (deadline time.Time, ok bool)
- func (c *ServerContext) Done() <-chan struct{}
- func (c *ServerContext) Err() error
- func (c *ServerContext) Invoke(ctx http.Context)
- func (c *ServerContext) IsAborted() bool
- func (c *ServerContext) IsCompleted() bool
- func (c *ServerContext) Parent() *ServerContext
- func (c *ServerContext) Request() http.Request
- func (c *ServerContext) Reset(req *stdhttp.Request, writer stdhttp.ResponseWriter)
- func (c *ServerContext) Response() http.Response
- func (c *ServerContext) Value(key any) any
- func (c *ServerContext) With(request http.Request, response http.Response) http.Context
- func (c *ServerContext) WithRequest(request http.Request) http.Context
- func (c *ServerContext) WithResponse(response http.Response) http.Context
- func (c *ServerContext) WithValue(key, val any) http.Context
- type ServerContextDelegate
- type ServerProperties
- type ServerRequest
- func (r *ServerRequest) Context() http.Context
- func (r *ServerRequest) Cookie(name string) (*http.Cookie, bool)
- func (r *ServerRequest) Cookies() []*http.Cookie
- func (r *ServerRequest) Header(name string) (string, bool)
- func (r *ServerRequest) HeaderNames() []string
- func (r *ServerRequest) Headers(name string) []string
- func (r *ServerRequest) IsSecure() bool
- func (r *ServerRequest) Method() http.Method
- func (r *ServerRequest) Path() string
- func (r *ServerRequest) QueryParameter(name string) (string, bool)
- func (r *ServerRequest) QueryParameterNames() []string
- func (r *ServerRequest) QueryParameters(name string) []string
- func (r *ServerRequest) QueryString() string
- func (r *ServerRequest) Reader() io.Reader
- func (r *ServerRequest) Scheme() string
- func (r *ServerRequest) WithReader(reader io.Reader) http.Request
- type ServerResponse
- func (r *ServerResponse) AddCookie(cookie *http.Cookie)
- func (r *ServerResponse) AddHeader(name string, value string)
- func (r *ServerResponse) CharacterEncoding() string
- func (r *ServerResponse) ContentLength() int
- func (r *ServerResponse) ContentType() string
- func (r *ServerResponse) Context() http.Context
- func (r *ServerResponse) DeleteHeader(name string)
- func (r *ServerResponse) Flush()
- func (r *ServerResponse) Header(name string) string
- func (r *ServerResponse) HeaderNames() []string
- func (r *ServerResponse) Headers(name string) []string
- func (r *ServerResponse) IsCommitted() bool
- func (r *ServerResponse) Reset()
- func (r *ServerResponse) SetCharacterEncoding(charset string)
- func (r *ServerResponse) SetContentLength(len int)
- func (r *ServerResponse) SetContentType(contentType string)
- func (r *ServerResponse) SetHeader(name string, value string)
- func (r *ServerResponse) SetStatus(status http.Status)
- func (r *ServerResponse) Status() http.Status
- func (r *ServerResponse) WithWriter(writer io.Writer) http.Response
- func (r *ServerResponse) Writer() io.Writer
- type ServerStartStopLifecycle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct { }
func NewApplication ¶
func NewApplication() *Application
func (*Application) Run ¶
func (a *Application) Run()
type ContextCustomizer ¶
type ContextCustomizer struct { }
func NewContextCustomizer ¶
func NewContextCustomizer() *ContextCustomizer
func (*ContextCustomizer) CustomizeContext ¶
func (c *ContextCustomizer) CustomizeContext(ctx app.Context) error
type DefaultServer ¶
type DefaultServer struct {
// contains filtered or unexported fields
}
func NewDefaultServer ¶
func NewDefaultServer() *DefaultServer
func (*DefaultServer) Port ¶
func (s *DefaultServer) Port() int
func (*DefaultServer) ServeHTTP ¶
func (s *DefaultServer) ServeHTTP(writer stdhttp.ResponseWriter, request *stdhttp.Request)
func (*DefaultServer) ShutDownGracefully ¶
func (s *DefaultServer) ShutDownGracefully(ctx context.Context) error
func (*DefaultServer) Start ¶
func (s *DefaultServer) Start() error
func (*DefaultServer) Stop ¶
func (s *DefaultServer) Stop() error
type ServerContext ¶
type ServerContext struct { HandlerChain http.HandlerChain // contains filtered or unexported fields }
func (*ServerContext) Abort ¶
func (c *ServerContext) Abort()
func (*ServerContext) Done ¶
func (c *ServerContext) Done() <-chan struct{}
func (*ServerContext) Err ¶
func (c *ServerContext) Err() error
func (*ServerContext) Invoke ¶
func (c *ServerContext) Invoke(ctx http.Context)
func (*ServerContext) IsAborted ¶
func (c *ServerContext) IsAborted() bool
func (*ServerContext) IsCompleted ¶
func (c *ServerContext) IsCompleted() bool
func (*ServerContext) Parent ¶
func (c *ServerContext) Parent() *ServerContext
func (*ServerContext) Request ¶
func (c *ServerContext) Request() http.Request
func (*ServerContext) Reset ¶
func (c *ServerContext) Reset(req *stdhttp.Request, writer stdhttp.ResponseWriter)
func (*ServerContext) Response ¶
func (c *ServerContext) Response() http.Response
func (*ServerContext) Value ¶
func (c *ServerContext) Value(key any) any
func (*ServerContext) WithRequest ¶
func (c *ServerContext) WithRequest(request http.Request) http.Context
func (*ServerContext) WithResponse ¶
func (c *ServerContext) WithResponse(response http.Response) http.Context
type ServerContextDelegate ¶
type ServerContextDelegate struct {
// contains filtered or unexported fields
}
func (ServerContextDelegate) Invoke ¶
func (d ServerContextDelegate) Invoke(ctx http.Context)
type ServerProperties ¶
type ServerProperties struct { //property.Properties `prefix:"server"` Port int `prop:"port" default:"8080"` }
type ServerRequest ¶
type ServerRequest struct {
// contains filtered or unexported fields
}
func (*ServerRequest) Context ¶
func (r *ServerRequest) Context() http.Context
func (*ServerRequest) Cookies ¶
func (r *ServerRequest) Cookies() []*http.Cookie
func (*ServerRequest) HeaderNames ¶
func (r *ServerRequest) HeaderNames() []string
func (*ServerRequest) Headers ¶
func (r *ServerRequest) Headers(name string) []string
func (*ServerRequest) IsSecure ¶
func (r *ServerRequest) IsSecure() bool
func (*ServerRequest) Method ¶
func (r *ServerRequest) Method() http.Method
func (*ServerRequest) Path ¶
func (r *ServerRequest) Path() string
func (*ServerRequest) QueryParameter ¶
func (r *ServerRequest) QueryParameter(name string) (string, bool)
func (*ServerRequest) QueryParameterNames ¶
func (r *ServerRequest) QueryParameterNames() []string
func (*ServerRequest) QueryParameters ¶
func (r *ServerRequest) QueryParameters(name string) []string
func (*ServerRequest) QueryString ¶
func (r *ServerRequest) QueryString() string
func (*ServerRequest) Reader ¶
func (r *ServerRequest) Reader() io.Reader
func (*ServerRequest) Scheme ¶
func (r *ServerRequest) Scheme() string
func (*ServerRequest) WithReader ¶
func (r *ServerRequest) WithReader(reader io.Reader) http.Request
type ServerResponse ¶
type ServerResponse struct {
// contains filtered or unexported fields
}
func (*ServerResponse) AddCookie ¶
func (r *ServerResponse) AddCookie(cookie *http.Cookie)
func (*ServerResponse) AddHeader ¶
func (r *ServerResponse) AddHeader(name string, value string)
func (*ServerResponse) CharacterEncoding ¶
func (r *ServerResponse) CharacterEncoding() string
func (*ServerResponse) ContentLength ¶
func (r *ServerResponse) ContentLength() int
func (*ServerResponse) ContentType ¶
func (r *ServerResponse) ContentType() string
func (*ServerResponse) Context ¶
func (r *ServerResponse) Context() http.Context
func (*ServerResponse) DeleteHeader ¶
func (r *ServerResponse) DeleteHeader(name string)
func (*ServerResponse) Flush ¶
func (r *ServerResponse) Flush()
func (*ServerResponse) Header ¶
func (r *ServerResponse) Header(name string) string
func (*ServerResponse) HeaderNames ¶
func (r *ServerResponse) HeaderNames() []string
func (*ServerResponse) Headers ¶
func (r *ServerResponse) Headers(name string) []string
func (*ServerResponse) IsCommitted ¶
func (r *ServerResponse) IsCommitted() bool
func (*ServerResponse) Reset ¶
func (r *ServerResponse) Reset()
func (*ServerResponse) SetCharacterEncoding ¶
func (r *ServerResponse) SetCharacterEncoding(charset string)
func (*ServerResponse) SetContentLength ¶
func (r *ServerResponse) SetContentLength(len int)
func (*ServerResponse) SetContentType ¶
func (r *ServerResponse) SetContentType(contentType string)
func (*ServerResponse) SetHeader ¶
func (r *ServerResponse) SetHeader(name string, value string)
func (*ServerResponse) SetStatus ¶
func (r *ServerResponse) SetStatus(status http.Status)
func (*ServerResponse) Status ¶
func (r *ServerResponse) Status() http.Status
func (*ServerResponse) WithWriter ¶
func (r *ServerResponse) WithWriter(writer io.Writer) http.Response
func (*ServerResponse) Writer ¶
func (r *ServerResponse) Writer() io.Writer
type ServerStartStopLifecycle ¶
type ServerStartStopLifecycle struct {
// contains filtered or unexported fields
}
func (*ServerStartStopLifecycle) IsRunning ¶
func (l *ServerStartStopLifecycle) IsRunning() bool
func (*ServerStartStopLifecycle) Start ¶
func (l *ServerStartStopLifecycle) Start() error
func (*ServerStartStopLifecycle) Stop ¶
func (l *ServerStartStopLifecycle) Stop() error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.