Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthHandler ¶
type AuthHandler interface {
Login(w http.ResponseWriter, r *http.Request)
Register(w http.ResponseWriter, r *http.Request)
}
type AuthMiddleware ¶
type AuthMiddleware interface {
WithAuth(handler http.HandlerFunc) http.HandlerFunc
}
type DataHandler ¶
type DataHandler interface {
CreateConnection(http.ResponseWriter, *http.Request)
SaveData(http.ResponseWriter, *http.Request)
GetData(http.ResponseWriter, *http.Request)
GetSum(http.ResponseWriter, *http.Request)
}
type HttpAuthService ¶
type HttpAuthService struct {
Handlers AuthHandler
Middlewares AuthMiddleware
}
func NewAuthService ¶
func NewAuthService(hand AuthHandler, mid AuthMiddleware) *HttpAuthService
type HttpDataService ¶
type HttpDataService struct {
Handler DataHandler
}
func NewDataService ¶
func NewDataService(handler DataHandler) *HttpDataService
Click to show internal directories.
Click to hide internal directories.