aboutsummaryrefslogtreecommitdiff
path: root/server/store/store.go
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2016-09-10 20:14:20 +0100
committerNiall Sheridan <nsheridan@gmail.com>2016-09-11 20:41:32 +0100
commit2e7c8c2f521c9e50bb3aea4df16771c22fe70e58 (patch)
tree44daf7fea192d0e2368b2bb93545098c0adf610a /server/store/store.go
parentadc3c7f16051d51a58d96e32082aaeb051e3da20 (diff)
Allow filtering results
Diffstat (limited to 'server/store/store.go')
-rw-r--r--server/store/store.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/server/store/store.go b/server/store/store.go
index f6ac66e..a846bda 100644
--- a/server/store/store.go
+++ b/server/store/store.go
@@ -14,7 +14,7 @@ type CertStorer interface {
Get(id string) (*CertRecord, error)
SetCert(cert *ssh.Certificate) error
SetRecord(record *CertRecord) error
- List() ([]*CertRecord, error)
+ List(includeExpired bool) ([]*CertRecord, error)
Revoke(id string) error
GetRevoked() ([]*CertRecord, error)
Close() error
@@ -22,12 +22,12 @@ type CertStorer interface {
// A CertRecord is a representation of a ssh certificate used by a CertStorer.
type CertRecord struct {
- KeyID string
- Principals []string
- CreatedAt time.Time
- Expires time.Time
- Revoked bool
- Raw string
+ KeyID string `json:"key_id"`
+ Principals []string `json:"principals"`
+ CreatedAt time.Time `json:"created_at"`
+ Expires time.Time `json:"expires"`
+ Revoked bool `json:"revoked"`
+ Raw string `json:"-"`
}
func parseTime(t uint64) time.Time {