credentials

package
v0.0.0-...-ba6bcbb Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cleaner

type Cleaner struct {
	Client
	Logger *log.Entry
}

func (*Cleaner) CleanUnusedSecrets

func (j *Cleaner) CleanUnusedSecrets(ctx context.Context) error

func (*Cleaner) CleanUnusedSecretsForApplication

func (j *Cleaner) CleanUnusedSecretsForApplication(ctx context.Context, application aiven_nais_io_v1.AivenApplication) error

type Client

type Client interface {
	List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
	Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
	Get(ctx context.Context, key client.ObjectKey, obj client.Object, opts ...client.GetOption) error
	Scheme() *runtime.Scheme
}

type Handler

type Handler interface {
	Apply(ctx context.Context, application *aiven_nais_io_v1.AivenApplication, secret *v1.Secret, logger log.FieldLogger) error
	Cleanup(ctx context.Context, secret *v1.Secret, logger *log.Entry) error
}

type Manager

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

func NewManager

func NewManager(ctx context.Context, aiven *aiven.Client, kafkaProjects []string, mainProjectName string, logger *log.Entry, aivenv1 *aivenv1.Client) Manager

func (Manager) Cleanup

func (c Manager) Cleanup(ctx context.Context, s *v1.Secret, logger *log.Entry) error

func (Manager) CreateSecret

func (c Manager) CreateSecret(ctx context.Context, application *aiven_nais_io_v1.AivenApplication, secret *v1.Secret, logger *log.Entry) (*v1.Secret, error)

type MockClient

type MockClient struct {
	mock.Mock
}

MockClient is an autogenerated mock type for the Client type

func NewMockClient

func NewMockClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockClient

NewMockClient creates a new instance of MockClient. 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 (*MockClient) Delete

func (_m *MockClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error

Delete provides a mock function with given fields: ctx, obj, opts

func (*MockClient) EXPECT

func (_m *MockClient) EXPECT() *MockClient_Expecter

func (*MockClient) Get

func (_m *MockClient) Get(ctx context.Context, key types.NamespacedName, obj client.Object, opts ...client.GetOption) error

Get provides a mock function with given fields: ctx, key, obj, opts

func (*MockClient) List

func (_m *MockClient) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error

List provides a mock function with given fields: ctx, list, opts

func (*MockClient) Scheme

func (_m *MockClient) Scheme() *runtime.Scheme

Scheme provides a mock function with given fields:

type MockClient_Delete_Call

type MockClient_Delete_Call struct {
	*mock.Call
}

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

func (*MockClient_Delete_Call) Return

func (*MockClient_Delete_Call) Run

func (*MockClient_Delete_Call) RunAndReturn

type MockClient_Expecter

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

func (*MockClient_Expecter) Delete

func (_e *MockClient_Expecter) Delete(ctx interface{}, obj interface{}, opts ...interface{}) *MockClient_Delete_Call

Delete is a helper method to define mock.On call

  • ctx context.Context
  • obj client.Object
  • opts ...client.DeleteOption

func (*MockClient_Expecter) Get

func (_e *MockClient_Expecter) Get(ctx interface{}, key interface{}, obj interface{}, opts ...interface{}) *MockClient_Get_Call

Get is a helper method to define mock.On call

  • ctx context.Context
  • key types.NamespacedName
  • obj client.Object
  • opts ...client.GetOption

func (*MockClient_Expecter) List

func (_e *MockClient_Expecter) List(ctx interface{}, list interface{}, opts ...interface{}) *MockClient_List_Call

List is a helper method to define mock.On call

  • ctx context.Context
  • list client.ObjectList
  • opts ...client.ListOption

func (*MockClient_Expecter) Scheme

Scheme is a helper method to define mock.On call

type MockClient_Get_Call

type MockClient_Get_Call struct {
	*mock.Call
}

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

func (*MockClient_Get_Call) Return

func (*MockClient_Get_Call) Run

func (*MockClient_Get_Call) RunAndReturn

type MockClient_List_Call

type MockClient_List_Call struct {
	*mock.Call
}

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

func (*MockClient_List_Call) Return

func (*MockClient_List_Call) Run

func (*MockClient_List_Call) RunAndReturn

type MockClient_Scheme_Call

type MockClient_Scheme_Call struct {
	*mock.Call
}

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

func (*MockClient_Scheme_Call) Return

func (*MockClient_Scheme_Call) Run

func (_c *MockClient_Scheme_Call) Run(run func()) *MockClient_Scheme_Call

func (*MockClient_Scheme_Call) RunAndReturn

func (_c *MockClient_Scheme_Call) RunAndReturn(run func() *runtime.Scheme) *MockClient_Scheme_Call

type MockHandler

type MockHandler struct {
	mock.Mock
}

MockHandler is an autogenerated mock type for the Handler type

func NewMockHandler

func NewMockHandler(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockHandler

NewMockHandler creates a new instance of MockHandler. 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 (*MockHandler) Apply

func (_m *MockHandler) Apply(ctx context.Context, application *aiven_nais_io_v1.AivenApplication, secret *v1.Secret, logger logrus.FieldLogger) error

Apply provides a mock function with given fields: ctx, application, secret, logger

func (*MockHandler) Cleanup

func (_m *MockHandler) Cleanup(ctx context.Context, secret *v1.Secret, logger *logrus.Entry) error

Cleanup provides a mock function with given fields: ctx, secret, logger

func (*MockHandler) EXPECT

func (_m *MockHandler) EXPECT() *MockHandler_Expecter

type MockHandler_Apply_Call

type MockHandler_Apply_Call struct {
	*mock.Call
}

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

func (*MockHandler_Apply_Call) Return

func (*MockHandler_Apply_Call) Run

type MockHandler_Cleanup_Call

type MockHandler_Cleanup_Call struct {
	*mock.Call
}

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

func (*MockHandler_Cleanup_Call) Return

func (*MockHandler_Cleanup_Call) Run

func (_c *MockHandler_Cleanup_Call) Run(run func(ctx context.Context, secret *v1.Secret, logger *logrus.Entry)) *MockHandler_Cleanup_Call

func (*MockHandler_Cleanup_Call) RunAndReturn

type MockHandler_Expecter

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

func (*MockHandler_Expecter) Apply

func (_e *MockHandler_Expecter) Apply(ctx interface{}, application interface{}, secret interface{}, logger interface{}) *MockHandler_Apply_Call

Apply is a helper method to define mock.On call

  • ctx context.Context
  • application *aiven_nais_io_v1.AivenApplication
  • secret *v1.Secret
  • logger logrus.FieldLogger

func (*MockHandler_Expecter) Cleanup

func (_e *MockHandler_Expecter) Cleanup(ctx interface{}, secret interface{}, logger interface{}) *MockHandler_Cleanup_Call

Cleanup is a helper method to define mock.On call

  • ctx context.Context
  • secret *v1.Secret
  • logger *logrus.Entry

Jump to

Keyboard shortcuts

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