bumper

package
v1.1.19 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

Package bumper is a generated GoMock package.

Index

Constants

View Source
const (
	// MatchField is the index to get the first capture group, aka the field (major, minor, etc.)
	MatchField = 1
)

Variables

View Source
var ErrInvalidField = fmt.Errorf("not a valid Field, try [%s]", strings.Join(_FieldNames, ", "))

Functions

func FieldNames

func FieldNames() []string

FieldNames returns a list of possible string values of Field.

Types

type BumpOption

type BumpOption func(*bumpOptions)

func WithDryRun

func WithDryRun(dryrun bool) BumpOption

func WithField

func WithField(field Field) BumpOption

func WithMerged

func WithMerged(merged bool) BumpOption

func WithPrefix

func WithPrefix(prefix string) BumpOption

type Bumper

type Bumper interface {
	Bump(...BumpOption) error
	LatestVersion(prefix string, merged bool) (v version.Version, err error)
	Versions(prefix string, merged bool) (version.List, error)
}

func NewBumper

func NewBumper() Bumper

type DefaultBumper

type DefaultBumper struct {
	Git git.Git
}

func (*DefaultBumper) Bump

func (d *DefaultBumper) Bump(options ...BumpOption) error

func (*DefaultBumper) LatestVersion

func (d *DefaultBumper) LatestVersion(prefix string, merged bool) (v version.Version, err error)

func (*DefaultBumper) Versions

func (d *DefaultBumper) Versions(prefix string, merged bool) (version.List, error)

type Field

type Field string

Field ENUM(auto, major, minor, patch, prerelease)

const (
	// FieldAuto is a Field of type auto.
	FieldAuto Field = "auto"
	// FieldMajor is a Field of type major.
	FieldMajor Field = "major"
	// FieldMinor is a Field of type minor.
	FieldMinor Field = "minor"
	// FieldPatch is a Field of type patch.
	FieldPatch Field = "patch"
	// FieldPrerelease is a Field of type prerelease.
	FieldPrerelease Field = "prerelease"
)

func ParseField

func ParseField(name string) (Field, error)

ParseField attempts to convert a string to a Field.

func (Field) IsValid

func (x Field) IsValid() bool

IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values

func (Field) MarshalText

func (x Field) MarshalText() ([]byte, error)

MarshalText implements the text marshaller method.

func (Field) String

func (x Field) String() string

String implements the Stringer interface.

func (*Field) UnmarshalText

func (x *Field) UnmarshalText(text []byte) error

UnmarshalText implements the text unmarshaller method.

type MockBumper

type MockBumper struct {
	// contains filtered or unexported fields
}

MockBumper is a mock of Bumper interface.

func NewMockBumper

func NewMockBumper(ctrl *gomock.Controller) *MockBumper

NewMockBumper creates a new mock instance.

func (*MockBumper) Bump

func (m *MockBumper) Bump(arg0 ...BumpOption) error

Bump mocks base method.

func (*MockBumper) EXPECT

func (m *MockBumper) EXPECT() *MockBumperMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockBumper) LatestVersion added in v1.1.16

func (m *MockBumper) LatestVersion(prefix string, merged bool) (version.Version, error)

LatestVersion mocks base method.

func (*MockBumper) Versions added in v1.1.16

func (m *MockBumper) Versions(prefix string, merged bool) (version.List, error)

Versions mocks base method.

type MockBumperMockRecorder

type MockBumperMockRecorder struct {
	// contains filtered or unexported fields
}

MockBumperMockRecorder is the mock recorder for MockBumper.

func (*MockBumperMockRecorder) Bump

func (mr *MockBumperMockRecorder) Bump(arg0 ...interface{}) *gomock.Call

Bump indicates an expected call of Bump.

func (*MockBumperMockRecorder) LatestVersion added in v1.1.16

func (mr *MockBumperMockRecorder) LatestVersion(prefix, merged interface{}) *gomock.Call

LatestVersion indicates an expected call of LatestVersion.

func (*MockBumperMockRecorder) Versions added in v1.1.16

func (mr *MockBumperMockRecorder) Versions(prefix, merged interface{}) *gomock.Call

Versions indicates an expected call of Versions.

Jump to

Keyboard shortcuts

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