func groupWrapper(next http.Handler, noGrp bool, groups ...string) http.Handler {
	if noGrp {
		return next
	}
	options := groupware.DefaultOptions(next, groups...)
	return groupware.New(options)
}
Ejemplo n.º 2
0
func buildUploadHandler(host string) http.Handler {
	backend := mongofs.New(host, "media", "fs")
	uploadHandler := UploadHandler(backend)
	return jwtware.New(
		groupware.New(groupware.DefaultOptions(
			uploadHandler)))
}