protect

package
v1.135.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package protect is the root of the `branch protect` subcommand tree. Branch protection is a Bitbucket Server / Data Center feature only — invocations against Cloud surface a typed ErrUnsupportedOnHost via the backend.AsBranchProtector accessor.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdCreate

func NewCmdCreate(f *factory.Factory, runF func(*CreateOptions) error) *cobra.Command

NewCmdCreate builds the `branch protect create` cobra command.

func NewCmdDelete

func NewCmdDelete(f *factory.Factory, runF func(*DeleteOptions) error) *cobra.Command

NewCmdDelete builds the `branch protect delete` cobra command.

func NewCmdList

func NewCmdList(f *factory.Factory, runF func(*ListOptions) error) *cobra.Command

NewCmdList builds the `branch protect list` cobra command.

func NewCmdProtect

func NewCmdProtect(f *factory.Factory) *cobra.Command

NewCmdProtect builds the `branch protect` command tree.

Types

type CreateOptions

type CreateOptions struct {
	Hostname string
	Type     string
	Branch   string
	Pattern  string
	Users    []string
	Groups   []string

	// Args[0] = PROJECT/REPO
	Args []string
}

CreateOptions holds parsed flags for `branch protect create`.

type DeleteOptions

type DeleteOptions struct {
	Hostname string

	// Args[0] = PROJECT/REPO, Args[1] = ID (numeric)
	Args []string
}

DeleteOptions holds parsed flags for `branch protect delete`.

type ListOptions

type ListOptions struct {
	Hostname string
	Limit    int
	Output   format.OutputConfig

	// Args[0] = PROJECT/REPO
	Args []string
}

ListOptions holds parsed flags for `branch protect list`.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL