store

package
v0.0.0-...-395a5c9 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package store defines the storage interface for leona-apiserver.

Package store is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetClient

func SetClient(factory Factory)

SetClient set the leona store client.

Types

type Factory

type Factory interface {
	Users() UserStore
	Close() error
}

Factory defines the leona platform storage interface.

func Client

func Client() Factory

Client return the store client instance.

type MockFactory

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

MockFactory is a mock of Factory interface.

func NewMockFactory

func NewMockFactory(ctrl *gomock.Controller) *MockFactory

NewMockFactory creates a new mock instance.

func (*MockFactory) Close

func (m *MockFactory) Close() error

Close mocks base method.

func (*MockFactory) EXPECT

func (m *MockFactory) EXPECT() *MockFactoryMockRecorder

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

func (*MockFactory) Users

func (m *MockFactory) Users() UserStore

Users mocks base method.

type MockFactoryMockRecorder

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

MockFactoryMockRecorder is the mock recorder for MockFactory.

func (*MockFactoryMockRecorder) Close

func (mr *MockFactoryMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close.

func (*MockFactoryMockRecorder) Users

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

Users indicates an expected call of Users.

type MockUserStore

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

MockUserStore is a mock of UserStore interface.

func NewMockUserStore

func NewMockUserStore(ctrl *gomock.Controller) *MockUserStore

NewMockUserStore creates a new mock instance.

func (*MockUserStore) Create

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

Create mocks base method.

func (*MockUserStore) Delete

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

Delete mocks base method.

func (*MockUserStore) DeleteCollection

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

DeleteCollection mocks base method.

func (*MockUserStore) EXPECT

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

func (*MockUserStore) Get

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

Get mocks base method.

func (*MockUserStore) List

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

List mocks base method.

func (*MockUserStore) Update

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

Update mocks base method.

type MockUserStoreMockRecorder

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

MockUserStoreMockRecorder is the mock recorder for MockUserStore.

func (*MockUserStoreMockRecorder) Create

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

Create indicates an expected call of Create.

func (*MockUserStoreMockRecorder) Delete

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

Delete indicates an expected call of Delete.

func (*MockUserStoreMockRecorder) DeleteCollection

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

DeleteCollection indicates an expected call of DeleteCollection.

func (*MockUserStoreMockRecorder) Get

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

Get indicates an expected call of Get.

func (*MockUserStoreMockRecorder) List

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

List indicates an expected call of List.

func (*MockUserStoreMockRecorder) Update

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

Update indicates an expected call of Update.

type UserStore

type UserStore 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
	Get(ctx context.Context, username string, opts metav1.GetOptions) (*v1.User, error)
	List(ctx context.Context, opts metav1.ListOptions) (*v1.UserList, error)
}

UserStore defines the user storage interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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