Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AutoMigrate ¶
func DropIfExists ¶
func EntityStateToPB ¶
func EntityStateToPB(name string) pb.Entity_State
func PBToEntityState ¶
func PBToEntityState(state pb.Entity_State) string
Types ¶
type Certificate ¶
type Certificate struct { gorm.Model Hash []byte `gorm:"primary_key"` Certificate []byte Serial []byte EntityHash []byte Entity Entity Revoked bool NotBefore time.Time NotAfter time.Time }
func GetRevokedCertificates ¶
func GetRevokedCertificates(db *gorm.DB) ([]Certificate, error)
func (Certificate) ParseCertificate ¶
func (c Certificate) ParseCertificate() (*x509.Certificate, error)
func (Certificate) Pb ¶
func (c Certificate) Pb() (*pb.Certificate, error)
type Entity ¶
type Entity struct { gorm.Model Hash []byte `gorm:"primary_key"` State string CSR []byte Email string Certificates []Certificate Longevity *string Expires *time.Time }
func (Entity) GetCertificate ¶
func (entity Entity) GetCertificate(db *gorm.DB) (*Certificate, error)
func (Entity) GetCertificates ¶
func (entity Entity) GetCertificates(db *gorm.DB) ([]Certificate, error)
func (Entity) ParseCertificateRequest ¶
func (c Entity) ParseCertificateRequest() (*x509.CertificateRequest, error)
Click to show internal directories.
Click to hide internal directories.