aboutsummaryrefslogtreecommitdiff
path: root/lib/proto.go
blob: 5d8c67ac5f59bd6bfa0e390911bd364b036264d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package lib

import "time"

// SignRequest represents a signing request sent to the server.
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"`
}