Documentation ¶
Overview ¶
Package server provides a RESTful HTTP interface for the cold brew coffee dripper.
Index ¶
Constants ¶
View Source
const ( // EnvDevelopment is a constant used to determine if the application is in a // development environment. EnvDevelopment = "development" // EnvProduction is a constant used to determine if the application is in a // production environment. EnvProduction = "production" // EnvTesting is a constant used to determine if the application is in a // testing environment. EnvTesting = "testing" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { // Environment is used to determine which environment the cold brew dirpper // application is being run in. Environment string // DatabaseDir is the absolute path of the SQLite database. DatabaseDir string }
Config is a configuration struct used by the server package to configure downstream dependencies.
type Server ¶
Server is a base object which provide HTTP requests access to the dripper.
func (*Server) GetDripper ¶
GetDripper returns the current state of the cold brew dripper.
func (*Server) GetDripperSettings ¶
GetDripperSettings returns the current configuration of the dripper.
func (*Server) SetDripperDrip ¶
SetDripperDrip sets the dripper to the drip state.
func (*Server) SetDripperOff ¶
SetDripperOff sets the dripper to the off state.
func (*Server) SetDripperRun ¶
SetDripperRun sets the dripper to the run state.
func (*Server) SetDripperSettings ¶
SetDripperSettings reinitializes the dripper with the supplied config.
Click to show internal directories.
Click to hide internal directories.