v1

package
v0.0.0-...-3266887 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 2 more Imports: 11 Imported by: 0

Documentation

Overview

Package v1 is the place where you can implements more complex business logic.

Package v1 is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockPolicySrv

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

MockPolicySrv is a mock of PolicySrv interface.

func NewMockPolicySrv

func NewMockPolicySrv(ctrl *gomock.Controller) *MockPolicySrv

NewMockPolicySrv creates a new mock instance.

func (*MockPolicySrv) Create

func (m *MockPolicySrv) Create(arg0 context.Context, arg1 *v1.Policy, arg2 v10.CreateOptions) error

Create mocks base method.

func (*MockPolicySrv) Delete

func (m *MockPolicySrv) Delete(arg0 context.Context, arg1, arg2 string, arg3 v10.DeleteOptions) error

Delete mocks base method.

func (*MockPolicySrv) DeleteCollection

func (m *MockPolicySrv) DeleteCollection(arg0 context.Context, arg1 string, arg2 []string, arg3 v10.DeleteOptions) error

DeleteCollection mocks base method.

func (*MockPolicySrv) EXPECT

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

func (*MockPolicySrv) Get

func (m *MockPolicySrv) Get(arg0 context.Context, arg1, arg2 string, arg3 v10.GetOptions) (*v1.Policy, error)

Get mocks base method.

func (*MockPolicySrv) List

func (m *MockPolicySrv) List(arg0 context.Context, arg1 string, arg2 v10.ListOptions) (*v1.PolicyList, error)

List mocks base method.

func (*MockPolicySrv) Update

func (m *MockPolicySrv) Update(arg0 context.Context, arg1 *v1.Policy, arg2 v10.UpdateOptions) error

Update mocks base method.

type MockPolicySrvMockRecorder

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

MockPolicySrvMockRecorder is the mock recorder for MockPolicySrv.

func (*MockPolicySrvMockRecorder) Create

func (mr *MockPolicySrvMockRecorder) Create(arg0, arg1, arg2 interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockPolicySrvMockRecorder) Delete

func (mr *MockPolicySrvMockRecorder) Delete(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockPolicySrvMockRecorder) DeleteCollection

