Documentation ¶
Index ¶
- type Route
- type Server
- func (s *Server) Close()
- func (s *Server) GetSecret(secretName string) (string, error)
- func (s *Server) InternalServerError(w http.ResponseWriter, r *http.Request, err error, message string)
- func (s *Server) JsonResponse(w http.ResponseWriter, r *http.Request, v interface{})
- func (s *Server) Listen(addr string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
need the following services activate in console: - Secret Manager - Error Reporting
func (*Server) InternalServerError ¶
func (s *Server) InternalServerError(w http.ResponseWriter, r *http.Request, err error, message string)
Behavior to use when an error in encountered in a http handler Returns the message as a response to the request performer Log the message, the error, and the request using the Error Reporting tool from GCloud
func (*Server) JsonResponse ¶
func (s *Server) JsonResponse(w http.ResponseWriter, r *http.Request, v interface{})
Returns an object as a JSON response
Click to show internal directories.
Click to hide internal directories.