mock

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

type CLI struct {
	MockConfirmation func() (bool, error)

	ConfirmationCalls int
	// contains filtered or unexported fields
}

CLI is a mock implementation.

func (*CLI) Confirmation

func (c *CLI) Confirmation(actionText, cancellationMessage, successMessage string) (bool, error)

Confirmation is a mock implementation.

func (*CLI) Input

func (c *CLI) Input() (string, error)

Input is a mock implementation.

func (*CLI) PrintColorizedLine

func (c *CLI) PrintColorizedLine(title, content string, level ergo.MessageLevel)

PrintColorizedLine is a mock implementation.

func (*CLI) PrintLine

func (c *CLI) PrintLine(content ...interface{})

PrintLine is a mock implementation.

func (*CLI) PrintTable

func (c *CLI) PrintTable(header []string, values [][]string)

PrintTable is a mock implementation.

type RepositoryClient

type RepositoryClient struct {
	MockCreateDraftReleaseFn  func() error
	MockLastReleaseFn         func() (*ergo.Release, error)
	MockEditReleaseFn         func() (*ergo.Release, error)
	MockCompareBranchFn       func() (*ergo.StatusReport, error)
	MockDiffCommitsFn         func() ([]*ergo.StatusReport, error)
	MockCreateTagFn           func() (*ergo.Tag, error)
	MockUpdateBranchFromTagFn func() error
	MockGetRefFn              func() (*ergo.Reference, error)
	MockGetRefFromTagFn       func() (*ergo.Reference, error)
	MockGetRepoNameFn         func() string
}

RepositoryClient is a mock implementation.

func (*RepositoryClient) CompareBranch

func (r *RepositoryClient) CompareBranch(ctx context.Context, baseBranch, branch string) (*ergo.StatusReport, error)

CompareBranch is a mock implementation.

func (*RepositoryClient) CreateDraftRelease

func (r *RepositoryClient) CreateDraftRelease(ctx context.Context, name, tagName, releaseBody, targetBranch string) error

CreateDraftRelease is a mock implementation.

func (*RepositoryClient) CreateTag

func (r *RepositoryClient) CreateTag(ctx context.Context, versionName, sha, m string) (*ergo.Tag, error)

CreateTag is a mock implementation.

func (*RepositoryClient) DiffCommits

func (r *RepositoryClient) DiffCommits(ctx context.Context, releaseBranches []string, baseBranch string) ([]*ergo.StatusReport, error)

DiffCommits is a mock implementation.

func (*RepositoryClient) EditRelease

func (r *RepositoryClient) EditRelease(ctx context.Context, release *ergo.Release) (*ergo.Release, error)

EditRelease is a mock implementation.

func (*RepositoryClient) GetRef

func (r *RepositoryClient) GetRef(ctx context.Context, branch string) (*ergo.Reference, error)

GetRef is a mock implementation.

func (*RepositoryClient) GetRefFromTag

func (r *RepositoryClient) GetRefFromTag(ctx context.Context, tag string) (*ergo.Reference, error)

GetRefFromTag is a mock implementation.

func (*RepositoryClient) GetRepoName

func (r *RepositoryClient) GetRepoName() string

GetRepoName is a mock implementation.

func (*RepositoryClient) LastRelease

func (r *RepositoryClient) LastRelease(ctx context.Context) (*ergo.Release, error)

LastRelease is a mock implementation.

func (*RepositoryClient) UpdateBranchFromTag

func (r *RepositoryClient) UpdateBranchFromTag(ctx context.Context, tag, toBranch string, force bool) error

UpdateBranchFromTag is a mock implementation.

Jump to

Keyboard shortcuts

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