Documentation
¶
Overview ¶
apistuff is a package of helpers and handlers that are for slimlining the development of web APIs.
Index ¶
- func GetCookieByName(cookies []*http.Cookie, name string) string
- func HandleHealthOK(w http.ResponseWriter, r *http.Request)
- func HttpError(w http.ResponseWriter, message string, code int)
- func StatusMessage(status, message string) ([]byte, error)
- func WriteTempFile(input io.Reader, fname string, prefix string) (filename string, err error)
- type Clock
- type SystemClock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCookieByName ¶
GetCookieByName scans the cookies and returns one with a matching key, if there is one.
func HandleHealthOK ¶
func HandleHealthOK(w http.ResponseWriter, r *http.Request)
handleHealth simply returns a status struct that says the service is healthy
func StatusMessage ¶
Types ¶
type SystemClock ¶
type SystemClock struct{}
func (SystemClock) Now ¶
func (s SystemClock) Now() time.Time
Click to show internal directories.
Click to hide internal directories.