mirror of
https://github.com/hanzoai/ca.git
synced 2026-11-03 18:08:27 +00:00
17 lines
751 B
Go
17 lines
751 B
Go
// Package model holds the database rows and their validation and conversion
|
|
// to the public API messages.
|
|
//
|
|
// model.gen.go is generated by make gen-sql-schema from the local database
|
|
// and is never edited; the handwritten files own Validate, the constructors
|
|
// that build rows from parsed certificates (NewCertificate,
|
|
// NewRootCertificate, Issuer.SetCertificate, NewCertificateProfile) and the
|
|
// Pb conversions. JSON is the raw value of the jsonb config columns, which
|
|
// hold nested pb.IssuerConfig and pb.CertProfile documents:
|
|
//
|
|
// issuer.SetConfig(&pb.IssuerConfig{CrlExpiry: "48h"})
|
|
// cfg, err := issuer.GetConfig()
|
|
//
|
|
// A CA row with a zero OrgID is the platform's, and a project row needs an
|
|
// org (validateTenancy).
|
|
package model
|