add notification server message types
This commit is contained in:
		
							
								
								
									
										21
									
								
								ozon/notifications/server.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								ozon/notifications/server.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,21 @@
 | 
			
		||||
package notifications
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"net/http"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type NotificationServer struct{}
 | 
			
		||||
 | 
			
		||||
func NewNotificationServer() *NotificationServer {
 | 
			
		||||
	return &NotificationServer{}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (ns *NotificationServer) Run() error {
 | 
			
		||||
	mux := http.NewServeMux()
 | 
			
		||||
	mux.HandleFunc("/", ns.handler)
 | 
			
		||||
	return http.ListenAndServe("", mux)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (ns *NotificationServer) handler(rw http.ResponseWriter, req *http.Request) {
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user