Documentation
¶
Index ¶
- type LogsInterfaceMock
- func (mock *LogsInterfaceMock) DeleteLogs(ctx context.Context, filter models.LogFilter, opts v2.LogsDeleteLogsOptions) error
- func (mock *LogsInterfaceMock) DeleteLogsCalls() []struct{ ... }
- func (mock *LogsInterfaceMock) Flush(ctx context.Context, opts v2.LogsFlushOptions) error
- func (mock *LogsInterfaceMock) FlushCalls() []struct{ ... }
- func (mock *LogsInterfaceMock) GetLogs(ctx context.Context, params models.GetLogsParams, opts v2.LogsGetLogsOptions) (*models.GetLogsResponse, error)
- func (mock *LogsInterfaceMock) GetLogsCalls() []struct{ ... }
- func (mock *LogsInterfaceMock) Log(logs []models.LogEntry, opts v2.LogsLogOptions)
- func (mock *LogsInterfaceMock) LogCalls() []struct{ ... }
- func (mock *LogsInterfaceMock) Start(ctx context.Context, opts v2.LogsStartOptions)
- func (mock *LogsInterfaceMock) StartCalls() []struct{ ... }
- type SecretsInterfaceMock
- func (mock *SecretsInterfaceMock) CreateSecret(ctx context.Context, secret models.Secret, opts v2.SecretsCreateSecretOptions) error
- func (mock *SecretsInterfaceMock) CreateSecretCalls() []struct{ ... }
- func (mock *SecretsInterfaceMock) DeleteSecret(ctx context.Context, secretName string, secretScope string, ...) error
- func (mock *SecretsInterfaceMock) DeleteSecretCalls() []struct{ ... }
- func (mock *SecretsInterfaceMock) GetSecrets(ctx context.Context, opts v2.SecretsGetSecretsOptions) (*models.GetSecretsResponse, error)
- func (mock *SecretsInterfaceMock) GetSecretsCalls() []struct{ ... }
- func (mock *SecretsInterfaceMock) UpdateSecret(ctx context.Context, secret models.Secret, opts v2.SecretsUpdateSecretOptions) error
- func (mock *SecretsInterfaceMock) UpdateSecretCalls() []struct{ ... }
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogsInterfaceMock ¶
type LogsInterfaceMock struct {
// DeleteLogsFunc mocks the DeleteLogs method.
DeleteLogsFunc func(ctx context.Context, filter models.LogFilter, opts v2.LogsDeleteLogsOptions) error
// FlushFunc mocks the Flush method.
FlushFunc func(ctx context.Context, opts v2.LogsFlushOptions) error
// GetLogsFunc mocks the GetLogs method.
GetLogsFunc func(ctx context.Context, params models.GetLogsParams, opts v2.LogsGetLogsOptions) (*models.GetLogsResponse, error)
// LogFunc mocks the Log method.
LogFunc func(logs []models.LogEntry, opts v2.LogsLogOptions)
// StartFunc mocks the Start method.
StartFunc func(ctx context.Context, opts v2.LogsStartOptions)
// contains filtered or unexported fields
}
LogsInterfaceMock is a mock implementation of v2.LogsInterface.
func TestSomethingThatUsesLogsInterface(t *testing.T) {
// make and configure a mocked v2.LogsInterface
mockedLogsInterface := &LogsInterfaceMock{
DeleteLogsFunc: func(ctx context.Context, filter models.LogFilter, opts v2.LogsDeleteLogsOptions) error {
panic("mock out the DeleteLogs method")
},
FlushFunc: func(ctx context.Context, opts v2.LogsFlushOptions) error {
panic("mock out the Flush method")
},
GetLogsFunc: func(ctx context.Context, params models.GetLogsParams, opts v2.LogsGetLogsOptions) (*models.GetLogsResponse, error) {
panic("mock out the GetLogs method")
},
LogFunc: func(logs []models.LogEntry, opts v2.LogsLogOptions) {
panic("mock out the Log method")
},
StartFunc: func(ctx context.Context, opts v2.LogsStartOptions) {
panic("mock out the Start method")
},
}
// use mockedLogsInterface in code that requires v2.LogsInterface
// and then make assertions.
}
func (*LogsInterfaceMock) DeleteLogs ¶
func (mock *LogsInterfaceMock) DeleteLogs(ctx context.Context, filter models.LogFilter, opts v2.LogsDeleteLogsOptions) error
DeleteLogs calls DeleteLogsFunc.
func (*LogsInterfaceMock) DeleteLogsCalls ¶
func (mock *LogsInterfaceMock) DeleteLogsCalls() []struct { Ctx context.Context Filter models.LogFilter Opts v2.LogsDeleteLogsOptions }
DeleteLogsCalls gets all the calls that were made to DeleteLogs. Check the length with:
len(mockedLogsInterface.DeleteLogsCalls())
func (*LogsInterfaceMock) Flush ¶
func (mock *LogsInterfaceMock) Flush(ctx context.Context, opts v2.LogsFlushOptions) error
Flush calls FlushFunc.
func (*LogsInterfaceMock) FlushCalls ¶
func (mock *LogsInterfaceMock) FlushCalls() []struct { Ctx context.Context Opts v2.LogsFlushOptions }
FlushCalls gets all the calls that were made to Flush. Check the length with:
len(mockedLogsInterface.FlushCalls())
func (*LogsInterfaceMock) GetLogs ¶
func (mock *LogsInterfaceMock) GetLogs(ctx context.Context, params models.GetLogsParams, opts v2.LogsGetLogsOptions) (*models.GetLogsResponse, error)
GetLogs calls GetLogsFunc.
func (*LogsInterfaceMock) GetLogsCalls ¶
func (mock *LogsInterfaceMock) GetLogsCalls() []struct { Ctx context.Context Params models.GetLogsParams Opts v2.LogsGetLogsOptions }
GetLogsCalls gets all the calls that were made to GetLogs. Check the length with:
len(mockedLogsInterface.GetLogsCalls())
func (*LogsInterfaceMock) Log ¶
func (mock *LogsInterfaceMock) Log(logs []models.LogEntry, opts v2.LogsLogOptions)
Log calls LogFunc.
func (*LogsInterfaceMock) LogCalls ¶
func (mock *LogsInterfaceMock) LogCalls() []struct { Logs []models.LogEntry Opts v2.LogsLogOptions }
LogCalls gets all the calls that were made to Log. Check the length with:
len(mockedLogsInterface.LogCalls())
func (*LogsInterfaceMock) Start ¶
func (mock *LogsInterfaceMock) Start(ctx context.Context, opts v2.LogsStartOptions)
Start calls StartFunc.
func (*LogsInterfaceMock) StartCalls ¶
func (mock *LogsInterfaceMock) StartCalls() []struct { Ctx context.Context Opts v2.LogsStartOptions }
StartCalls gets all the calls that were made to Start. Check the length with:
len(mockedLogsInterface.StartCalls())
type SecretsInterfaceMock ¶
type SecretsInterfaceMock struct {
// CreateSecretFunc mocks the CreateSecret method.
CreateSecretFunc func(ctx context.Context, secret models.Secret, opts v2.SecretsCreateSecretOptions) error
// DeleteSecretFunc mocks the DeleteSecret method.
DeleteSecretFunc func(ctx context.Context, secretName string, secretScope string, opts v2.SecretsDeleteSecretOptions) error
// GetSecretsFunc mocks the GetSecrets method.
GetSecretsFunc func(ctx context.Context, opts v2.SecretsGetSecretsOptions) (*models.GetSecretsResponse, error)
// UpdateSecretFunc mocks the UpdateSecret method.
UpdateSecretFunc func(ctx context.Context, secret models.Secret, opts v2.SecretsUpdateSecretOptions) error
// contains filtered or unexported fields
}
SecretsInterfaceMock is a mock implementation of v2.SecretsInterface.
func TestSomethingThatUsesSecretsInterface(t *testing.T) {
// make and configure a mocked v2.SecretsInterface
mockedSecretsInterface := &SecretsInterfaceMock{
CreateSecretFunc: func(ctx context.Context, secret models.Secret, opts v2.SecretsCreateSecretOptions) error {
panic("mock out the CreateSecret method")
},
DeleteSecretFunc: func(ctx context.Context, secretName string, secretScope string, opts v2.SecretsDeleteSecretOptions) error {
panic("mock out the DeleteSecret method")
},
GetSecretsFunc: func(ctx context.Context, opts v2.SecretsGetSecretsOptions) (*models.GetSecretsResponse, error) {
panic("mock out the GetSecrets method")
},
UpdateSecretFunc: func(ctx context.Context, secret models.Secret, opts v2.SecretsUpdateSecretOptions) error {
panic("mock out the UpdateSecret method")
},
}
// use mockedSecretsInterface in code that requires v2.SecretsInterface
// and then make assertions.
}
func (*SecretsInterfaceMock) CreateSecret ¶
func (mock *SecretsInterfaceMock) CreateSecret(ctx context.Context, secret models.Secret, opts v2.SecretsCreateSecretOptions) error
CreateSecret calls CreateSecretFunc.
func (*SecretsInterfaceMock) CreateSecretCalls ¶
func (mock *SecretsInterfaceMock) CreateSecretCalls() []struct { Ctx context.Context Secret models.Secret Opts v2.SecretsCreateSecretOptions }
CreateSecretCalls gets all the calls that were made to CreateSecret. Check the length with:
len(mockedSecretsInterface.CreateSecretCalls())
func (*SecretsInterfaceMock) DeleteSecret ¶
func (mock *SecretsInterfaceMock) DeleteSecret(ctx context.Context, secretName string, secretScope string, opts v2.SecretsDeleteSecretOptions) error
DeleteSecret calls DeleteSecretFunc.
func (*SecretsInterfaceMock) DeleteSecretCalls ¶
func (mock *SecretsInterfaceMock) DeleteSecretCalls() []struct { Ctx context.Context SecretName string SecretScope string Opts v2.SecretsDeleteSecretOptions }
DeleteSecretCalls gets all the calls that were made to DeleteSecret. Check the length with:
len(mockedSecretsInterface.DeleteSecretCalls())
func (*SecretsInterfaceMock) GetSecrets ¶
func (mock *SecretsInterfaceMock) GetSecrets(ctx context.Context, opts v2.SecretsGetSecretsOptions) (*models.GetSecretsResponse, error)
GetSecrets calls GetSecretsFunc.
func (*SecretsInterfaceMock) GetSecretsCalls ¶
func (mock *SecretsInterfaceMock) GetSecretsCalls() []struct { Ctx context.Context Opts v2.SecretsGetSecretsOptions }
GetSecretsCalls gets all the calls that were made to GetSecrets. Check the length with:
len(mockedSecretsInterface.GetSecretsCalls())
func (*SecretsInterfaceMock) UpdateSecret ¶
func (mock *SecretsInterfaceMock) UpdateSecret(ctx context.Context, secret models.Secret, opts v2.SecretsUpdateSecretOptions) error
UpdateSecret calls UpdateSecretFunc.
func (*SecretsInterfaceMock) UpdateSecretCalls ¶
func (mock *SecretsInterfaceMock) UpdateSecretCalls() []struct { Ctx context.Context Secret models.Secret Opts v2.SecretsUpdateSecretOptions }
UpdateSecretCalls gets all the calls that were made to UpdateSecret. Check the length with:
len(mockedSecretsInterface.UpdateSecretCalls())