Documentation
¶
Overview ¶
Package fixture provides fixed sample data for the UI prototype in dev mode. Nothing here is a real certificate or key: serials and fingerprints are derived from names so they are stable across runs. Phase 1 replaces this package with the store; the pages don't change.
Index ¶
Constants ¶
const User = "it-admin"
User is the signed-in sample user.
Variables ¶
var Now = time.Date(2026, 10, 13, 8, 0, 0, 0, time.UTC)
Now is the fixed reference time of the sample data, so relative dates ("in 83 days") and screenshots are reproducible.
var Tenants = []string{"homelab", "lab-2"}
Tenants are the sample tenants for the header switch.
Functions ¶
This section is empty.
Types ¶
type Activity ¶
type Activity struct {
Time time.Time
Actor, Action, Target string
Result string // success | denied | failure
}
Activity is one entry of the recent-activity list.
func RecentActivity ¶
func RecentActivity() []Activity
RecentActivity returns the activity list, newest first.
type CA ¶
type CA struct {
ID, Name, Kind, ParentID string
Subject string
KeyAlgorithm, KeyMode string
NotBefore, NotAfter time.Time
PathLen string
PermittedDNS []string
PermittedIP []string
MaxValidityDays int
CRLNumber int
CRLThisUpdate time.Time
CRLNextUpdate time.Time
PublicBaseURL string
}
CA is a sample certificate authority.
func (CA) Fingerprint ¶
Fingerprint is a stable, fake SHA-256 fingerprint.
type Certificate ¶
type Certificate struct {
ID, CommonName, Preset, CAID string
NotBefore, NotAfter time.Time
KeyAlgorithm string
DNS, IP, Email []string
KeyStored bool
RequestedBy string
RevokedAt time.Time // zero if not revoked
RevocationReason string
History []Event
}
Certificate is a sample end-entity certificate.
func CertificateByID ¶
func CertificateByID(id string) (Certificate, bool)
CertificateByID returns one certificate.
func Certificates ¶
func Certificates() []Certificate
Certificates returns all sample certificates, newest first.
func (Certificate) Fingerprint ¶
func (c Certificate) Fingerprint() string
Fingerprint is a stable, fake SHA-256 fingerprint.
func (Certificate) Serial ¶
func (c Certificate) Serial() string
Serial is a stable, fake serial number.