environment

package
v0.70.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: Apache-2.0 Imports: 6 Imported by: 3

Documentation

Overview

Code generated by MockGen. DO NOT EDIT. Source: ../pkg/environment/types.go

Generated by this command:

mockgen -source ../pkg/environment/types.go -destination ../pkg/environment/mocks.go -package=environment

Package environment is a generated GoMock package.

Index

Constants

View Source
const (
	OsPropertySourceName  = "OS_PROPERTY_SOURCE_NAME"
	CmdPropertySourceName = "CMD_PROPERTY_SOURCE_NAME" //nolint:gosec
)

Variables

This section is empty.

Functions

func AppendPropertySources added in v0.70.0

func AppendPropertySources(propertySources ...properties.PropertySource)

func GetPropertySources added in v0.70.0

func GetPropertySources() []properties.PropertySource

Types

type DefaultEnvironment

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

func NewDefaultEnvironment

func NewDefaultEnvironment(options ...DefaultEnvironmentOption) *DefaultEnvironment

func (*DefaultEnvironment) AppendPropertySources

func (environment *DefaultEnvironment) AppendPropertySources(propertySources ...feather_commons_properties.PropertySource)

func (*DefaultEnvironment) GetPropertySources

func (environment *DefaultEnvironment) GetPropertySources() []feather_commons_properties.PropertySource

func (*DefaultEnvironment) GetValue

func (environment *DefaultEnvironment) GetValue(property string) EnvVar

func (*DefaultEnvironment) GetValueOrDefault

func (environment *DefaultEnvironment) GetValueOrDefault(property string, defaultValue string) EnvVar

type DefaultEnvironmentOption

type DefaultEnvironmentOption func(environment *DefaultEnvironment)

func WithArraySource added in v0.5.2

func WithArraySource(name string, array []string) DefaultEnvironmentOption

func WithArrays added in v0.5.2

func WithArrays(osArgsArray []string, cmdArgsArray []string) DefaultEnvironmentOption

type EnvVar

type EnvVar string

func GetValue added in v0.70.0

func GetValue(property string) EnvVar

func GetValueOrDefault added in v0.70.0

func GetValueOrDefault(property string, defaultValue string) EnvVar

func NewEnvVar

func NewEnvVar(value string) EnvVar

func (EnvVar) AsInt

func (envVar EnvVar) AsInt() (int, error)

func (EnvVar) AsString

func (envVar EnvVar) AsString() string

type Environment

type Environment interface {
	GetValue(property string) EnvVar
	GetValueOrDefault(property string, defaultValue string) EnvVar
	GetPropertySources() []feather_commons_properties.PropertySource
	AppendPropertySources(propertySources ...feather_commons_properties.PropertySource)
}

func Custom added in v0.70.0

func Custom(cmdArgsArray []string) Environment

func Default added in v0.70.0

func Default() Environment

type MockEnvironment

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

MockEnvironment is a mock of Environment interface.

func NewMockEnvironment

func NewMockEnvironment(ctrl *gomock.Controller) *MockEnvironment

NewMockEnvironment creates a new mock instance.

func (*MockEnvironment) AppendPropertySources

func (m *MockEnvironment) AppendPropertySources(propertySources ...properties.PropertySource)

AppendPropertySources mocks base method.

func (*MockEnvironment) EXPECT

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

func (*MockEnvironment) GetPropertySources

func (m *MockEnvironment) GetPropertySources() []properties.PropertySource

GetPropertySources mocks base method.

func (*MockEnvironment) GetValue

func (m *MockEnvironment) GetValue(property string) EnvVar

GetValue mocks base method.

func (*MockEnvironment) GetValueOrDefault

func (m *MockEnvironment) GetValueOrDefault(property, defaultValue string) EnvVar

GetValueOrDefault mocks base method.

type MockEnvironmentMockRecorder

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

MockEnvironmentMockRecorder is the mock recorder for MockEnvironment.

func (*MockEnvironmentMockRecorder) AppendPropertySources

func (mr *MockEnvironmentMockRecorder) AppendPropertySources(propertySources ...any) *gomock.Call

AppendPropertySources indicates an expected call of AppendPropertySources.

func (*MockEnvironmentMockRecorder) GetPropertySources

func (mr *MockEnvironmentMockRecorder) GetPropertySources() *gomock.Call

GetPropertySources indicates an expected call of GetPropertySources.

func (*MockEnvironmentMockRecorder) GetValue

func (mr *MockEnvironmentMockRecorder) GetValue(property any) *gomock.Call

GetValue indicates an expected call of GetValue.

func (*MockEnvironmentMockRecorder) GetValueOrDefault

func (mr *MockEnvironmentMockRecorder) GetValueOrDefault(property, defaultValue any) *gomock.Call

GetValueOrDefault indicates an expected call of GetValueOrDefault.

Jump to

Keyboard shortcuts

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