boilerplate-go/webService/routes.go

19 lines
468 B
Go

package webService
import (
"gitlab.com/arkadooti.sarkar/go-boilerplate/core/appcontext"
"net/http"
)
func (s *WebService) Run(ctx appcontext.AppContext) {
s.registerPublicApis()
s.server.Start(ctx)
}
func (s *WebService) registerPublicApis() {
s.server.AddNoAuthRoutes("Ping", http.MethodGet, "/public/ping", s.Ping)
//Send movie name in query (query key: 'name')
s.server.AddNoAuthRoutes("Ping", http.MethodGet, "/public/movie-details", s.MovieDetails)
}