create

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: Apache-2.0 Imports: 19 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	FlagGroup                   = "group"
	FlagName                    = "name"
	FlagDescription             = "description"
	FlagLifecycle               = "lifecycle"
	FlagConfigAsCode            = "process-vcs"
	FlagGitUrl                  = "git-url"
	FlagGitBranch               = "git-branch"
	FlagGitLibraryCredentials   = "git-credentials"
	FlagGitUsername             = "git-username"
	FlagGitPassword             = "git-password"
	FlagGitCredentialStorage    = "git-credential-store"
	FlagGitInitialCommitMessage = "git-initial-commit"
	FlagGitBasePath             = "git-base-path"

	DefaultGitCommitMessage = "Initial commit of deployment process"
	DefaultBasePath         = ".octopus/"
	DefaultBranch           = "main"
	GitPersistenceType      = "VersionControlled"

	GitStorageProject = "project"
	GitStorageLibrary = "library"
)

Variables

This section is empty.

Functions

func AskProjectGroups

func AskProjectGroups(ask question.Asker, value string, getAllGroupsCallback GetAllGroupsCallback, createProjectGroupCallback CreateProjectGroupCallback) (string, cmd.Dependable, error)

func NewCmdCreate

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

func PromptForConfigAsCode

func PromptForConfigAsCode(opts *CreateOptions, getGitCredentialsCallback GetAllGitCredentialsCallback) error

func PromptMissing

func PromptMissing(opts *CreateOptions) ([]cmd.Dependable, error)

Types

type CreateFlags

type CreateFlags struct {
	Group        *flag.Flag[string]
	Name         *flag.Flag[string]
	Description  *flag.Flag[string]
	Lifecycle    *flag.Flag[string]
	ConfigAsCode *flag.Flag[bool]

	GitUrl                  *flag.Flag[string]
	GitBranch               *flag.Flag[string]
	GitCredentials          *flag.Flag[string]
	GitUsername             *flag.Flag[string]
	GitPassword             *flag.Flag[string]
	GitStorage              *flag.Flag[string]
	GitInitialCommitMessage *flag.Flag[string]
	GitBasePath             *flag.Flag[string]
}

func NewCreateFlags

func NewCreateFlags() *CreateFlags

type CreateOptions

type CreateOptions struct {
	*CreateFlags
	*cmd.Dependencies
	GetAllGroupsCallback         GetAllGroupsCallback
	CreateProjectGroupCallback   CreateProjectGroupCallback
	GetAllGitCredentialsCallback GetAllGitCredentialsCallback
}

func NewCreateOptions

func NewCreateOptions(createFlags *CreateFlags, dependencies *cmd.Dependencies) *CreateOptions

func (*CreateOptions) Commit

func (co *CreateOptions) Commit() error

func (*CreateOptions) GenerateAutomationCmd

func (co *CreateOptions) GenerateAutomationCmd()

type CreateProjectGroupCallback

type CreateProjectGroupCallback func() (string, cmd.Dependable, error)

type GetAllGitCredentialsCallback

type GetAllGitCredentialsCallback func() ([]*credentials.Resource, error)

type GetAllGroupsCallback

type GetAllGroupsCallback func() ([]*projectgroups.ProjectGroup, error)

Jump to

Keyboard shortcuts

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