Documentation ¶
Index ¶
- Constants
- Variables
- type ProtectionManager
- func (m *ProtectionManager) Delete(ctx context.Context, repository *graveler.RepositoryRecord, ...) error
- func (m *ProtectionManager) GetRules(ctx context.Context, repository *graveler.RepositoryRecord) (*graveler.BranchProtectionRules, string, error)
- func (m *ProtectionManager) IsBlocked(ctx context.Context, repository *graveler.RepositoryRecord, ...) (bool, error)
- func (m *ProtectionManager) SetRules(ctx context.Context, repository *graveler.RepositoryRecord, ...) error
- func (m *ProtectionManager) SetRulesIf(ctx context.Context, repository *graveler.RepositoryRecord, ...) error
Constants ¶
View Source
const ProtectionSettingKey = "protected_branches"
Variables ¶
View Source
var (
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) Delete ¶
func (m *ProtectionManager) Delete(ctx context.Context, repository *graveler.RepositoryRecord, branchNamePattern string) error
func (*ProtectionManager) GetRules ¶
func (m *ProtectionManager) GetRules(ctx context.Context, repository *graveler.RepositoryRecord) (*graveler.BranchProtectionRules, string, error)
func (*ProtectionManager) IsBlocked ¶
func (m *ProtectionManager) IsBlocked(ctx context.Context, repository *graveler.RepositoryRecord, branchID graveler.BranchID, action graveler.BranchProtectionBlockedAction) (bool, error)
func (*ProtectionManager) SetRules ¶ added in v0.111.0
func (m *ProtectionManager) SetRules(ctx context.Context, repository *graveler.RepositoryRecord, rules *graveler.BranchProtectionRules) error
func (*ProtectionManager) SetRulesIf ¶ added in v0.111.0
func (m *ProtectionManager) SetRulesIf(ctx context.Context, repository *graveler.RepositoryRecord, rules *graveler.BranchProtectionRules, lastKnownChecksum string) error
Click to show internal directories.
Click to hide internal directories.