Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrTokenNotFound = errors.New("token not found")
)
Functions ¶
func NotFound ¶
func NotFound(w ResponseWriter, r *Request)
Types ¶
type DecodeRequestFunc ¶
type EncodeResponseFunc ¶
type EncodeResponseFunc func(context.Context, ResponseWriter, interface{}) error
type Handler ¶
type Handler interface {
Serve(ResponseWriter, *Request)
}
func NotFoundHandler ¶
func NotFoundHandler() Handler
type HandlerFunc ¶
type HandlerFunc func(ResponseWriter, *Request)
func (HandlerFunc) Serve ¶
func (f HandlerFunc) Serve(w ResponseWriter, r *Request)
type ResponseWriter ¶
type ResponseWriter struct {
*tgbotapi.MessageConfig
}
func (ResponseWriter) Write ¶
func (w ResponseWriter) Write(b []byte)
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer( e endpoint.Endpoint, dec DecodeRequestFunc, enc EncodeResponseFunc, logger log.Logger, ) *Server
func (Server) Serve ¶
func (s Server) Serve(w ResponseWriter, r *Request)
type ServerMux ¶
type ServerMux struct {
// contains filtered or unexported fields
}
func NewServeMux ¶
func NewServeMux() *ServerMux
func (*ServerMux) HandleFunc ¶
func (mux *ServerMux) HandleFunc(command string, handler func(ResponseWriter, *Request))
func (*ServerMux) Serve ¶
func (mux *ServerMux) Serve(w ResponseWriter, r *Request)
Click to show internal directories.
Click to hide internal directories.