Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupRoutes ¶
func SetupRoutes(r chi.Router, phs PuppyHandlerAndStorer)
SetupRoutes does mapping within endpoints and their corresponding handlers It also adds in a subrouter into our base router which ca handle subpath routing
Types ¶
type PuppyHandlerAndStorer ¶
type PuppyHandlerAndStorer struct {
Storage puppy.Storer // Using the thread safe sync.map implementation of Storer interface
}
PuppyHandlerAndStorer is a special guy who wraps around Storer types and gives them extra abilities to now handle API requests thus enhancing their storing abilities significantly!
func NewPuppyHandlerAndStorer ¶
func NewPuppyHandlerAndStorer(s puppy.Storer) *PuppyHandlerAndStorer
This guy gives u a nicely initialised brand new *PuppyHandlerAndStorer
Click to show internal directories.
Click to hide internal directories.