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 ¶
- func NewCmdCreate(f *factory.Factory, runF func(*CreateOptions) error) *cobra.Command
- func NewCmdDelete(f *factory.Factory, runF func(*DeleteOptions) error) *cobra.Command
- func NewCmdList(f *factory.Factory, runF func(*ListOptions) error) *cobra.Command
- func NewCmdProtect(f *factory.Factory) *cobra.Command
- type CreateOptions
- type DeleteOptions
- type ListOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCmdCreate ¶
NewCmdCreate builds the `branch protect create` cobra command.
func NewCmdDelete ¶
NewCmdDelete builds the `branch protect delete` cobra command.
func NewCmdList ¶
NewCmdList builds the `branch protect list` cobra command.
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`.
Click to show internal directories.
Click to hide internal directories.