services

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidInput = errors.New("invalid input")

ErrInvalidInput represents an input validation error

View Source
var ErrValidation = errors.New("validation error")

ErrValidation represents a validation error in the domain layer This is a domain-specific error that abstracts away database implementation details

Functions

func IsValidationError

func IsValidationError(err error) bool

IsValidationError checks if an error is a validation error or invalid input

Types

type AuditService

type AuditService struct {
	// contains filtered or unexported fields
}

AuditService handles generalized audit log operations

func NewAuditService

func NewAuditService(repo database.AuditRepository) *AuditService

NewAuditService creates a new audit service instance using the database repository

func (*AuditService) CreateAuditLog

CreateAuditLog creates a new audit log entry from a request

func (*AuditService) GetAuditLogs

func (s *AuditService) GetAuditLogs(ctx context.Context, traceID *string, eventType *string, limit, offset int) ([]v1models.AuditLog, int64, error)

GetAuditLogs retrieves audit logs with optional filtering

func (*AuditService) GetAuditLogsByTraceID

func (s *AuditService) GetAuditLogsByTraceID(ctx context.Context, traceID string) ([]v1models.AuditLog, error)

GetAuditLogsByTraceID retrieves audit logs by trace ID (convenience method)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL