27 lines
468 B
Go
27 lines
468 B
Go
package mux
|
|
|
|
import (
|
|
"lishwist/http/handler"
|
|
"lishwist/http/session"
|
|
|
|
"github.com/Teajey/rsvp"
|
|
)
|
|
|
|
type Public struct {
|
|
Private
|
|
}
|
|
|
|
func newPublic(store *session.Store, cfg rsvp.Config) Public {
|
|
return Public{
|
|
newPrivate(store, cfg),
|
|
}
|
|
}
|
|
|
|
func (m *Public) Handle(pattern string, handler handler.Public) {
|
|
m.handleWithSession(pattern, handler.ServeHTTP)
|
|
}
|
|
|
|
func (m *Public) HandleFunc(pattern string, handler handler.PublicFunc) {
|
|
m.Handle(pattern, handler)
|
|
}
|