Skip to content

Commit a48540c

Browse files
committed
Upgrade Go dependencies, cleanup README, prepare for release of 0.7
1 parent 05b7ac4 commit a48540c

File tree

3 files changed

+401
-99
lines changed

3 files changed

+401
-99
lines changed

CHANGELOG.md

+52-48
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,15 @@
11
# Changelog
22

3-
## O.7 (in progress)
4-
5-
This version involved a significant refactor of internal functionality and HTTP
6-
handlers to provide better ability to modify services at runtime, provide
7-
granular control over the endpoints that are exposed, and cleanup handling
8-
of middleware.
9-
10-
Most internal HTTP handlers for `ServiceSet` and `Tileset` in the
11-
`github.com/consbio/mbtileserver/handlers` package are now `http.HandlerFunc`s
12-
instead of custom handlers that returned status codes or errors as in the previous
13-
versions.
14-
15-
The internal routing within these handlers has been modified to enable
16-
tilesets to change at runtime. Previously, we were using an `http.ServeMux`
17-
for all routes, which breaks when the `Tileset` instances pointed to by those
18-
routes have changed at runtime. Now, the top-level `ServiceSet.Handler()`
19-
allows dynamic routing to any `Tileset` instances currently published. Each
20-
`Tileset` is now responsible for routing to its subpaths (e.g., tile endpoint).
21-
22-
The singular public handler endpoint is still an `http.Handler` instance but
23-
no longer takes any parameters. Those parameters are now handled using
24-
configuration options instead.
25-
26-
`ServiceSet` now enables configuration to set the root URL, toggle which endpoints
27-
are exposed and set the internal error logger. These are passed in using a
28-
`ServiceSetConfig` struct when the service is constructed; these configuration
29-
options are not modifiable at runtime.
30-
31-
`Tileset` instances are now created individually from a set of source `mbtiles`
32-
files, instead of generated within `ServiceSet` from a directory. This provides
33-
more granular control over assigning IDs to tilesets as well as creating,
34-
updating, or deleting `Tileset` instances. You must generate unique IDs for
35-
tilesets before adding to the `ServiceSet`; you can use
36-
`handlers.SHA1ID(filename)` to generate a unique SHA1 ID of the service based on
37-
its full filename path, or `handlers.RelativePathID(filename, tilePath)` to
38-
generate the ID from its path and filename within the tile directory `tilePath`.
39-
40-
HMAC authorization has been refactored into middleware external to the Go API.
41-
It now is instantiated as middleware in `main.go`; this provides better
42-
separation of concerns between the server (`main.go`) and the Go API. The API
43-
for interacting with HMAC authorization from the CLI or endpoints remains the
44-
same.
45-
46-
Most of the updates are demonstrated in `main.go`.
3+
## O.7
474

485
### General changes
496

50-
- Upgraded Docker containers to Go 1.16
51-
- Now requires Go 1.13+
52-
- Removed `vendor` directory
53-
- Switched from Travis-CI to Github actions for running tests
7+
- substantial changes to internal functionality and HTTP handlers, see details below
8+
- now requires Go 1.13+
9+
- upgraded Docker containers to Go 1.16
10+
- upgraded Go version used for release to Go 1.16
11+
- removed `vendor` directory; no longer needed for Go 1.13
12+
- switched from Travis-CI to Github actions for running tests
5413

5514
### Command-line interface
5615

@@ -96,6 +55,51 @@ Most of the updates are demonstrated in `main.go`.
9655

9756
- Fixed WebP parsing, now uses simplified check for a `RIFF` header (WebP is only likely RIFF format to be stored in tiles). #98, #110
9857

