aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2016-04-18 22:11:39 +0100
committerNiall Sheridan <nsheridan@gmail.com>2016-04-18 22:11:39 +0100
commit884013090b1b56b207f644393865c6057c9999ca (patch)
tree92d94820d0e131bc8385a7ca6540a96336b4e963 /lib
Initial commit
Diffstat (limited to 'lib')
-rw-r--r--lib/const.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/const.go b/lib/const.go
new file mode 100644
index 0000000..fd771a0
--- /dev/null
+++ b/lib/const.go
@@ -0,0 +1,18 @@
+package lib
+
+import "time"
+
+// SignRequest represents a signing request sent to the server.
+type SignRequest struct {
+ Key string `json:"key"`
+ Principal string `json:"principal"`
+ ValidUntil time.Time `json:"valid_until"`
+}
+
+// SignResponse is sent by the server.
+// `Status' is "ok" or "error".
+// `Response' contains a signed certificate or an error message.
+type SignResponse struct {
+ Status string `json:"status"`
+ Response string `json:"response"`
+}