Documentation ¶
Overview ¶
Package approvalrule implements functionality related to Phobos approval rules.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateApprovalRuleInput ¶
type CreateApprovalRuleInput struct { Scope models.ScopeType OrgID *string ProjectID *string Name string Description string UserIDs []string ServiceAccountIDs []string TeamIDs []string ApprovalsRequired int }
CreateApprovalRuleInput is the input for creating a approval rule
type DeleteApprovalRuleInput ¶
DeleteApprovalRuleInput is the input for deleting a approval rule
type GetApprovalRulesInput ¶
type GetApprovalRulesInput struct { // Sort specifies the field to sort on and direction Sort *db.ApprovalRuleSortableField // PaginationOptions supports cursor based pagination PaginationOptions *pagination.Options // OrganizationID filters the approval rules by the specified organization OrganizationID *string // ProjectID filters the approval rules by the specified project ProjectID *string // ApprovalRuleScopes will filter the approval rules that are scope to specific level ApprovalRuleScopes []models.ScopeType }
GetApprovalRulesInput is the input for querying a list of approval rules
type Service ¶
type Service interface { GetApprovalRuleByID(ctx context.Context, id string) (*models.ApprovalRule, error) GetApprovalRuleByPRN(ctx context.Context, prn string) (*models.ApprovalRule, error) GetApprovalRulesByIDs(ctx context.Context, idList []string) ([]*models.ApprovalRule, error) GetApprovalRules(ctx context.Context, input *GetApprovalRulesInput) (*db.ApprovalRulesResult, error) CreateApprovalRule(ctx context.Context, input *CreateApprovalRuleInput) (*models.ApprovalRule, error) UpdateApprovalRule(ctx context.Context, input *UpdateApprovalRuleInput) (*models.ApprovalRule, error) DeleteApprovalRule(ctx context.Context, input *DeleteApprovalRuleInput) error }
Service implements all approval rule related functionality
func NewService ¶
func NewService( logger logger.Logger, dbClient *db.Client, limitChecker limits.LimitChecker, activityService activityevent.Service, ) Service
NewService returns an instance of Service
type UpdateApprovalRuleInput ¶
type UpdateApprovalRuleInput struct { Version *int Description *string ID string UserIDs []string ServiceAccountIDs []string TeamIDs []string }
UpdateApprovalRuleInput is the input for updating a approval rule For now, a approval rule cannot move between orgs or into or out of an org.
Click to show internal directories.
Click to hide internal directories.