Documentation ¶ Index ¶ type Handler type Server func New(port string, handlers map[string]Handler) *Server func (s *Server) Start() error func (s *Server) Stop(timeout time.Duration) error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Handler ¶ type Handler interface { Handler() func(echo.Context) error } Handler is a interface for represents request handlers type Server ¶ type Server struct { // Port is the port number of the server Port string // Handlers is the map of path to handler Handlers map[string]Handler // Echo is the echo instance Echo *echo.Echo } Server is the struct represents the server func New ¶ func New(port string, handlers map[string]Handler) *Server New returns a new server func (*Server) Start ¶ func (s *Server) Start() error Start starts the server func (*Server) Stop ¶ func (s *Server) Stop(timeout time.Duration) error Stop stops the server Source Files ¶ View all Source files server.go Click to show internal directories. Click to hide internal directories.