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") )
View Source
var SuperUserActorMetadataKey = "is_super_user"
Functions ¶
This section is empty.
Types ¶
type AuditRecord ¶
type Repository ¶
type Repository interface { Create(ctx context.Context, auditRecord AuditRecord) (AuditRecord, error) GetByIdempotencyKey(ctx context.Context, idempotencyKey string) (AuditRecord, error) }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(repository Repository, userService UserService, serviceUserService ServiceUserService) *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)
}
Click to show internal directories.
Click to hide internal directories.