rest

package
v0.0.0-...-cf576ff Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL