Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertRecord ¶
type CertRecord struct { ID int `json:"-" db:"id"` KeyID string `json:"key_id" db:"key_id"` Principals StringSlice `json:"principals" db:"principals"` CreatedAt time.Time `json:"created_at" db:"created_at"` Expires time.Time `json:"expires" db:"expires_at"` Revoked bool `json:"revoked" db:"revoked"` Raw string `json:"-" db:"raw_key"` Message string `json:"message" db:"message"` }
A CertRecord is a representation of a ssh certificate used by a CertStorer.
func MakeRecord ¶ added in v1.2.0
func MakeRecord(cert *ssh.Certificate) *CertRecord
MakeRecord converts a Certificate to a CertRecord
func (*CertRecord) MarshalJSON ¶
func (c *CertRecord) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface for the CreatedAt and Expires fields. The resulting string looks like "2017-04-11 10:00:00 +0000"
type CertStorer ¶
type CertStorer interface { Get(id string) (*CertRecord, error) SetRecord(record *CertRecord) error List(includeExpired bool) ([]*CertRecord, error) Revoke(id []string) error GetRevoked() ([]*CertRecord, error) Close() error }
CertStorer records issued certs in a persistent store for audit and revocation purposes.
type StringSlice ¶ added in v1.1.0
type StringSlice []string
StringSlice is a []string which will be stored in a database as a JSON array.
func (*StringSlice) Scan ¶ added in v1.1.0
func (s *StringSlice) Scan(value interface{}) error
Scan implements the sql.Scanner interface, unmarshalling the value coming off the wire and storing the result in the StringSlice.
Click to show internal directories.
Click to hide internal directories.