Documentation ¶
Index ¶
- func DisconnectClient(logger *zap.SugaredLogger, client *mongo.Client)
- func FromFormURLEncoded(i interface{}, r map[string][]string) error
- func FromFormURLEncodedRequest(i interface{}, r *http.Request) error
- func FromJSON(i interface{}, r io.Reader) error
- func StartGracefully(logger *zap.SugaredLogger, server *http.Server, timeoutDuration time.Duration)
- func StartMongoServer(url, databaseName string, timeout time.Duration) (*mgm.Config, *mongo.Client, *mongo.Database, error)
- func StartMongoServerWithFatal(logger *zap.SugaredLogger, url, databaseName string, timeout time.Duration) (*mgm.Config, *mongo.Client, *mongo.Database)
- func ToJSON(i interface{}, w io.Writer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisconnectClient ¶
func DisconnectClient(logger *zap.SugaredLogger, client *mongo.Client)
func FromFormURLEncoded ¶
FromFormURLEncoded decodes objects form a parsed form
func FromFormURLEncodedRequest ¶
FromFormURLEncodedRequest decodes objects from a form url encoded request
func StartGracefully ¶
StartGracefully starts a http server on another go routine so when an interrupt signal hits, a timout is initialized and all active requests can be handled before shutting down.
func StartMongoServer ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.