Documentation ¶
Index ¶
- Constants
- Variables
- func WithDryRun(ctx context.Context) context.Context
- type Service
- func (s *Service) Create(ctx context.Context, p *domain.Policy) error
- func (s *Service) Find(ctx context.Context) ([]*domain.Policy, error)
- func (s *Service) GetOne(ctx context.Context, id string, version uint) (*domain.Policy, error)
- func (s *Service) Update(ctx context.Context, p *domain.Policy) error
- type ServiceDeps
Constants ¶
View Source
const ( AuditKeyPolicyCreate = "policy.create" AuditKeyPolicyUpdate = "policy.update" )
Variables ¶
View Source
var ( // ErrEmptyIDParam is the error value if the policy id is empty ErrEmptyIDParam = errors.New("id can't be empty") // ErrPolicyNotFound is the error value if the designated policy not found ErrPolicyNotFound = errors.New("policy not found") ErrIDContainsWhitespaces = errors.New("id should not contain whitespaces") ErrStepNameContainsWhitespaces = errors.New("step name should not contain whitespaces") ErrInvalidApprovers = errors.New("invalid approvers") ErrStepDependencyDoesNotExists = errors.New("step dependency does not exists") )
Functions ¶
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service handling the business logics
type ServiceDeps ¶
type ServiceDeps struct { Repository repository ResourceService resourceService ProviderService providerService IAMManager domain.IAMManager Validator *validator.Validate Logger log.Logger AuditLogger auditLogger }
Click to show internal directories.
Click to hide internal directories.