Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrIdempotencyKeyConflict = errors.New("audit record already exists for the given idempotency key") ErrInvalidUUID = errors.New("invalid syntax of uuid") ErrNotFound = errors.New("audit record not found") ErrRepositoryBadInput = errors.New("invalid repository input") ErrActorNotFound = errors.New("actor not found") )
Functions ¶
Types ¶
type AuditRecord ¶
type AuditRecord = models.AuditRecord
Models moved to a new package to avoid circular dependency with other packages. Re-assigned for backward compatibility
type AuditRecordRQLSchema ¶ added in v0.75.0
type AuditRecordRQLSchema = models.AuditRecordRQLSchema
type AuditRecordsList ¶ added in v0.75.0
type AuditRecordsList = models.AuditRecordsList
type Repository ¶
type Repository interface {
Create(ctx context.Context, auditRecord AuditRecord) (AuditRecord, error)
GetByIdempotencyKey(ctx context.Context, idempotencyKey string) (AuditRecord, error)
List(ctx context.Context, query *rql.Query) (AuditRecordsList, error)
Export(ctx context.Context, query *rql.Query) (io.Reader, string, error)
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(repository Repository, userService UserService, serviceUserService ServiceUserService, sessionService SessionService) *Service
func (*Service) Create ¶
func (s *Service) Create(ctx context.Context, auditRecord AuditRecord) (AuditRecord, bool, error)
type ServiceUserService ¶
type ServiceUserService interface {
Get(ctx context.Context, id string) (serviceuser.ServiceUser, error)
}
type SessionService ¶ added in v0.75.0
Click to show internal directories.
Click to hide internal directories.