Documentation ¶
Overview ¶
Package environment is a generated GoMock package.
Index ¶
- Constants
- func AppendPropertySources(propertySources ...properties.PropertiesSource)
- func PropertySources() []properties.PropertiesSource
- type EnvVar
- type Environment
- type MockEnvironment
- func (m *MockEnvironment) AppendPropertiesSources(propertySources ...properties.PropertiesSource)
- func (m *MockEnvironment) EXPECT() *MockEnvironmentMockRecorder
- func (m *MockEnvironment) PropertiesSources() []properties.PropertiesSource
- func (m *MockEnvironment) Value(property string) EnvVar
- func (m *MockEnvironment) ValueOrDefault(property, defaultValue string) EnvVar
- type MockEnvironmentMockRecorder
- func (mr *MockEnvironmentMockRecorder) AppendPropertiesSources(propertySources ...any) *gomock.Call
- func (mr *MockEnvironmentMockRecorder) PropertiesSources() *gomock.Call
- func (mr *MockEnvironmentMockRecorder) Value(property any) *gomock.Call
- func (mr *MockEnvironmentMockRecorder) ValueOrDefault(property, defaultValue any) *gomock.Call
- type Options
- func (options Options) WithArraySource(name string, array []string) Options
- func (options Options) WithCmd(cmdArgs []string) Options
- func (options Options) WithOs() Options
- func (options Options) WithPropertySources(propertySources ...properties.PropertiesSource) Options
- func (options Options) WithSSL() Options
- type OptionsChain
- func (options *OptionsChain) Build() Options
- func (options *OptionsChain) WithArraySource(name string, array []string) *OptionsChain
- func (options *OptionsChain) WithCmd(cmdArgs []string) *OptionsChain
- func (options *OptionsChain) WithOs() *OptionsChain
- func (options *OptionsChain) WithPropertySources(propertySources ...properties.PropertiesSource) *OptionsChain
- func (options *OptionsChain) WithSSL() *OptionsChain
Constants ¶
const ( SslPropertySourceName = "SSL_PROPERTY_SOURCE_NAME" OsPropertySourceName = "OS_PROPERTY_SOURCE_NAME" CmdPropertySourceName = "CMD_PROPERTY_SOURCE_NAME" //nolint:gosec )
const ( SslServerName = "SSL_SERVER_NAME" SslCaCertificate = "SSL_CA_CERTIFICATE" SslClientCertificate = "SSL_CLIENT_CERTIFICATE" SslClientKey = "SSL_CLIENT_KEY" )
Variables ¶
This section is empty.
Functions ¶
func AppendPropertySources ¶
func AppendPropertySources(propertySources ...properties.PropertiesSource)
func PropertySources ¶
func PropertySources() []properties.PropertiesSource
Types ¶
type Environment ¶
type Environment interface { Value(property string) EnvVar ValueOrDefault(property string, defaultValue string) EnvVar PropertiesSources() []properties.PropertiesSource AppendPropertiesSources(propertySources ...properties.PropertiesSource) }
func Load ¶
func Load(cmdArgs ...[]string) Environment
func New ¶
func New(options ...Options) 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) AppendPropertiesSources ¶
func (m *MockEnvironment) AppendPropertiesSources(propertySources ...properties.PropertiesSource)
AppendPropertiesSources mocks base method.
func (*MockEnvironment) EXPECT ¶
func (m *MockEnvironment) EXPECT() *MockEnvironmentMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockEnvironment) PropertiesSources ¶
func (m *MockEnvironment) PropertiesSources() []properties.PropertiesSource
PropertiesSources mocks base method.
func (*MockEnvironment) Value ¶
func (m *MockEnvironment) Value(property string) EnvVar
Value mocks base method.
func (*MockEnvironment) ValueOrDefault ¶
func (m *MockEnvironment) ValueOrDefault(property, defaultValue string) EnvVar
ValueOrDefault mocks base method.
type MockEnvironmentMockRecorder ¶
type MockEnvironmentMockRecorder struct {
// contains filtered or unexported fields
}
MockEnvironmentMockRecorder is the mock recorder for MockEnvironment.
func (*MockEnvironmentMockRecorder) AppendPropertiesSources ¶
func (mr *MockEnvironmentMockRecorder) AppendPropertiesSources(propertySources ...any) *gomock.Call
AppendPropertiesSources indicates an expected call of AppendPropertiesSources.
func (*MockEnvironmentMockRecorder) PropertiesSources ¶
func (mr *MockEnvironmentMockRecorder) PropertiesSources() *gomock.Call
PropertiesSources indicates an expected call of PropertiesSources.
func (*MockEnvironmentMockRecorder) Value ¶
func (mr *MockEnvironmentMockRecorder) Value(property any) *gomock.Call
Value indicates an expected call of Value.
func (*MockEnvironmentMockRecorder) ValueOrDefault ¶
func (mr *MockEnvironmentMockRecorder) ValueOrDefault(property, defaultValue any) *gomock.Call
ValueOrDefault indicates an expected call of ValueOrDefault.
type Options ¶
type Options func(environment Environment)
func NewOptions ¶
func NewOptions() Options
func (Options) WithArraySource ¶
func (Options) WithPropertySources ¶
func (options Options) WithPropertySources(propertySources ...properties.PropertiesSource) Options
type OptionsChain ¶
type OptionsChain struct {
// contains filtered or unexported fields
}
func OptionsChainBuilder ¶
func OptionsChainBuilder() *OptionsChain
func (*OptionsChain) Build ¶
func (options *OptionsChain) Build() Options
func (*OptionsChain) WithArraySource ¶
func (options *OptionsChain) WithArraySource(name string, array []string) *OptionsChain
func (*OptionsChain) WithCmd ¶
func (options *OptionsChain) WithCmd(cmdArgs []string) *OptionsChain
func (*OptionsChain) WithOs ¶
func (options *OptionsChain) WithOs() *OptionsChain
func (*OptionsChain) WithPropertySources ¶
func (options *OptionsChain) WithPropertySources(propertySources ...properties.PropertiesSource) *OptionsChain
func (*OptionsChain) WithSSL ¶
func (options *OptionsChain) WithSSL() *OptionsChain