command

package
v0.26.9 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCompletion added in v0.0.31

func NewCompletion(rootCmd *cobra.Command) *cobra.Command

func NewDescribe added in v0.0.33

func NewDescribe(client *httpinternal.Client, service *string) *cobra.Command

func NewPolicy

func NewPolicy(client *http.Client, service *string, gitConfigAPI GitConfigAPI) *cobra.Command

func NewPromote

func NewPromote(client *httpinternal.Client, service *string, releaseClient ReleaseArtifact) *cobra.Command

func NewRelease

func NewRelease(client *httpinternal.Client, service *string, logger LoggerFunc, releaseClient ReleaseArtifactMultipleEnvironments) *cobra.Command

func NewRollback added in v0.0.10

func NewRollback(
	client *httpinternal.Client,
	service *string,
	logger LoggerFunc,
	selectReleaseUI SelectRollbackRelease,
	releaseClient ReleaseArtifact,
) *cobra.Command

func NewRoot added in v0.11.3

func NewRoot(version *string) (*cobra.Command, error)

NewRoot returns a new instance of a hamctl command.

func NewStatus

func NewStatus(client *httpinternal.Client, service *string) *cobra.Command

func NewVersion added in v0.11.3

func NewVersion(version string) *cobra.Command

func SelectRollbackReleaseFunc added in v0.24.0

func SelectRollbackReleaseFunc(
	environment string,
	releases []httpinternal.DescribeReleaseResponseRelease,
) (int, error)

func Time

func Time(epoch int64) time.Time

Types

type GitConfigAPI added in v0.24.0

type GitConfigAPI interface {
	CommitterDetails() (*git.CommitterDetails, error)
}

type GitConfigAPIMock added in v0.24.0

type GitConfigAPIMock struct {
	// CommitterDetailsFunc mocks the CommitterDetails method.
	CommitterDetailsFunc func() (*git.CommitterDetails, error)
	// contains filtered or unexported fields
}

GitConfigAPIMock is a mock implementation of GitConfigAPI.

func TestSomethingThatUsesGitConfigAPI(t *testing.T) {

	// make and configure a mocked GitConfigAPI
	mockedGitConfigAPI := &GitConfigAPIMock{
		CommitterDetailsFunc: func() (*git.CommitterDetails, error) {
			panic("mock out the CommitterDetails method")
		},
	}

	// use mockedGitConfigAPI in code that requires GitConfigAPI
	// and then make assertions.

}

func (*GitConfigAPIMock) CommitterDetails added in v0.24.0

func (mock *GitConfigAPIMock) CommitterDetails() (*git.CommitterDetails, error)

CommitterDetails calls CommitterDetailsFunc.

func (*GitConfigAPIMock) CommitterDetailsCalls added in v0.24.0

func (mock *GitConfigAPIMock) CommitterDetailsCalls() []struct {
}

CommitterDetailsCalls gets all the calls that were made to CommitterDetails. Check the length with:

len(mockedGitConfigAPI.CommitterDetailsCalls())

type LoggerFunc added in v0.12.0

type LoggerFunc = func(string, ...interface{})

type ReleaseArtifact added in v0.24.0

type ReleaseArtifact interface {
	ReleaseArtifactID(service, environment string, artifactID string, intent intent.Intent) (actions.ReleaseResult, error)
}

type ReleaseArtifactMultipleEnvironments added in v0.24.0

type ReleaseArtifactMultipleEnvironments interface {
	ReleaseArtifactIDMultipleEnvironments(service string, environments []string, artifactID string, intent intent.Intent) ([]actions.ReleaseResult, error)
}

type SelectRollbackRelease added in v0.24.0

type SelectRollbackRelease func(environment string, releases []httpinternal.DescribeReleaseResponseRelease) (int, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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