Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuditLogRepository ¶
type AuditLogRequest ¶
type AuditLogRequest struct {
UserID int64 `json:"user_id"`
Path string `json:"path"`
Action string `json:"action"`
ResponseStatus int `json:"response_status"`
ModuleID string `json:"module_id"`
Module string `json:"module"`
BeforeChange any `json:"before_change"`
AfterChange any `json:"after_change"`
IPAddress string `json:"ip_address"`
UserAgent string `json:"user_agent"`
ErrorMessage string `json:"error_message"`
}
type AuditLogService ¶
type AuditLogService interface {
QueAuditLog(ctx context.Context)
AuditLog(audit AuditLogRequest, module_id, module string, beforeChange, afterChange any, err error)
}
func NewAuditLogService ¶
func NewAuditLogService(r AuditLogRepository) AuditLogService
type MockAuditLogRepository ¶
type MockAuditLogService ¶
type MockAuditLogService struct {
}
func (*MockAuditLogService) AuditLog ¶
func (m *MockAuditLogService) AuditLog(audit AuditLogRequest, module_id, module string, beforeChange, afterChange any, err error)
func (*MockAuditLogService) QueAuditLog ¶
func (m *MockAuditLogService) QueAuditLog(ctx context.Context)
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewAuditLogRepository ¶
func NewAuditLogRepository(db *bun.DB) *Repository
Click to show internal directories.
Click to hide internal directories.