Documentation ¶
Index ¶
- func Error(w http.ResponseWriter, err error, statusCode int)
- func ErrorFromURL(err error) error
- func IsNilInterface(v interface{}) bool
- func NewHandler(codec Codec, makebuf func() interface{}, ...) http.HandlerFunc
- type Client
- type Codec
- type CodecPack
- type FakeConn
- func (c *FakeConn) Close() error
- func (c *FakeConn) LocalAddr() net.Addr
- func (c *FakeConn) Read(b []byte) (int, error)
- func (c *FakeConn) RemoteAddr() net.Addr
- func (c *FakeConn) SetDeadline(t time.Time) error
- func (c *FakeConn) SetReadDeadline(t time.Time) error
- func (c *FakeConn) SetWriteDeadline(t time.Time) error
- func (c *FakeConn) Write(b []byte) (int, error)
- type FakeListener
- type FakeRoudTripper
- type Handlerer
- type JSONCodec
- type ProtobufCodec
- type Server
- func (s *Server) Handle(p string, h http.Handler)
- func (s *Server) HandleHostname()
- func (s *Server) ListenAndServe(addr string) error
- func (s *Server) Mount(dir string, h http.Handler)
- func (s *Server) Serve(l net.Listener) error
- func (s *Server) ServeHTTP(w http.ResponseWriter, req *http.Request)
- func (s *Server) Shutdown(ctx context.Context, d time.Duration) error
- func (s *Server) Stop() error
- func (s *Server) Use(m ...func(http.Handler) http.Handler)
- func (s *Server) UseShutdownMiddleware(code int, body []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorFromURL ¶
func IsNilInterface ¶
func IsNilInterface(v interface{}) bool
func NewHandler ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type FakeConn ¶
type FakeConn struct {
// contains filtered or unexported fields
}
func (*FakeConn) RemoteAddr ¶
type FakeListener ¶
type FakeListener struct { DefaultTransport http.RoundTripper // contains filtered or unexported fields }
func NewFakeListener ¶
func NewFakeListener() (l *FakeListener)
func (*FakeListener) Addr ¶
func (l *FakeListener) Addr() net.Addr
func (*FakeListener) Close ¶
func (l *FakeListener) Close() error
type FakeRoudTripper ¶
type FakeRoudTripper struct {
// contains filtered or unexported fields
}
type ProtobufCodec ¶
type ProtobufCodec struct { }
func (*ProtobufCodec) MIME ¶
func (*ProtobufCodec) MIME() string
func (*ProtobufCodec) Marshal ¶
func (c *ProtobufCodec) Marshal(v interface{}) ([]byte, error)
func (*ProtobufCodec) MarshalTo ¶
func (c *ProtobufCodec) MarshalTo(buf []byte, v interface{}) (int, error)
func (*ProtobufCodec) Size ¶
func (c *ProtobufCodec) Size(v interface{}) int
func (*ProtobufCodec) Unmarshal ¶
func (c *ProtobufCodec) Unmarshal(buf []byte, v interface{}) error
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) HandleHostname ¶
func (s *Server) HandleHostname()
func (*Server) ListenAndServe ¶
func (*Server) UseShutdownMiddleware ¶
Directories ¶
Path | Synopsis |
---|---|
main.go template.go
|
main.go template.go |
testservice
Package testservice is a generated protocol buffer package.
|
Package testservice is a generated protocol buffer package. |
systest
|
|
api_v1
Package api_v1 is a generated protocol buffer package.
|
Package api_v1 is a generated protocol buffer package. |
Click to show internal directories.
Click to hide internal directories.