policy

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockScheme

type MockScheme struct {
	mock.Mock
}

MockScheme is an autogenerated mock type for the Scheme type

func NewMockScheme

func NewMockScheme(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockScheme

NewMockScheme creates a new instance of MockScheme. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockScheme) Between

func (_mock *MockScheme) Between(from policy.Version, to policy.Version) policy.Bump

Between provides a mock function for the type MockScheme

func (*MockScheme) Breaking

func (_mock *MockScheme) Breaking(current policy.Version) (policy.Bump, string)

Breaking provides a mock function for the type MockScheme

func (*MockScheme) EXPECT

func (_m *MockScheme) EXPECT() *MockScheme_Expecter

func (*MockScheme) First

func (_mock *MockScheme) First() policy.Version

First provides a mock function for the type MockScheme

func (*MockScheme) Next

func (_mock *MockScheme) Next(current policy.Version, b policy.Bump) (policy.Version, error)

Next provides a mock function for the type MockScheme

func (*MockScheme) Parse

func (_mock *MockScheme) Parse(raw string) (policy.Version, bool)

Parse provides a mock function for the type MockScheme

func (*MockScheme) Read

func (_mock *MockScheme) Read(tag string) (policy.Version, bool)

Read provides a mock function for the type MockScheme

func (*MockScheme) Tag

func (_mock *MockScheme) Tag(v policy.Version) string

Tag provides a mock function for the type MockScheme

type MockScheme_Between_Call

type MockScheme_Between_Call struct {
	*mock.Call
}

MockScheme_Between_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Between'

func (*MockScheme_Between_Call) Return

func (*MockScheme_Between_Call) Run

func (*MockScheme_Between_Call) RunAndReturn

type MockScheme_Breaking_Call

type MockScheme_Breaking_Call struct {
	*mock.Call
}

MockScheme_Breaking_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Breaking'

func (*MockScheme_Breaking_Call) Return

func (*MockScheme_Breaking_Call) Run

func (*MockScheme_Breaking_Call) RunAndReturn

func (_c *MockScheme_Breaking_Call) RunAndReturn(run func(current policy.Version) (policy.Bump, string)) *MockScheme_Breaking_Call

type MockScheme_Expecter

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

func (*MockScheme_Expecter) Between

func (_e *MockScheme_Expecter) Between(from any, to any) *MockScheme_Between_Call

Between is a helper method to define mock.On call

  • from policy.Version
  • to policy.Version

func (*MockScheme_Expecter) Breaking

func (_e *MockScheme_Expecter) Breaking(current any) *MockScheme_Breaking_Call

Breaking is a helper method to define mock.On call

  • current policy.Version

func (*MockScheme_Expecter) First

First is a helper method to define mock.On call

func (*MockScheme_Expecter) Next

func (_e *MockScheme_Expecter) Next(current any, b any) *MockScheme_Next_Call

Next is a helper method to define mock.On call

  • current policy.Version
  • b policy.Bump

func (*MockScheme_Expecter) Parse

Parse is a helper method to define mock.On call

  • raw string

func (*MockScheme_Expecter) Read

Read is a helper method to define mock.On call

  • tag string

func (*MockScheme_Expecter) Tag

Tag is a helper method to define mock.On call

  • v policy.Version

type MockScheme_First_Call

type MockScheme_First_Call struct {
	*mock.Call
}

MockScheme_First_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'First'

func (*MockScheme_First_Call) Return

func (*MockScheme_First_Call) Run

func (_c *MockScheme_First_Call) Run(run func()) *MockScheme_First_Call

func (*MockScheme_First_Call) RunAndReturn

func (_c *MockScheme_First_Call) RunAndReturn(run func() policy.Version) *MockScheme_First_Call

type MockScheme_Next_Call

type MockScheme_Next_Call struct {
	*mock.Call
}

MockScheme_Next_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Next'

func (*MockScheme_Next_Call) Return

