version

package
v1.287.0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package version provides build informations about the OMS version.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Build

type Build struct{}

Build implements Version using the values injected at release time.

func (*Build) Arch

func (b *Build) Arch() string

Arch returns the architecture the binary was built for.

func (*Build) BinName

func (b *Build) BinName() string

BinName returns the name of the binary.

func (*Build) BuildDate

func (b *Build) BuildDate() string

BuildDate returns the date the binary was built.

func (*Build) Commit

func (b *Build) Commit() string

Commit returns the git commit the binary was built from.

func (*Build) Os

func (b *Build) Os() string

Os returns the operating system the binary was built for.

func (*Build) Version

func (b *Build) Version() string

Version returns the released version of the binary.

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) Arch

func (_mock *MockVersion) Arch() string

Arch provides a mock function for the type MockVersion

func (*MockVersion) BuildDate

func (_mock *MockVersion) BuildDate() string

BuildDate provides a mock function for the type MockVersion

func (*MockVersion) Commit

func (_mock *MockVersion) Commit() string

Commit provides a mock function for the type MockVersion

func (*MockVersion) EXPECT

func (_m *MockVersion) EXPECT() *MockVersion_Expecter

func (*MockVersion) Os

func (_mock *MockVersion) Os() string

Os provides a mock function for the type MockVersion

func (*MockVersion) Version

func (_mock *MockVersion) Version() string

Version provides a mock function for the type MockVersion

type MockVersion_Arch_Call

type MockVersion_Arch_Call struct {
	*mock.Call
}

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

func (*MockVersion_Arch_Call) Return

func (*MockVersion_Arch_Call) Run

func (_c *MockVersion_Arch_Call) Run(run func()) *MockVersion_Arch_Call

func (*MockVersion_Arch_Call) RunAndReturn

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

type MockVersion_BuildDate_Call

type MockVersion_BuildDate_Call struct {
	*mock.Call
}

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

func (*MockVersion_BuildDate_Call) Return

func (*MockVersion_BuildDate_Call) Run

func (*MockVersion_BuildDate_Call) RunAndReturn

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

type MockVersion_Commit_Call

type MockVersion_Commit_Call struct {
	*mock.Call
}

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

func (*MockVersion_Commit_Call) Return

func (*MockVersion_Commit_Call) Run

func (_c *MockVersion_Commit_Call) Run(run func()) *MockVersion_Commit_Call

func (*MockVersion_Commit_Call) RunAndReturn

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

type MockVersion_Expecter

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

func (*MockVersion_Expecter) Arch

Arch is a helper method to define mock.On call

func (*MockVersion_Expecter) BuildDate

BuildDate is a helper method to define mock.On call

func (*MockVersion_Expecter) Commit

Commit is a helper method to define mock.On call

func (*MockVersion_Expecter) Os

Os is a helper method to define mock.On call

func (*MockVersion_Expecter) Version

Version is a helper method to define mock.On call

type MockVersion_Os_Call

type MockVersion_Os_Call struct {
	*mock.Call
}

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

func (*MockVersion_Os_Call) Return

func (*MockVersion_Os_Call) Run

func (_c *MockVersion_Os_Call) Run(run func()) *MockVersion_Os_Call

func (*MockVersion_Os_Call) RunAndReturn

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

type MockVersion_Version_Call

type MockVersion_Version_Call struct {
	*mock.Call
}

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

func (*MockVersion_Version_Call) Return

func (*MockVersion_Version_Call) Run

func (*MockVersion_Version_Call) RunAndReturn

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

type Version

type Version interface {
	Version() string
	Commit() string
	BuildDate() string
	Os() string
	Arch() string
}

Version provides access to the build information of the binary.

Jump to

Keyboard shortcuts

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