Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Humanizer ¶
type Humanizer interface { // Humanize returns a human readable representation of the supplied value. Humanize(interface{}) (string, error) }
Humanizer takes an object in and returns out it's human readable representation.
func DefaultHumanizer ¶
func DefaultHumanizer() Humanizer
DefaultHumanizer returns the JSON representation of val.
type HumanizerFunc ¶
HumanizerFunc is an adapter to make conforming functions into Humanizers.
func (HumanizerFunc) Humanize ¶
func (fn HumanizerFunc) Humanize(val interface{}) (string, error)
Humanize returns the human readable representation of val.
type Option ¶
type Option func(s *Server)
Option is a function that applies a configuration to the server.
func WithHumanizer ¶
WithHumanizer sets the humanizer to use for the queried values. By default, the value will be printed out as JSON.
func WithLogger ¶
WithLogger sets the logger to use. By default, it logs to the standard library logger.
Click to show internal directories.
Click to hide internal directories.