path: root/lib
diff options
authorNiall Sheridan <nsheridan@gmail.com>2018-08-08 21:55:02 +0100
committerNiall Sheridan <nsheridan@gmail.com>2018-08-10 18:35:13 +0100
commit87ae7c73ebe05f777e23087b1550d2cab42746ff (patch)
tree45e4ea4ce48385ebbb9ba83447bfb5d66d97dea7 /lib
parent3e006c39b0a4411e91e80de261d0e7b5353d44c0 (diff)
Add version string
Add `lib.Version` to get updated at build time. Add --version flags to cashier and cashierd Send client version in the signing request Send server version in http response headers and in signing response Set version at build time
Diffstat (limited to 'lib')
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/proto.go b/lib/proto.go
index a67ad47..5d8c67a 100644
--- a/lib/proto.go
+++ b/lib/proto.go
@@ -7,10 +7,12 @@ type SignRequest struct {
Key string `json:"key"`
ValidUntil time.Time `json:"valid_until"`
Message string `json:"message"`
+ Version string `json:"version"`
// SignResponse is sent by the server.
type SignResponse struct {
Status string `json:"status"` // Status will be "ok" or "error".
Response string `json:"response"` // Response will contain either the signed certificate or the error message.
+ Version string `json:"version"`
diff --git a/lib/version.go b/lib/version.go
new file mode 100644
index 0000000..b59bca4
--- /dev/null
+++ b/lib/version.go
@@ -0,0 +1,4 @@
+package lib
+// Version string
+var Version = "unknown"