58+
### Details
59+
60+
This version involved a significant refactor of internal functionality and HTTP
61+
handlers to provide better ability to modify services at runtime, provide
62+
granular control over the endpoints that are exposed, and cleanup handling
63+
of middleware.
64+
65+
Most internal HTTP handlers for `ServiceSet` and `Tileset` in the
66+
`github.com/consbio/mbtileserver/handlers` package are now `http.HandlerFunc`s
67+
instead of custom handlers that returned status codes or errors as in the previous
68+
versions.
69+
70+
The internal routing within these handlers has been modified to enable
71+
tilesets to change at runtime. Previously, we were using an `http.ServeMux`
72+
for all routes, which breaks when the `Tileset` instances pointed to by those
73+
routes have changed at runtime. Now, the top-level `ServiceSet.Handler()`
74+
allows dynamic routing to any `Tileset` instances currently published. Each
75+
`Tileset` is now responsible for routing to its subpaths (e.g., tile endpoint).
76+
77+
The singular public handler endpoint is still an `http.Handler` instance but
78+
no longer takes any parameters. Those parameters are now handled using
79+
configuration options instead.
80+
81+
`ServiceSet` now enables configuration to set the root URL, toggle which endpoints
82+
are exposed and set the internal error logger. These are passed in using a
83+
`ServiceSetConfig` struct when the service is constructed; these configuration
84+
options are not modifiable at runtime.
85+
86+
`Tileset` instances are now created individually from a set of source `mbtiles`
87+
files, instead of generated within `ServiceSet` from a directory. This provides
88+
more granular control over assigning IDs to tilesets as well as creating,
89+
updating, or deleting `Tileset` instances. You must generate unique IDs for
90+
tilesets before adding to the `ServiceSet`; you can use
91+
`handlers.SHA1ID(filename)` to generate a unique SHA1 ID of the service based on
92+
its full filename path, or `handlers.RelativePathID(filename, tilePath)` to
93+
generate the ID from its path and filename within the tile directory `tilePath`.
94+
95+
HMAC authorization has been refactored into middleware external to the Go API.
96+
It now is instantiated as middleware in `main.go`; this provides better
97+
separation of concerns between the server (`main.go`) and the Go API. The API
98+
for interacting with HMAC authorization from the CLI or endpoints remains the
99+
same.
100+
101+
Most of the updates are demonstrated in `main.go`.
102+
99103
## 0.6.1
100104

101105
- upgraded Docker containers to Go 1.14 (solves out of memory issues during builds on small containers)

go.mod

+17-15
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
module github.com/consbio/mbtileserver
22

33
require (
4-
github.com/certifi/gocertifi v0.0.0-20190105021004-abcd57078448 // indirect
4+
github.com/certifi/gocertifi v0.0.0-20210507211836-431795d63e8d // indirect
55
github.com/evalphobia/logrus_sentry v0.8.2
66
github.com/getsentry/raven-go v0.2.0 // indirect
7-
github.com/inconshreveable/mousetrap v1.0.0 // indirect
8-
github.com/labstack/echo/v4 v4.0.1-0.20190313005416-e3717be4beda
9-
github.com/mattn/go-colorable v0.1.1 // indirect
10-
github.com/mattn/go-isatty v0.0.7 // indirect
11-
github.com/mattn/go-sqlite3 v1.10.0
12-
github.com/pkg/errors v0.8.1 // indirect
7+
github.com/kr/text v0.2.0 // indirect
8+
github.com/labstack/echo/v4 v4.3.0
9+
github.com/mattn/go-sqlite3 v1.14.7
10+
github.com/pkg/errors v0.9.1 // indirect
1311
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749
14-
github.com/shurcooL/vfsgen v0.0.0-20181202132449-6a9ea43bcacd
15-
github.com/sirupsen/logrus v1.4.0
16-
github.com/spf13/cobra v0.0.3
17-
github.com/spf13/pflag v1.0.3 // indirect
18-
github.com/valyala/fasttemplate v1.0.1 // indirect
19-
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550
20-
golang.org/x/tools v0.0.0-20200213023303-cbc0cc175f84 // indirect
12+
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546
13+
github.com/sirupsen/logrus v1.8.1
14+
github.com/spf13/cobra v1.1.3
15+
github.com/stretchr/testify v1.7.0 // indirect
16+
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a
17+
golang.org/x/net v0.0.0-20210510120150-4163338589ed // indirect
18+
golang.org/x/sys v0.0.0-20210514084401-e8d321eab015 // indirect
19+
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect
20+
golang.org/x/tools v0.1.1 // indirect
21+
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
22+
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
2123
)
2224

23-
go 1.10
25+
go 1.13

0 commit comments

Comments
 (0)