Skip to content

Commit

Permalink
Update gizmo to v0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Francisco Souza committed Jan 2, 2019
1 parent 18f1e5a commit 6bd9398
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 89 deletions.
4 changes: 2 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package config

import (
"github.com/NYTimes/gizmo/config"
"github.com/NYTimes/gizmo/server"
"github.com/NYTimes/video-transcoding-api/db/redis/storage"
"github.com/fsouza/gizmo-stackdriver-logging"
"github.com/kelseyhightower/envconfig"
)

// Config is a struct to contain all the needed configuration for the
Expand Down Expand Up @@ -91,6 +91,6 @@ type Hybrik struct {
// LoadConfig loads the configuration of the API using environment variables.
func LoadConfig() *Config {
var cfg Config
config.LoadEnvConfig(&cfg)
envconfig.Process("", &cfg)
return &cfg
}
15 changes: 3 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,28 @@ require (
cloud.google.com/go v0.34.0 // indirect
github.com/NYTimes/encoding-wrapper/elementalconductor v0.0.0-20190102034147-271caccac2db
github.com/NYTimes/encoding-wrapper/encodingcom v0.0.0-20190102034147-271caccac2db
github.com/NYTimes/gizmo v0.3.14
github.com/NYTimes/gizmo v0.4.0
github.com/NYTimes/gziphandler v1.0.1
github.com/aws/aws-sdk-go v1.16.11
github.com/bitmovin/bitmovin-go v1.25.0
github.com/flavioribeiro/zencoder v0.0.0-20161215190743-745874544382
github.com/fluent/fluent-logger-golang v1.4.0 // indirect
github.com/fsouza/ctxlogger v1.1.0
github.com/fsouza/ctxlogger v1.3.0
github.com/fsouza/gizmo-stackdriver-logging v1.1.0
github.com/go-redis/redis v6.15.0+incompatible
github.com/google/go-cmp v0.2.0
github.com/google/gops v0.0.0-20180903072510-f341a40f99ec
github.com/gorilla/handlers v1.4.0
github.com/hybrik/hybrik-sdk-go v0.0.0-20170516091026-c2eee0e66af9
github.com/influxdata/influxdb v1.7.2 // indirect
github.com/influxdata/platform v0.0.0-20181228230219-3429e8d0c675 // indirect
github.com/kardianos/osext v0.0.0-20170510131534-ae77be60afb1 // indirect
github.com/kelseyhightower/envconfig v1.3.0
github.com/knq/pemutil v0.0.0-20181215144041-fb6fad722528 // indirect
github.com/knq/sdhook v0.0.0-20181029224735-f9c6ae1bf3ae // indirect
github.com/kr/pretty v0.1.0
github.com/prometheus/client_golang v0.9.2 // indirect
github.com/prometheus/common v0.0.0-20181218105931-67670fe90761 // indirect
github.com/sirupsen/logrus v1.2.0
github.com/tinylib/msgp v1.1.0 // indirect
github.com/tsuru/tsuru v0.0.0-20181226200025-b4e87cdb1651 // indirect
golang.org/x/net v0.0.0-20181220203305-927f97764cc3 // indirect
golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890 // indirect
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 // indirect
golang.org/x/sys v0.0.0-20181228144115-9a3f9b0469bb // indirect
google.golang.org/api v0.0.0-20181229000844-f26a60c56f14 // indirect
google.golang.org/appengine v1.4.0 // indirect
google.golang.org/genproto v0.0.0-20181221175505-bd9b4fb69e2f // indirect
google.golang.org/grpc v1.17.0 // indirect
gopkg.in/yaml.v2 v2.2.2 // indirect
)
78 changes: 14 additions & 64 deletions go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions service/preset.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"io/ioutil"
"net/http"

"github.com/NYTimes/gizmo/web"
"github.com/NYTimes/gizmo/server"
"github.com/NYTimes/video-transcoding-api/db"
"github.com/NYTimes/video-transcoding-api/provider"
"github.com/NYTimes/video-transcoding-api/swagger"
Expand All @@ -23,7 +23,7 @@ import (
func (s *TranscodingService) deletePreset(r *http.Request) swagger.GizmoJSONResponse {
var output deletePresetOutputs
var params getPresetMapInput
params.loadParams(web.Vars(r))
params.loadParams(server.Vars(r))

output.Results = make(map[string]deletePresetOutput)

Expand Down
8 changes: 4 additions & 4 deletions service/presetmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package service
import (
"net/http"

"github.com/NYTimes/gizmo/web"
"github.com/NYTimes/gizmo/server"
"github.com/NYTimes/video-transcoding-api/db"
"github.com/NYTimes/video-transcoding-api/swagger"
)
Expand Down Expand Up @@ -45,7 +45,7 @@ func (s *TranscodingService) newPresetMap(r *http.Request) swagger.GizmoJSONResp
// 500: genericError
func (s *TranscodingService) getPresetMap(r *http.Request) swagger.GizmoJSONResponse {
var params getPresetMapInput
params.loadParams(web.Vars(r))
params.loadParams(server.Vars(r))
preset, err := s.db.GetPresetMap(params.Name)

switch err {
Expand All @@ -70,7 +70,7 @@ func (s *TranscodingService) getPresetMap(r *http.Request) swagger.GizmoJSONResp
func (s *TranscodingService) updatePresetMap(r *http.Request) swagger.GizmoJSONResponse {
defer r.Body.Close()
var input updatePresetMapInput
presetMap, err := input.PresetMap(web.Vars(r), r.Body)
presetMap, err := input.PresetMap(server.Vars(r), r.Body)
if err != nil {
return newInvalidPresetMapResponse(err)
}
Expand All @@ -97,7 +97,7 @@ func (s *TranscodingService) updatePresetMap(r *http.Request) swagger.GizmoJSONR
// 500: genericError
func (s *TranscodingService) deletePresetMap(r *http.Request) swagger.GizmoJSONResponse {
var params getPresetMapInput
params.loadParams(web.Vars(r))
params.loadParams(server.Vars(r))
err := s.db.DeletePresetMap(&db.PresetMap{Name: params.Name})

switch err {
Expand Down
4 changes: 2 additions & 2 deletions service/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package service
import (
"net/http"

"github.com/NYTimes/gizmo/web"
"github.com/NYTimes/gizmo/server"
"github.com/NYTimes/video-transcoding-api/provider"
"github.com/NYTimes/video-transcoding-api/swagger"
)
Expand Down Expand Up @@ -31,7 +31,7 @@ func (s *TranscodingService) listProviders(r *http.Request) swagger.GizmoJSONRes
// 500: genericError
func (s *TranscodingService) getProvider(r *http.Request) swagger.GizmoJSONResponse {
var params getProviderInput
params.loadParams(web.Vars(r))
params.loadParams(server.Vars(r))
description, err := provider.DescribeProvider(params.Name, s.config)
switch err {
case nil:
Expand Down
6 changes: 3 additions & 3 deletions service/transcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"path"
"path/filepath"

"github.com/NYTimes/gizmo/web"
"github.com/NYTimes/gizmo/server"
"github.com/NYTimes/video-transcoding-api/db"
"github.com/NYTimes/video-transcoding-api/provider"
"github.com/NYTimes/video-transcoding-api/swagger"
Expand Down Expand Up @@ -122,7 +122,7 @@ func (s *TranscodingService) defaultFileName(source string, preset *db.PresetMap
// 500: genericError
func (s *TranscodingService) getTranscodeJob(r *http.Request) swagger.GizmoJSONResponse {
var params getTranscodeJobInput
params.loadParams(web.Vars(r))
params.loadParams(server.Vars(r))
return s.getJobStatusResponse(s.getTranscodeJobByID(params.JobID))
}

Expand Down Expand Up @@ -178,7 +178,7 @@ func (s *TranscodingService) getTranscodeJobByID(jobID string) (*db.Job, *provid
// 500: genericError
func (s *TranscodingService) cancelTranscodeJob(r *http.Request) swagger.GizmoJSONResponse {
var params cancelTranscodeJobInput
params.loadParams(web.Vars(r))
params.loadParams(server.Vars(r))
job, _, prov, err := s.getTranscodeJobByID(params.JobID)
if err != nil {
if err == db.ErrJobNotFound {
Expand Down

0 comments on commit 6bd9398

Please sign in to comment.