Documentation
¶
Index ¶
- type AppendRequest
- type Service
- func (service *Service) Append(ctx context.Context, request AppendRequest) (model.AuditEntry, error)
- func (service *Service) AppendWithMutation(ctx context.Context, request AppendRequest, mutation storage.AuditedMutation) (model.AuditEntry, error)
- func (service *Service) Verify(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppendRequest ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewWithKeyring ¶
func NewWithKeyring(database *storage.DB, privateKey ed25519.PrivateKey, historical []ed25519.PublicKey, anchorPath string) (*Service, error)
NewWithKeyring keeps historical audit records verifiable across signing-key rotation. Historical keys are verification-only; all new entries and anchors use the current private key.
func (*Service) Append ¶
func (service *Service) Append(ctx context.Context, request AppendRequest) (model.AuditEntry, error)
func (*Service) AppendWithMutation ¶
func (service *Service) AppendWithMutation( ctx context.Context, request AppendRequest, mutation storage.AuditedMutation, ) (model.AuditEntry, error)
AppendWithMutation serializes the chain and executes a storage-issued closed mutation capability. Only reviewed storage transitions can implement that capability, and each commits the entry in the same SQLite transaction as its domain mutation. The external anchor advances only after that commit.
Click to show internal directories.
Click to hide internal directories.