1
0
Fork 0
mirror of https://github.com/Luzifer/vault-openvpn.git synced 2024-12-25 06:11:21 +00:00
vault-openvpn/cmd/structs.go
Knut Ahlers 825254e7f3
Allow listin certs as JSON for automated processing
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2018-06-15 00:23:10 +02:00

26 lines
507 B
Go

package cmd
import "time"
type templateVars struct {
CertAuthority string
Certificate string
PrivateKey string
TLSAuth string
}
type listCertificatesTableRow struct {
FQDN string `json:"fqdn"`
NotBefore time.Time `json:"not_before"`
NotAfter time.Time `json:"not_after"`
Serial string `json:"serial"`
}
func (l listCertificatesTableRow) ToLine() []string {
return []string{
l.FQDN,
l.NotBefore.Format(dateFormat),
l.NotAfter.Format(dateFormat),
l.Serial,
}
}