Versions in this module Expand all Collapse all v0 v0.1.1 Jun 25, 2026 v0.1.0 Jun 25, 2026 Changes in this version + func Diff(old, new map[string]any) map[string]any + func Middleware(next http.Handler) http.Handler + func WithMeta(ctx context.Context, m Meta) context.Context + type Change struct + New any + Old any + type Entry struct + Action string + CauserID string + Changes JSONText + CreatedAt string + ID string + IP string + SubjectID string + SubjectType string + UserAgent string + type Filter struct + Action string + CauserID string + Limit int + Offset int + SubjectID string + SubjectType string + type JSONText []byte + func (j *JSONText) Scan(src any) error + func (j JSONText) Map() map[string]any + func (j JSONText) MarshalJSON() ([]byte, error) + type Meta struct + CauserID string + IP string + UserAgent string + type Service struct + func FromKernel(k *togo.Kernel) (*Service, bool) + func (s *Service) Activity(ctx context.Context, f Filter) ([]Entry, error) + func (s *Service) Log(ctx context.Context, action, subjectType, subjectID, causerID string, ...) (*Entry, error) + func (s *Service) LogChange(ctx context.Context, action, subjectType, subjectID, causerID string, ...) (*Entry, error) + func (s *Service) Restore(ctx context.Context, versionID string) (map[string]any, *Version, error) + func (s *Service) Snapshot(ctx context.Context, subjectType, subjectID string, data map[string]any, ...) (*Version, error) + func (s *Service) Versions(ctx context.Context, subjectType, subjectID string) ([]Version, error) + type Version struct + CauserID string + CreatedAt string + Data JSONText + ID string + SubjectID string + SubjectType string