Initial commit
This commit is contained in:
11
hw12_13_14_15_calendar/internal/server/http/middleware.go
Normal file
11
hw12_13_14_15_calendar/internal/server/http/middleware.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package internalhttp
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func loggingMiddleware(next http.Handler) http.Handler { //nolint:unused
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
// TODO
|
||||
})
|
||||
}
|
||||
31
hw12_13_14_15_calendar/internal/server/http/server.go
Normal file
31
hw12_13_14_15_calendar/internal/server/http/server.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package internalhttp
|
||||
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
|
||||
type Server struct { // TODO
|
||||
}
|
||||
|
||||
type Logger interface { // TODO
|
||||
}
|
||||
|
||||
type Application interface { // TODO
|
||||
}
|
||||
|
||||
func NewServer(logger Logger, app Application) *Server {
|
||||
return &Server{}
|
||||
}
|
||||
|
||||
func (s *Server) Start(ctx context.Context) error {
|
||||
// TODO
|
||||
<-ctx.Done()
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *Server) Stop(ctx context.Context) error {
|
||||
// TODO
|
||||
return nil
|
||||
}
|
||||
|
||||
// TODO
|
||||
Reference in New Issue
Block a user