repository

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrEmptyRepositoryName is returned during validation if the repository
	// name is empty.
	ErrEmptyRepositoryName = errors.New("repository name must not be empty")

	// ErrEmptyRepositoryURL is returned during validation if the repository
	// URL is empty.
	ErrEmptyRepositoryURL = errors.New("repository url must not be empty")
)

Functions

func NewAddCmd

func NewAddCmd(streams cli.IOStreams) *cobra.Command

NewAddCmd creates a new command for added a skeleton repository to the kickoff config.

func NewCreateCmd

func NewCreateCmd(streams cli.IOStreams) *cobra.Command

NewCreateCmd creates a command for creating a local skeleton repository.

func NewListCmd

func NewListCmd(streams cli.IOStreams) *cobra.Command

NewListCmd creates a command for listing all configured skeleton repositories.

func NewRemoveCmd

func NewRemoveCmd(streams cli.IOStreams) *cobra.Command

NewRemoveCmd creates a command for removing skeleton repositories from the config.

Types

type AddOptions

type AddOptions struct {
	cli.IOStreams
	cmdutil.ConfigFlags

	RepoName string
	RepoURL  string
}

AddOptions holds the options for the add command.

func (*AddOptions) Complete

func (o *AddOptions) Complete(args []string) error

Complete completes the add options.

func (*AddOptions) Run

func (o *AddOptions) Run() error

Run adds a skeleton repository to the kickoff config.

func (*AddOptions) Validate

func (o *AddOptions) Validate() error

Validate validates the options before adding a new repository.

type CreateOptions

type CreateOptions struct {
	cli.IOStreams
	OutputDir    string
	SkeletonName string
	Force        bool
}

CreateOptions holds the options for the create command.

func (*CreateOptions) Complete

func (o *CreateOptions) Complete(args []string) (err error)

Complete completes the options for the create command.

func (*CreateOptions) Run

func (o *CreateOptions) Run() error

Run creates a new skeleton repository in the provided output directory and seeds it with a default skeleton.

func (*CreateOptions) Validate

func (o *CreateOptions) Validate() error

Validate validates the create options.

type ListOptions

type ListOptions struct {
	cli.IOStreams
	cmdutil.ConfigFlags
}

ListOptions holds the options for the list command.

func (*ListOptions) Run

func (o *ListOptions) Run() error

Run lists all configured skeleton repositories.

type RemoveOptions

type RemoveOptions struct {
	cli.IOStreams
	cmdutil.ConfigFlags

	RepoName string
}

RemoveOptions holds the options for the remove command.

func (*RemoveOptions) Complete

func (o *RemoveOptions) Complete(args []string) error

Complete completes the remove options.

func (*RemoveOptions) Run

func (o *RemoveOptions) Run() error

Run removes a skeleton repository from the config.

func (*RemoveOptions) Validate

func (o *RemoveOptions) Validate() error

Validate validates the remove options.

Jump to

Keyboard shortcuts

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