Versions in this module Expand all Collapse all v1 v1.0.0 Feb 4, 2023 Changes in this version + const DefaultTableName + const LoggablePrevVersion + const LoggableUserTag + var ToSnakeCase = toSomeCase("_") + func StringMap(strs []string, fn func(string) string) []string + func ToLowerFirst(s string) string + func ToSnakeCaseRegEx(input string) string + type ChangeLog struct + Action string + CreatedAt int64 + CreatedBy string + ID string + Meta interface{} + Object interface{} + ObjectID string + ObjectType string + RawDiff string + RawMeta string + RawObject string + func (l ChangeLog) Diff() (UpdateDiff, error) + type DiffObject struct + New interface{} + Old interface{} + type Interface interface + Enable func(v bool) + Meta func() interface{} + type LoggableModel struct + Disabled bool + func (LoggableModel) Meta() interface{} + func (l LoggableModel) Enable(v bool) + type Option func(options *options) + func ComputeDiff() Option + func LazyUpdate(fields ...string) Option + func RegMetaType(objectType string, metaType interface{}) Option + func RegObjectType(objectType string, objectStruct interface{}) Option + type Plugin struct + func Register(db *gorm.DB, tablename string, opts ...Option) (Plugin, error) + func (p *Plugin) GetLastRecord(objectId string, prepare bool) (change ChangeLog, err error) + func (p *Plugin) GetRecords(objectId string, prepare bool) (changes []ChangeLog, err error) + type UpdateDiff map[string]interface + type User struct + Class string + ID string + Name string