Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Initialize ¶
func Initialize( rctx repocontext.RepoContext, auditTables, ignoreFields []string, systemUserId string) error
Types ¶
type AuditLog ¶
type AuditLog struct {
ID []byte `gorm:"primaryKey;type:binary(16)"`
TableName string `gorm:"size:255"`
RecordID string `gorm:"size:255;index"`
UserId string `gorm:"index"`
CreatedAt time.Time `gorm:"autoCreateTime"`
UpdatedAt time.Time `gorm:"autoUpdateTime"`
DeletedAt gorm.DeletedAt `gorm:"index"`
}
GORM Models for Audit Logging tables
type AuditLogDetails ¶
type AuditLogDetails struct {
ID []byte `gorm:"primaryKey;type:binary(16)"`
AuditLogId []byte `gorm:"type:binary(16)"`
FieldName string `gorm:"size:255;index"`
OldValue string `gorm:"type:text"`
NewValue string `gorm:"type:text"`
CreatedAt time.Time `gorm:"autoCreateTime"`
UpdatedAt time.Time `gorm:"autoUpdateTime"`
DeletedAt gorm.DeletedAt `gorm:"index"`
}
type AuditTrail ¶
type AuditTrail struct {
AuditLogID []byte `json:"audit_log_id"`
TableName string `json:"table_name"`
RecordID string `json:"record_id"`
UserID string `json:"user_id"`
LogCreatedAt time.Time `json:"log_created_on" gorm:"column:log_created_on"`
AuditLogDetailID []byte `json:"audit_log_detail_id"`
FieldName string `json:"field_name"`
OldValue string `json:"old_value"`
NewValue string `json:"new_value"`
DetailCreatedAt time.Time `json:"detail_created_on" gorm:"column:detail_created_on"`
}
Get Audit Trail response model
type AuditTrailData ¶
type AuditTrailData struct {
TotalRecords int64 `json:"total_records"`
Records []AuditTrail `json:"records"`
}
type AuditTrailRepo ¶
type AuditTrailRepo struct {
repocontext.RepoContext
}
func NewAuditTrailRepo ¶
func NewAuditTrailRepo( _ctx repocontext.RepoContext, ) *AuditTrailRepo
func (*AuditTrailRepo) GetAuditTrail ¶
func (ar *AuditTrailRepo) GetAuditTrail(recordIds []uuid.UUID, batchSize int, offset int) mo.Result[*AuditTrailData]
Click to show internal directories.
Click to hide internal directories.