Skip to content

Commit

Permalink
Merge branch 'flags' of github.com:whosonfirst/go-whosonfirst-spatial…
Browse files Browse the repository at this point in the history
…-grpc
  • Loading branch information
sfomuseumbot committed Jul 19, 2024
2 parents 97c30cf + 6b237d8 commit b75cc74
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ go build -mod vendor -o bin/client cmd/client/main.go
### client

```
> ./bin/client -h
$> ./bin/client -h
-alternate-geometry value
One or more alternate geometry labels (wof:alt_label) values to filter results by.
-cessation string
A valid EDTF date string.
-geometries string
Valid options are: all, alt, default. (default "all")
-host string
The host to listen for requests on (default "localhost")
The host of the gRPC server to connect to. (default "localhost")
-inception string
A valid EDTF date string.
-is-ceased value
Expand All @@ -47,7 +47,7 @@ go build -mod vendor -o bin/client cmd/client/main.go
-placetype value
One or more place types to filter results by.
-port int
The port to listen for requests on (default 8082)
The port of the gRPC server to connect to. (default 8082)
-property value
One or more Who's On First properties to append to each result.
-sort-uri value
Expand Down Expand Up @@ -92,19 +92,19 @@ $> ./bin/client -latitude 43.873889 -longitude 18.408611 -inception-date 199X |
### server

```
> ./bin/server -h
$> ./bin/server -h
-custom-placetypes string
A JSON-encoded string containing custom placetypes defined using the syntax described in the whosonfirst/go-whosonfirst-placetypes repository.
-enable-custom-placetypes
Enable wof:placetype values that are not explicitly defined in the whosonfirst/go-whosonfirst-placetypes repository.
-host string
... (default "localhost")
The host to listen for requests on (default "localhost")
-is-wof
Input data is WOF-flavoured GeoJSON. (Pass a value of '0' or 'false' if you need to index non-WOF documents. (default true)
-iterator-uri string
A valid whosonfirst/go-whosonfirst-iterate/v2 URI. Supported schemes are: directory://, featurecollection://, file://, filelist://, geojsonl://, null://, repo://. (default "repo://")
-port int
... (default 8082)
The port to listen for requests on (default 8082)
-properties-reader-uri string
A valid whosonfirst/go-reader.Reader URI. Available options are: [fs:// null:// repo:// stdin://]. If the value is {spatial-database-uri} then the value of the '-spatial-database-uri' implements the reader.Reader interface and will be used.
-spatial-database-uri string
Expand Down
4 changes: 2 additions & 2 deletions app/client/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ func DefaultFlagSet() (*flag.FlagSet, error) {

fs := flagset.NewFlagSet("client")

fs.StringVar(&host, "host", "localhost", "The host to listen for requests on")
fs.IntVar(&port, "port", 8082, "The port to listen for requests on")
fs.StringVar(&host, "host", "localhost", "The host of the gRPC server to connect to.")
fs.IntVar(&port, "port", 8082, "The port of the gRPC server to connect to.")

fs.BoolVar(&stdout, "stdout", true, "Emit results to STDOUT")
fs.BoolVar(&null, "null", false, "Emit results to /dev/null")
Expand Down
4 changes: 2 additions & 2 deletions app/server/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ func DefaultFlagSet() (*flag.FlagSet, error) {

fs := flagset.NewFlagSet("server")

fs.StringVar(&host, "host", "localhost", "...")
fs.IntVar(&port, "port", 8082, "...")
fs.StringVar(&host, "host", "localhost", "The host to listen for requests on")
fs.IntVar(&port, "port", 8082, "The port to listen for requests on")

available_databases := database.Schemes()
desc_databases := fmt.Sprintf("A valid whosonfirst/go-whosonfirst-spatial/data.SpatialDatabase URI. options are: %s", available_databases)
Expand Down
3 changes: 2 additions & 1 deletion cmd/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package main

import (
"context"
"github.com/whosonfirst/go-whosonfirst-spatial-grpc/app/client"
"log"

"github.com/whosonfirst/go-whosonfirst-spatial-grpc/app/client"
)

func main() {
Expand Down
3 changes: 2 additions & 1 deletion cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package main

import (
"context"
"github.com/whosonfirst/go-whosonfirst-spatial-grpc/app/server"
"log"

"github.com/whosonfirst/go-whosonfirst-spatial-grpc/app/server"
)

func main() {
Expand Down

0 comments on commit b75cc74

Please sign in to comment.