command

package
v1.12.15-0...-edc2ec3 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	*cobra.Command

	PreRun            func(cmd Service, args []string)
	Run               func(cmd Service, args []string)
	PostRun           func(cmd Service, args []string)
	PersistentPreRun  func(cmd Service, args []string)
	PersistentRun     func(cmd Service, args []string)
	PersistentPostRun func(cmd Service, args []string)
	// contains filtered or unexported fields
}

func (*Command) Add

func (c *Command) Add(cmd Service)

func (*Command) Cmd

func (c *Command) Cmd() *cobra.Command

func (*Command) CurrentBranch

func (c *Command) CurrentBranch(ci bool) glow.Branch

func (*Command) GitClient

func (c *Command) GitClient() git.Service

func (*Command) GitProvider

func (c *Command) GitProvider() gitprovider.Service

func (*Command) Patch

func (c *Command) Patch() Service

func (*Command) PatchRun

func (c *Command) PatchRun(fieldName string, run func(cmd Service, args []string))

func (*Command) PostSetup

func (c *Command) PostSetup(parent Service) Service

func (*Command) SemverClient

func (c *Command) SemverClient() semver.Service

func (*Command) SetGitClient

func (c *Command) SetGitClient(gc git.Service)

func (*Command) SetGitProvider

func (c *Command) SetGitProvider(gp gitprovider.Service)

func (*Command) SetSemverClient

func (c *Command) SetSemverClient(s semver.Service)

func (*Command) SetupServices

func (c *Command) SetupServices(override bool) Service

type Service

type Service interface {
	Cmd() *cobra.Command
	Execute() error
	Add(Service)

	PostSetup(parent Service) Service

	SetupServices(override bool) Service
	SetGitClient(git.Service)
	GitClient() git.Service
	SetGitProvider(gitprovider.Service)
	GitProvider() gitprovider.Service
	SetSemverClient(semver.Service)
	SemverClient() semver.Service

	Patch() Service
	PatchRun(fieldName string, run func(cmd Service, args []string))

	CurrentBranch(ci bool) glow.Branch
}

func Setup

func Setup(cmd Service, parent Service) Service

Jump to

Keyboard shortcuts

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