From 2e7c8c2f521c9e50bb3aea4df16771c22fe70e58 Mon Sep 17 00:00:00 2001 From: Niall Sheridan Date: Sat, 10 Sep 2016 20:14:20 +0100 Subject: Allow filtering results --- server/store/store.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'server/store/store.go') 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 { -- cgit v1.2.3