Documentation ¶
Index ¶
- Constants
- Variables
- type ProtectionManager
- func (m *ProtectionManager) Add(ctx context.Context, repository *graveler.RepositoryRecord, ...) error
- func (m *ProtectionManager) Delete(ctx context.Context, repository *graveler.RepositoryRecord, ...) error
- func (m *ProtectionManager) Get(ctx context.Context, repository *graveler.RepositoryRecord, ...) ([]graveler.BranchProtectionBlockedAction, error)
- func (m *ProtectionManager) GetRules(ctx context.Context, repository *graveler.RepositoryRecord) (*graveler.BranchProtectionRules, error)
- func (m *ProtectionManager) IsBlocked(ctx context.Context, repository *graveler.RepositoryRecord, ...) (bool, error)
Constants ¶
View Source
const ProtectionSettingKey = "protected_branches"
Variables ¶
View Source
var ( ErrRuleAlreadyExists = fmt.Errorf("branch protection rule already exists: %w", graveler.ErrNotUnique) ErrRuleNotExists = fmt.Errorf("branch protection rule does not exist: %w", graveler.ErrNotFound) )
Functions ¶
This section is empty.
Types ¶
type ProtectionManager ¶
type ProtectionManager struct {
// contains filtered or unexported fields
}
func NewProtectionManager ¶
func NewProtectionManager(settingManager *settings.Manager) *ProtectionManager
func (*ProtectionManager) Add ¶
func (m *ProtectionManager) Add(ctx context.Context, repository *graveler.RepositoryRecord, branchNamePattern string, blockedActions []graveler.BranchProtectionBlockedAction) error
func (*ProtectionManager) Delete ¶
func (m *ProtectionManager) Delete(ctx context.Context, repository *graveler.RepositoryRecord, branchNamePattern string) error
func (*ProtectionManager) Get ¶
func (m *ProtectionManager) Get(ctx context.Context, repository *graveler.RepositoryRecord, branchNamePattern string) ([]graveler.BranchProtectionBlockedAction, error)
func (*ProtectionManager) GetRules ¶
func (m *ProtectionManager) GetRules(ctx context.Context, repository *graveler.RepositoryRecord) (*graveler.BranchProtectionRules, error)
func (*ProtectionManager) IsBlocked ¶
func (m *ProtectionManager) IsBlocked(ctx context.Context, repository *graveler.RepositoryRecord, branchID graveler.BranchID, action graveler.BranchProtectionBlockedAction) (bool, error)
Click to show internal directories.
Click to hide internal directories.