func (_c *MockScheme_Next_Call) Return(version policy.Version, err error) *MockScheme_Next_Call

func (*MockScheme_Next_Call) Run

func (_c *MockScheme_Next_Call) Run(run func(current policy.Version, b policy.Bump)) *MockScheme_Next_Call

func (*MockScheme_Next_Call) RunAndReturn

func (_c *MockScheme_Next_Call) RunAndReturn(run func(current policy.Version, b policy.Bump) (policy.Version, error)) *MockScheme_Next_Call

type MockScheme_Parse_Call

type MockScheme_Parse_Call struct {
	*mock.Call
}

MockScheme_Parse_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Parse'

func (*MockScheme_Parse_Call) Return

func (*MockScheme_Parse_Call) Run

func (_c *MockScheme_Parse_Call) Run(run func(raw string)) *MockScheme_Parse_Call

func (*MockScheme_Parse_Call) RunAndReturn

func (_c *MockScheme_Parse_Call) RunAndReturn(run func(raw string) (policy.Version, bool)) *MockScheme_Parse_Call

type MockScheme_Read_Call

type MockScheme_Read_Call struct {
	*mock.Call
}

MockScheme_Read_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Read'

func (*MockScheme_Read_Call) Return

func (*MockScheme_Read_Call) Run

func (_c *MockScheme_Read_Call) Run(run func(tag string)) *MockScheme_Read_Call

func (*MockScheme_Read_Call) RunAndReturn

func (_c *MockScheme_Read_Call) RunAndReturn(run func(tag string) (policy.Version, bool)) *MockScheme_Read_Call

type MockScheme_Tag_Call

type MockScheme_Tag_Call struct {
	*mock.Call
}

MockScheme_Tag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Tag'

func (*MockScheme_Tag_Call) Return

func (*MockScheme_Tag_Call) Run

func (_c *MockScheme_Tag_Call) Run(run func(v policy.Version)) *MockScheme_Tag_Call

func (*MockScheme_Tag_Call) RunAndReturn

func (_c *MockScheme_Tag_Call) RunAndReturn(run func(v policy.Version) string) *MockScheme_Tag_Call

type MockVersion

type MockVersion struct {
	mock.Mock
}

MockVersion is an autogenerated mock type for the Version type

func NewMockVersion

func NewMockVersion(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockVersion

NewMockVersion creates a new instance of MockVersion. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockVersion) Compare

func (_mock *MockVersion) Compare(other policy.Version) int

Compare provides a mock function for the type MockVersion

func (*MockVersion) EXPECT

func (_m *MockVersion) EXPECT() *MockVersion_Expecter

func (*MockVersion) String

func (_mock *MockVersion) String() string

String provides a mock function for the type MockVersion

type MockVersion_Compare_Call

type MockVersion_Compare_Call struct {
	*mock.Call
}

MockVersion_Compare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Compare'

func (*MockVersion_Compare_Call) Return

func (*MockVersion_Compare_Call) Run

func (*MockVersion_Compare_Call) RunAndReturn

func (_c *MockVersion_Compare_Call) RunAndReturn(run func(other policy.Version) int) *MockVersion_Compare_Call

type MockVersion_Expecter

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

func (*MockVersion_Expecter) Compare

Compare is a helper method to define mock.On call

  • other policy.Version

func (*MockVersion_Expecter) String

String is a helper method to define mock.On call

type MockVersion_String_Call

type MockVersion_String_Call struct {
	*mock.Call
}

MockVersion_String_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'String'

func (*MockVersion_String_Call) Return

func (*MockVersion_String_Call) Run

func (_c *MockVersion_String_Call) Run(run func()) *MockVersion_String_Call

func (*MockVersion_String_Call) RunAndReturn

func (_c *MockVersion_String_Call) RunAndReturn(run func() string) *MockVersion_String_Call

Jump to

Keyboard shortcuts

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