Documentation ¶
Index ¶
- Variables
- type Service
- func (s *Service) AddApprover(ctx context.Context, approvalID, email string) error
- func (s *Service) BulkInsert(ctx context.Context, approvals []*domain.Approval) error
- func (s *Service) DeleteApprover(ctx context.Context, approvalID, email string) error
- func (s *Service) GetApprovalsTotalCount(ctx context.Context, filters *domain.ListApprovalsFilter) (int64, error)
- func (s *Service) ListApprovals(ctx context.Context, filters *domain.ListApprovalsFilter) ([]*domain.Approval, error)
- type ServiceDeps
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrPolicyNotFound = errors.New("policy not found") ErrDependencyApprovalStepNotFound = errors.New("unable to resolve approval step dependency") ErrApprovalStepConditionNotFound = errors.New("unable to resolve designated condition") ErrNilResourceInAppeal = errors.New("unable to resolve resource from the appeal") ErrInvalidConditionField = errors.New("invalid condition field") ErrAppealStatusCanceled = errors.New("appeal already canceled") ErrAppealStatusApproved = errors.New("appeal already approved") ErrAppealStatusRejected = errors.New("appeal already rejected") ErrAppealStatusBlocked = errors.New("approval is blocked") ErrAppealStatusUnrecognized = errors.New("unrecognized appeal status") ErrAppealDuplicate = errors.New("appeal with the same resource and role already exists") ErrAppealInvalidExtensionDuration = errors.New("invalid appeal extension duration") ErrAppealFoundActiveGrant = errors.New("user still have an active grant") ErrGrantNotEligibleForExtension = errors.New("existing grant is not eligible for extension") ErrCannotCreateAppealForOtherUser = errors.New("creating appeal for other individual user (account_type=\"user\") is not allowed") ErrApprovalDependencyIsBlocked = errors.New("found previous approval step that is still in blocked") ErrApprovalDependencyIsPending = errors.New("found previous approval step that is still in pending") ErrApprovalStatusApproved = errors.New("approval already approved") ErrApprovalStatusRejected = errors.New("approval already rejected") ErrApprovalStatusSkipped = errors.New("approval already skipped") ErrApprovalStatusUnrecognized = errors.New("unrecognized approval status") ErrApprovalNotFound = errors.New("approval not found") ErrUnableToAddApprover = errors.New("unable to add a new approver") ErrUnableToDeleteApprover = errors.New("unable to remove approver") ErrActionForbidden = errors.New("user is not allowed to make action on this approval step") ErrActionInvalidValue = errors.New("invalid action value") )
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(deps ServiceDeps) *Service
func (*Service) AddApprover ¶
func (*Service) BulkInsert ¶
func (*Service) DeleteApprover ¶
func (*Service) GetApprovalsTotalCount ¶ added in v0.7.5
func (*Service) ListApprovals ¶
type ServiceDeps ¶
type ServiceDeps struct { Repository repository PolicyService policyService }
Click to show internal directories.
Click to hide internal directories.