Documentation ¶
Overview ¶
Package audited is used to log last UpdatedBy and CreatedBy for your models
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterCallbacks ¶
RegisterCallbacks register callback into GORM DB
Types ¶
type AuditedModel ¶
AuditedModel make Model Auditable, embed `audited.AuditedModel` into your model as anonymous field to make the model auditable
type User struct { gorm.Model audited.AuditedModel }
func (AuditedModel) GetCreatedBy ¶
func (model AuditedModel) GetCreatedBy() string
GetCreatedBy get created by
func (AuditedModel) GetUpdatedBy ¶
func (model AuditedModel) GetUpdatedBy() string
GetUpdatedBy get updated by
func (*AuditedModel) SetCreatedBy ¶
func (model *AuditedModel) SetCreatedBy(createdBy interface{})
SetCreatedBy set created by
func (*AuditedModel) SetUpdatedBy ¶
func (model *AuditedModel) SetUpdatedBy(updatedBy interface{})
SetUpdatedBy set updated by
Click to show internal directories.
Click to hide internal directories.