Categorygithub.com/thiagozs/go-echowr
modulepackage
1.0.3
Repository: https://github.com/thiagozs/go-echowr.git
Documentation: pkg.go.dev

# README

Echowr - Echo server wrapper

// healthcheck
 sys := server.NewRouters()
 sys.AddRouter("/healthcheck", 
     server.Methods{http.MethodGet: func(c server.Context) error {
         return c.String(http.StatusOK, "OK")
     },
 })
 
 // register the routes
 _ = a.RegisterRouters(server.ROOT, sys)

  sigChan := make(chan os.Signal, 1)
  signal.Notify(sigChan, syscall.SIGINT, syscall.SIGTERM)

 // start the server
 a.Start()

 sig := <-sigChan
 fmt.Printf("Signal %s received, shutting down\n", sig.String())

// shutdown
 _ = a.GracefulShutdown()

 os.Exit(0)

Versioning and license

Our version numbers follow the semantic versioning specification. You can see the available versions by checking the tags on this repository. For more details about our license model, please take a look at the LICENSE file.

2024, thiagozs.

# Functions

NewMockServerRepo creates a new mock instance.
NewRouters creates a new instance of RegisterRouters.
NewServer creates a new server instance with the given options.
No description provided by the author
No description provided by the author
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

MockServerRepo is a mock of ServerRepo interface.
MockServerRepoMockRecorder is the mock recorder for MockServerRepo.
RegisterRouter defines a single router with a path and methods.
RegisterRouters holds multiple routers with a fixed path prefix.
Server represents the HTTP server.
No description provided by the author

# Interfaces

ServerRepo ...

# Type aliases

No description provided by the author
No description provided by the author
Kind represents the type of router group.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author