Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeHandler ¶
func MakeHandler(s Randomizer, l kitlog.Logger) http.Handler
MakeHandler to service route requests
Types ¶
type Randomizer ¶
type Randomizer interface {
Word() string
}
Randomizer selects a random word for a collection of words
func NewLoggingService ¶
func NewLoggingService(s Randomizer, l log.Logger) Randomizer
NewLoggingService returns a new instance to the logging service
func NewService ¶
func NewService(path string) (Randomizer, error)
NewService creates a new dictionary service
type WordList ¶
type WordList []string
WordList stores a collection of words
func NewWordList ¶
NewWordList creates a new wordlist from the given file
type WordResponse ¶
type WordResponse struct {
Word string `json:"word"`
}
WordResponse returns a new word
Click to show internal directories.
Click to hide internal directories.