route/database/cert.go

23 lines
629 B
Go

package database
// CryptoLevel indicates what form of cryptography the certificate is stored
// with.
type CryptoLevel int
// Crypto levels / strategies defined
const (
// NOTE: this is defined for debugging / testing usage only
CryptoLevelNone CryptoLevel = iota
// Use the global set of secretbox keys
CryptoLevelSecretbox
)
// CachedCert is an individual cached certificate in the database.
type CachedCert struct {
Key string `gorethink:"id" storm:"id"`
CryptoLevel CryptoLevel `gorethink:"cryptoLevel"`
// PEM-encoded bytes with the above crypto level as a filter.
Body []byte `gorethink:"body"`
}