func (mr *MockPolicySrvMockRecorder) DeleteCollection(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

DeleteCollection indicates an expected call of DeleteCollection.

func (*MockPolicySrvMockRecorder) Get

func (mr *MockPolicySrvMockRecorder) Get(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

Get indicates an expected call of Get.

func (*MockPolicySrvMockRecorder) List

func (mr *MockPolicySrvMockRecorder) List(arg0, arg1, arg2 interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockPolicySrvMockRecorder) Update

func (mr *MockPolicySrvMockRecorder) Update(arg0, arg1, arg2 interface{}) *gomock.Call

Update indicates an expected call of Update.

type MockSecretSrv

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

MockSecretSrv is a mock of SecretSrv interface.

func NewMockSecretSrv

func NewMockSecretSrv(ctrl *gomock.Controller) *MockSecretSrv

NewMockSecretSrv creates a new mock instance.

func (*MockSecretSrv) Create

func (m *MockSecretSrv) Create(arg0 context.Context, arg1 *v1.Secret, arg2 v10.CreateOptions) error

Create mocks base method.

func (*MockSecretSrv) Delete

func (m *MockSecretSrv) Delete(arg0 context.Context, arg1, arg2 string, arg3 v10.DeleteOptions) error

Delete mocks base method.

func (*MockSecretSrv) DeleteCollection

func (m *MockSecretSrv) DeleteCollection(arg0 context.Context, arg1 string, arg2 []string, arg3 v10.DeleteOptions) error

DeleteCollection mocks base method.

func (*MockSecretSrv) EXPECT

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

func (*MockSecretSrv) Get

func (m *MockSecretSrv) Get(arg0 context.Context, arg1, arg2 string, arg3 v10.GetOptions) (*v1.Secret, error)

Get mocks base method.

func (*MockSecretSrv) List

func (m *MockSecretSrv) List(arg0 context.Context, arg1 string, arg2 v10.ListOptions) (*v1.SecretList, error)

List mocks base method.

func (*MockSecretSrv) Update

func (m *MockSecretSrv) Update(arg0 context.Context, arg1 *v1.Secret, arg2 v10.UpdateOptions) error

Update mocks base method.

type MockSecretSrvMockRecorder

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

MockSecretSrvMockRecorder is the mock recorder for MockSecretSrv.

func (*MockSecretSrvMockRecorder) Create

func (mr *MockSecretSrvMockRecorder) Create(arg0, arg1, arg2 interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockSecretSrvMockRecorder) Delete

func (mr *MockSecretSrvMockRecorder) Delete(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockSecretSrvMockRecorder) DeleteCollection

func (mr *MockSecretSrvMockRecorder) DeleteCollection(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

DeleteCollection indicates an expected call of DeleteCollection.

func (*MockSecretSrvMockRecorder) Get

func (mr *MockSecretSrvMockRecorder) Get(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

Get indicates an expected call of Get.

func (*MockSecretSrvMockRecorder) List

func (mr *MockSecretSrvMockRecorder) List(arg0, arg1, arg2 interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockSecretSrvMockRecorder) Update

func (mr *MockSecretSrvMockRecorder) Update(arg0, arg1, arg2 interface{}) *gomock.Call

Update indicates an expected call of Update.

type MockService

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

MockService is a mock of Service interface.

func NewMockService

func NewMockService(ctrl *gomock.Controller) *MockService

NewMockService creates a new mock instance.

func (*MockService) EXPECT

func (m *MockService) EXPECT() *MockServiceMockRecorder

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

func (*MockService) Policies

func (m *MockService) Policies() PolicySrv

Policies mocks base method.

func (*MockService) Secrets

func (m *MockService) Secrets() SecretSrv

Secrets mocks base method.

func (*MockService) Users

func (m *MockService) Users() UserSrv

Users mocks base method.

type MockServiceMockRecorder

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

MockServiceMockRecorder is the mock recorder for MockService.

func (*MockServiceMockRecorder) Policies

func (mr *MockServiceMockRecorder) Policies() *gomock.Call

Policies indicates an expected call of Policies.

func (*MockServiceMockRecorder) Secrets

func (mr *MockServiceMockRecorder) Secrets() *gomock.Call

Secrets indicates an expected call of Secrets.

func (*MockServiceMockRecorder) Users

func (mr *MockServiceMockRecorder) Users() *gomock.Call

Users indicates an expected call of Users.

type MockUserSrv

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

MockUserSrv is a mock of UserSrv interface.

func NewMockUserSrv

func NewMockUserSrv(ctrl *gomock.Controller) *MockUserSrv

NewMockUserSrv creates a new mock instance.

func (*MockUserSrv) ChangePassword

func (m *MockUserSrv) ChangePassword(arg0 context.Context, arg1 *v1.User) error

ChangePassword mocks base method.

func (*MockUserSrv) Create

func (m *MockUserSrv) Create(arg0 context.Context, arg1 *v1.User, arg2 v10.CreateOptions) error

Create mocks base method.

func (*MockUserSrv) Delete

func (m *MockUserSrv) Delete(arg0 context.Context, arg1 string, arg2 v10.DeleteOptions) error

Delete mocks base method.

func (*MockUserSrv) DeleteCollection

func (m *MockUserSrv) DeleteCollection(arg0 context.Context, arg1 []string, arg2 v10.DeleteOptions) error

DeleteCollection mocks base method.

func (*MockUserSrv) EXPECT

func (m *MockUserSrv) EXPECT() *MockUserSrvMockRecorder

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

func (*MockUserSrv) Get

func (m *MockUserSrv) Get(arg0 context.Context, arg1 string, arg2 v10.GetOptions) (*v1.User, error)

Get mocks base method.

func (*MockUserSrv) List

func (m *MockUserSrv) List(arg0 context.Context, arg1 v10.ListOptions) (*v1.UserList, error)

List mocks base method.

func (*MockUserSrv) ListWithBadPerformance

func (m *MockUserSrv) ListWithBadPerformance(arg0 context.Context, arg1 v10.ListOptions) (*v1.UserList, error)

ListWithBadPerformance mocks base method.

func (*MockUserSrv) Update

func (m *MockUserSrv) Update(arg0 context.Context, arg1 *v1.User, arg2 v10.UpdateOptions) error

Update mocks base method.

type MockUserSrvMockRecorder

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

MockUserSrvMockRecorder is the mock recorder for MockUserSrv.

func (*MockUserSrvMockRecorder) ChangePassword

func (mr *MockUserSrvMockRecorder) ChangePassword(arg0, arg1 interface{}) *gomock.Call

ChangePassword indicates an expected call of ChangePassword.

func (*MockUserSrvMockRecorder) Create

func (mr *MockUserSrvMockRecorder) Create(arg0, arg1, arg2 interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockUserSrvMockRecorder) Delete

func (mr *MockUserSrvMockRecorder) Delete(arg0, arg1, arg2 interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockUserSrvMockRecorder) DeleteCollection

func (mr *MockUserSrvMockRecorder) DeleteCollection(arg0, arg1, arg2 interface{}) *gomock.Call

DeleteCollection indicates an expected call of DeleteCollection.

func (*MockUserSrvMockRecorder) Get

func (mr *MockUserSrvMockRecorder) Get(arg0, arg1, arg2 interface{}) *gomock.Call

Get indicates an expected call of Get.

func (*MockUserSrvMockRecorder) List

func (mr *MockUserSrvMockRecorder) List(arg0, arg1 interface{}) *gomock.Call

List indicates an expected call of List.

func (*MockUserSrvMockRecorder) ListWithBadPerformance

func (mr *MockUserSrvMockRecorder) ListWithBadPerformance(arg0, arg1 interface{}) *gomock.Call

ListWithBadPerformance indicates an expected call of ListWithBadPerformance.

func (*MockUserSrvMockRecorder) Update

func (mr *MockUserSrvMockRecorder) Update(arg0, arg1, arg2 interface{}) *gomock.Call

Update indicates an expected call of Update.

type PolicySrv

type PolicySrv interface {
	Create(ctx context.Context, policy *v1.Policy, opts metav1.CreateOptions) error
	Update(ctx context.Context, policy *v1.Policy, opts metav1.UpdateOptions) error
	Delete(ctx context.Context, username string, name string, opts metav1.DeleteOptions) error
	DeleteCollection(ctx context.Context, username string, names []string, opts metav1.DeleteOptions) error
	Get(ctx context.Context, username string, name string, opts metav1.GetOptions) (*v1.Policy, error)
	List(ctx context.Context, username string, opts metav1.ListOptions) (*v1.PolicyList, error)
}

PolicySrv defines functions used to handle policy request.

type SecretSrv

type SecretSrv interface {
	Create(ctx context.Context, secret *v1.Secret, opts metav1.CreateOptions) error
	Update(ctx context.Context, secret *v1.Secret, opts metav1.UpdateOptions) error
	Delete(ctx context.Context, username, secretID string, opts metav1.DeleteOptions) error
	DeleteCollection(ctx context.Context, username string, secretIDs []string, opts metav1.DeleteOptions) error
	Get(ctx context.Context, username, secretID string, opts metav1.GetOptions) (*v1.Secret, error)
	List(ctx context.Context, username string, opts metav1.ListOptions) (*v1.SecretList, error)
}

SecretSrv defines functions used to handle secret request.

type Service

type Service interface {
	Users() UserSrv
	Secrets() SecretSrv
	Policies() PolicySrv
}

Service defines functions used to return resource interface.

func NewService

func NewService(store store.Factory) Service

NewService returns Service interface.

type UserSrv

type UserSrv interface {
	Create(ctx context.Context, user *v1.User, opts metav1.CreateOptions) error
	Update(ctx context.Context, user *v1.User, opts metav1.UpdateOptions) error
	Delete(ctx context.Context, username string, opts metav1.DeleteOptions) error
	DeleteCollection(ctx context.Context, usernames []string, opts metav1.DeleteOptions) error
	Get(ctx context.Context, username string, opts metav1.GetOptions) (*v1.User, error)
	List(ctx context.Context, opts metav1.ListOptions) (*v1.UserList, error)
	ListWithBadPerformance(ctx context.Context, opts metav1.ListOptions) (*v1.UserList, error)
	ChangePassword(ctx context.Context, user *v1.User) error
}

UserSrv defines functions used to handle user request.

Jump to

Keyboard shortcuts

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