Skip to content

Commit

Permalink
Merge 6d44077 into 7a5849f
Browse files Browse the repository at this point in the history
  • Loading branch information
gfr10598 committed Nov 28, 2018
2 parents 7a5849f + 6d44077 commit 3e4f28c
Show file tree
Hide file tree
Showing 40 changed files with 454 additions and 985 deletions.
9 changes: 4 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,17 @@ script:
# the coverage collection.
- go test ./...
# Also run benchmarks
- go test -bench . ./search/...
- go test -bench . ./geolite2/...

# Run all tests, collecting coverage data.
- go test -covermode=count -coverprofile=geoip.cov -v github.com/m-lab/annotation-service/geoip
- go test -covermode=count -coverprofile=common.cov -v github.com/m-lab/annotation-service/common
- go test -covermode=count -coverprofile=handler.cov -v github.com/m-lab/annotation-service/handler
- go test -covermode=count -coverprofile=loader.cov -v github.com/m-lab/annotation-service/loader
- go test -covermode=count -coverprofile=metrics.cov -v github.com/m-lab/annotation-service/metrics
- go test -covermode=count -coverprofile=parser.cov -v github.com/m-lab/annotation-service/parser
- go test -covermode=count -coverprofile=search.cov -v github.com/m-lab/annotation-service/search
- go test -covermode=count -coverprofile=geolite2.cov -v github.com/m-lab/annotation-service/geolite2

# Coveralls
- $HOME/gopath/bin/gocovmerge handler.cov geoip.cov loader.cov parser.cov search.cov > merge.cov
- $HOME/gopath/bin/gocovmerge handler.cov loader.cov geolite2.cov common.cov > merge.cov
- $HOME/gopath/bin/goveralls -coverprofile=merge.cov -service=travis-ci

# Build and prepare for deployment
Expand Down
13 changes: 1 addition & 12 deletions common/geo.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,15 @@ package common

import (
"errors"
"os"
"regexp"
"time"
)

var (
// This is the bucket containing maxmind files.
MaxmindBucketName = "downloader-" + os.Getenv("GCLOUD_PROJECT")
// This is the regex used to filter for which files we want to consider acceptable for using with Geolite2
GeoLite2Regex = regexp.MustCompile(`Maxmind/\d{4}/\d{2}/\d{2}/\d{8}T\d{6}Z-GeoLite2-City-CSV\.zip`)
)

const (
MaxmindPrefix = "Maxmind/" // Folder containing the maxmind files
)

// The GeolocationIP struct contains all the information needed for the
// geolocation data that will be inserted into big query. The fiels are
// capitalized for exporting, although the originals in the DB schema
// are not.
// This is in common because it is used by the etl repository.
// TODO update these to proper camelCase.
type GeolocationIP struct {
Continent_code string `json:"continent_code,,omitempty"` // Gives a shorthand for the continent
Expand Down
14 changes: 0 additions & 14 deletions geoip/README.md

This file was deleted.

45 changes: 0 additions & 45 deletions geoip/const.go

This file was deleted.

Binary file removed geoip/ex/GeoIP.dat
Binary file not shown.
Binary file removed geoip/ex/GeoIPASNum.dat
Binary file not shown.
Binary file removed geoip/ex/GeoIPASNumv6.dat
Binary file not shown.
Binary file removed geoip/ex/GeoIPv6.dat
Binary file not shown.
Binary file removed geoip/ex/GeoLiteCity.dat
Binary file not shown.
Binary file removed geoip/ex/GeoLiteCityv6.dat
Binary file not shown.
64 changes: 0 additions & 64 deletions geoip/ex/geoip-demo.go

This file was deleted.

0 comments on commit 3e4f28c

Please sign in to comment.