File tree Expand file tree Collapse file tree 5 files changed +43
-2
lines changed
Expand file tree Collapse file tree 5 files changed +43
-2
lines changed Original file line number Diff line number Diff line change 11* .bin
22out
3+ build
Original file line number Diff line number Diff line change @@ -14,3 +14,32 @@ To install from source clone the project and run
1414``` bash
1515go install ./...
1616```
17+
18+ ## Usage
19+
20+ To download a TEK export run ` gaen download ` with a supported app (` immuni ` or ` swisscovid ` , at the moment):
21+
22+ ```
23+ gaen download immuni
24+ ```
25+
26+ This will download the export in a ` out/immuni/xxx ` folder.
27+
28+ Then you can decode the export running
29+
30+ ```
31+ gaen decode out/immuni/xxx/export.bin
32+ ```
33+
34+ and this will output the first TEK with the first RPI:
35+
36+ ```
37+ TEK: [+KYwhAsB9QEq0PvaJfo4+Q==] - [F8 A6 30 84 B 1 F5 1 2A D0 FB DA 25 FA 38 F9]
38+
39+ RPI:
40+ {
41+ "id": "q7WZAsXPgkuE+BEiadwLPQ==",
42+ "id_bytes": "AB B5 99 2 C5 CF 82 4B 84 F8 11 22 69 DC B 3D",
43+ "interval": "2020-10-03T02:00:00+02:00"
44+ }
45+ ```
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ VERSION=$( git describe --tags)
4+ ARCH=amd64
5+
6+ for OS in linux darwin windows;
7+ do
8+ GOARCH=${ARCH} GOOS=${OS} go build -ldflags " -X main.version=${VERSION} " -o build/gaen-${VERSION} -${OS} -${ARCH} .
9+ done
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf
5757github.com/grpc-ecosystem/grpc-gateway v1.9.0 /go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY =
5858github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4 =
5959github.com/hashicorp/hcl v1.0.0 /go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ =
60+ github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM =
6061github.com/inconshreveable/mousetrap v1.0.0 /go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8 =
6162github.com/jonboulle/clockwork v0.1.0 /go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo =
6263github.com/julienschmidt/httprouter v1.2.0 /go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w =
Original file line number Diff line number Diff line change @@ -6,12 +6,13 @@ import (
66 "fmt"
77 "gaen/export"
88 "io/ioutil"
9- "strings"
109
1110 "github.com/spf13/cobra"
1211 "google.golang.org/protobuf/proto"
1312)
1413
14+ var version = "0.0.0-dev"
15+
1516var rootCmd = & cobra.Command {
1617 Use : "gaen" ,
1718 Short : "gaen is a cli to interact with the Google Apple Exposure Notification" ,
@@ -21,7 +22,7 @@ var versionCmd = &cobra.Command{
2122 Use : "version" ,
2223 Short : "Print the gaen version number" ,
2324 Run : func (cmd * cobra.Command , args []string ) {
24- fmt .Println ("Print: " + strings . Join ( args , " " ) )
25+ fmt .Println ("gaen version " + version )
2526 },
2627}
2728
You can’t perform that action at this time.
0 commit comments