server

package
v0.0.13-dev Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	HandlerChain http.HandlerChain
	// contains filtered or unexported fields
}

func (*Context) Abort

func (c *Context) Abort()

func (*Context) Deadline

func (c *Context) Deadline() (deadline time.Time, ok bool)

func (*Context) Done

func (c *Context) Done() <-chan struct{}

func (*Context) Err

func (c *Context) Err() error

func (*Context) Invoke

func (c *Context) Invoke(ctx http.Context)

func (*Context) IsAborted

func (c *Context) IsAborted() bool

func (*Context) IsCompleted

func (c *Context) IsCompleted() bool

func (*Context) Parent

func (c *Context) Parent() *Context

func (*Context) Request

func (c *Context) Request() http.Request

func (*Context) Reset

func (c *Context) Reset(req *stdhttp.Request, writer stdhttp.ResponseWriter)

func (*Context) Response

func (c *Context) Response() http.Response

func (*Context) Value

func (c *Context) Value(key any) any

func (*Context) With

func (c *Context) With(request http.Request, response http.Response) http.Context

func (*Context) WithRequest

func (c *Context) WithRequest(request http.Request) http.Context

func (*Context) WithResponse

func (c *Context) WithResponse(response http.Response) http.Context

func (*Context) WithValue

func (c *Context) WithValue(key, val any) http.Context

type Request

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

func (*Request) Context

func (r *Request) Context() http.Context

func (*Request) Cookie

func (r *Request) Cookie(name string) (*http.Cookie, bool)

func (*Request) Cookies

func (r *Request) Cookies() []*http.Cookie

func (*Request) Header

func (r *Request) Header(name string) (string, bool)

func (*Request) HeaderNames

func (r *Request) HeaderNames() []string

func (*Request) Headers

func (r *Request) Headers(name string) []string

func (*Request) IsSecure

func (r *Request) IsSecure() bool

func (*Request) Method

func (r *Request) Method() http.Method

func (*Request) Path

func (r *Request) Path() string

func (*Request) QueryParameter

func (r *Request) QueryParameter(name string) (string, bool)

func (*Request) QueryParameterNames

func (r *Request) QueryParameterNames() []string

func (*Request) QueryParameters

func (r *Request) QueryParameters(name string) []string

func (*Request) QueryString

func (r *Request) QueryString() string

func (*Request) Reader

func (r *Request) Reader() io.Reader

func (*Request) Scheme

func (r *Request) Scheme() string

func (*Request) WithReader

func (r *Request) WithReader(reader io.Reader) http.Request

type RequestDelegate

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

func (RequestDelegate) Invoke

func (d RequestDelegate) Invoke(ctx http.Context)

type Response

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

func (*Response) AddCookie

func (r *Response) AddCookie(cookie *http.Cookie)

func (*Response) AddHeader

func (r *Response) AddHeader(name string, value string)

func (*Response) CharacterEncoding

func (r *Response) CharacterEncoding() string

func (*Response) ContentLength

func (r *Response) ContentLength() int

func (*Response) ContentType

func (r *Response) ContentType() string

func (*Response) Context

func (r *Response) Context() http.Context

func (*Response) DeleteHeader

func (r *Response) DeleteHeader(name string)

func (*Response) Flush

func (r *Response) Flush()

func (*Response) Header

func (r *Response) Header(name string) string

func (*Response) HeaderNames

func (r *Response) HeaderNames() []string

func (*Response) Headers

func (r *Response) Headers(name string) []string

func (*Response) IsCommitted

func (r *Response) IsCommitted() bool

func (*Response) Reset

func (r *Response) Reset()

func (*Response) SetCharacterEncoding

func (r *Response) SetCharacterEncoding(charset string)

func (*Response) SetContentLength

func (r *Response) SetContentLength(len int)

func (*Response) SetContentType

func (r *Response) SetContentType(contentType string)

func (*Response) SetHeader

func (r *Response) SetHeader(name string, value string)

func (*Response) SetStatus

func (r *Response) SetStatus(status http.Status)

func (*Response) Status

func (r *Response) Status() http.Status

func (*Response) WithWriter

func (r *Response) WithWriter(writer io.Writer) http.Response

func (*Response) Writer

func (r *Response) Writer() io.Writer

type Server

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

func New

func New() *Server

func (*Server) Port

func (s *Server) Port() int

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(writer stdhttp.ResponseWriter, request *stdhttp.Request)

func (*Server) Start

func (s *Server) Start() error

func (*Server) Stop

func (s *Server) Stop(ctx context.Context) error

Jump to

Keyboard shortcuts

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