store

package
v0.0.0-...-fb23aaf Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package store is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KvStore

type KvStore interface {
	Put(key string, value Stringer) error
	Get(key string) (string, error)
	Delete(key string) error
	List(offset, limit int) ([]string, error)
}

type MockKvStore

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

MockKvStore is a mock of KvStore interface.

func NewMockKvStore

func NewMockKvStore(ctrl *gomock.Controller) *MockKvStore

NewMockKvStore creates a new mock instance.

func (*MockKvStore) Delete

func (m *MockKvStore) Delete(key string) error

Delete mocks base method.

func (*MockKvStore) EXPECT

func (m *MockKvStore) EXPECT() *MockKvStoreMockRecorder

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

func (*MockKvStore) Get

func (m *MockKvStore) Get(key string) (string, error)

Get mocks base method.

func (*MockKvStore) List

func (m *MockKvStore) List(offset, limit int) ([]string, error)

List mocks base method.

func (*MockKvStore) Put

func (m *MockKvStore) Put(key string, value Stringer) error

Put mocks base method.

type MockKvStoreDeleteCall

type MockKvStoreDeleteCall struct {
	*gomock.Call
}

MockKvStoreDeleteCall wrap *gomock.Call

func (*MockKvStoreDeleteCall) Do

Do rewrite *gomock.Call.Do

func (*MockKvStoreDeleteCall) DoAndReturn

func (c *MockKvStoreDeleteCall) DoAndReturn(f func(string) error) *MockKvStoreDeleteCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockKvStoreDeleteCall) Return

Return rewrite *gomock.Call.Return

type MockKvStoreGetCall

type MockKvStoreGetCall struct {
	*gomock.Call
}

MockKvStoreGetCall wrap *gomock.Call

func (*MockKvStoreGetCall) Do

Do rewrite *gomock.Call.Do

func (*MockKvStoreGetCall) DoAndReturn

func (c *MockKvStoreGetCall) DoAndReturn(f func(string) (string, error)) *MockKvStoreGetCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockKvStoreGetCall) Return

func (c *MockKvStoreGetCall) Return(arg0 string, arg1 error) *MockKvStoreGetCall

Return rewrite *gomock.Call.Return

type MockKvStoreListCall

type MockKvStoreListCall struct {
	*gomock.Call
}

MockKvStoreListCall wrap *gomock.Call

func (*MockKvStoreListCall) Do

Do rewrite *gomock.Call.Do

func (*MockKvStoreListCall) DoAndReturn

func (c *MockKvStoreListCall) DoAndReturn(f func(int, int) ([]string, error)) *MockKvStoreListCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockKvStoreListCall) Return

func (c *MockKvStoreListCall) Return(arg0 []string, arg1 error) *MockKvStoreListCall

Return rewrite *gomock.Call.Return

type MockKvStoreMockRecorder

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

MockKvStoreMockRecorder is the mock recorder for MockKvStore.

func (*MockKvStoreMockRecorder) Delete

Delete indicates an expected call of Delete.

func (*MockKvStoreMockRecorder) Get

Get indicates an expected call of Get.

func (*MockKvStoreMockRecorder) List

func (mr *MockKvStoreMockRecorder) List(offset, limit any) *MockKvStoreListCall

List indicates an expected call of List.

func (*MockKvStoreMockRecorder) Put

func (mr *MockKvStoreMockRecorder) Put(key, value any) *MockKvStorePutCall

Put indicates an expected call of Put.

type MockKvStorePutCall

type MockKvStorePutCall struct {
	*gomock.Call
}

MockKvStorePutCall wrap *gomock.Call

func (*MockKvStorePutCall) Do

Do rewrite *gomock.Call.Do

func (*MockKvStorePutCall) DoAndReturn

func (c *MockKvStorePutCall) DoAndReturn(f func(string, Stringer) error) *MockKvStorePutCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockKvStorePutCall) Return

func (c *MockKvStorePutCall) Return(arg0 error) *MockKvStorePutCall

Return rewrite *gomock.Call.Return

type MockObjectStore

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

MockObjectStore is a mock of ObjectStore interface.

func NewMockObjectStore

func NewMockObjectStore(ctrl *gomock.Controller) *MockObjectStore

NewMockObjectStore creates a new mock instance.

func (*MockObjectStore) EXPECT

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

func (*MockObjectStore) Get

func (m *MockObjectStore) Get(key string) []byte

Get mocks base method.

func (*MockObjectStore) Put

func (m *MockObjectStore) Put(key string, value []byte)

Put mocks base method.

type MockObjectStoreGetCall

type MockObjectStoreGetCall struct {
	*gomock.Call
}

MockObjectStoreGetCall wrap *gomock.Call

func (*MockObjectStoreGetCall) Do

Do rewrite *gomock.Call.Do

func (*MockObjectStoreGetCall) DoAndReturn

func (c *MockObjectStoreGetCall) DoAndReturn(f func(string) []byte) *MockObjectStoreGetCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockObjectStoreGetCall) Return

Return rewrite *gomock.Call.Return

type MockObjectStoreMockRecorder

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

MockObjectStoreMockRecorder is the mock recorder for MockObjectStore.

func (*MockObjectStoreMockRecorder) Get

Get indicates an expected call of Get.

func (*MockObjectStoreMockRecorder) Put

Put indicates an expected call of Put.

type MockObjectStorePutCall

type MockObjectStorePutCall struct {
	*gomock.Call
}

MockObjectStorePutCall wrap *gomock.Call

func (*MockObjectStorePutCall) Do

Do rewrite *gomock.Call.Do

func (*MockObjectStorePutCall) DoAndReturn

func (c *MockObjectStorePutCall) DoAndReturn(f func(string, []byte)) *MockObjectStorePutCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockObjectStorePutCall) Return

Return rewrite *gomock.Call.Return

type MockPostStore

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

MockPostStore is a mock of PostStore interface.

func NewMockPostStore

func NewMockPostStore(ctrl *gomock.Controller) *MockPostStore

NewMockPostStore creates a new mock instance.

func (*MockPostStore) Delete

func (m *MockPostStore) Delete(ID meta.PostID) error

Delete mocks base method.

func (*MockPostStore) EXPECT

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

func (*MockPostStore) Get

func (m *MockPostStore) Get(ID meta.PostID) (*meta.Post, error)

Get mocks base method.

func (*MockPostStore) List

func (m *MockPostStore) List(offset, limit int) ([]*meta.Post, error)

List mocks base method.

func (*MockPostStore) Put

func (m *MockPostStore) Put(ID meta.PostID, post *meta.Post) error

Put mocks base method.

type MockPostStoreDeleteCall

type MockPostStoreDeleteCall struct {
	*gomock.Call
}

MockPostStoreDeleteCall wrap *gomock.Call

func (*MockPostStoreDeleteCall) Do

Do rewrite *gomock.Call.Do

func (*MockPostStoreDeleteCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockPostStoreDeleteCall) Return

Return rewrite *gomock.Call.Return

type MockPostStoreGetCall

type MockPostStoreGetCall struct {
	*gomock.Call
}

MockPostStoreGetCall wrap *gomock.Call

func (*MockPostStoreGetCall) Do

Do rewrite *gomock.Call.Do

func (*MockPostStoreGetCall) DoAndReturn

func (c *MockPostStoreGetCall) DoAndReturn(f func(meta.PostID) (*meta.Post, error)) *MockPostStoreGetCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockPostStoreGetCall) Return

func (c *MockPostStoreGetCall) Return(arg0 *meta.Post, arg1 error) *MockPostStoreGetCall

Return rewrite *gomock.Call.Return

type MockPostStoreListCall

type MockPostStoreListCall struct {
	*gomock.Call
}

MockPostStoreListCall wrap *gomock.Call

func (*MockPostStoreListCall) Do

Do rewrite *gomock.Call.Do

func (*MockPostStoreListCall) DoAndReturn

func (c *MockPostStoreListCall) DoAndReturn(f func(int, int) ([]*meta.Post, error)) *MockPostStoreListCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockPostStoreListCall) Return

func (c *MockPostStoreListCall) Return(arg0 []*meta.Post, arg1 error) *MockPostStoreListCall

Return rewrite *gomock.Call.Return

type MockPostStoreMockRecorder

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

MockPostStoreMockRecorder is the mock recorder for MockPostStore.

func (*MockPostStoreMockRecorder) Delete

Delete indicates an expected call of Delete.

func (*MockPostStoreMockRecorder) Get

Get indicates an expected call of Get.

func (*MockPostStoreMockRecorder) List

func (mr *MockPostStoreMockRecorder) List(offset, limit any) *MockPostStoreListCall

List indicates an expected call of List.

func (*MockPostStoreMockRecorder) Put

Put indicates an expected call of Put.

type MockPostStorePutCall

type MockPostStorePutCall struct {
	*gomock.Call
}

MockPostStorePutCall wrap *gomock.Call

func (*MockPostStorePutCall) Do

Do rewrite *gomock.Call.Do

func (*MockPostStorePutCall) DoAndReturn

func (c *MockPostStorePutCall) DoAndReturn(f func(meta.PostID, *meta.Post) error) *MockPostStorePutCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockPostStorePutCall) Return

Return rewrite *gomock.Call.Return

type MockStringer

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

MockStringer is a mock of Stringer interface.

func NewMockStringer

func NewMockStringer(ctrl *gomock.Controller) *MockStringer

NewMockStringer creates a new mock instance.

func (*MockStringer) EXPECT

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

func (*MockStringer) Load

func (m *MockStringer) Load(arg0 string) error

Load mocks base method.

func (*MockStringer) String

func (m *MockStringer) String() (string, error)

String mocks base method.

type MockStringerLoadCall

type MockStringerLoadCall struct {
	*gomock.Call
}

MockStringerLoadCall wrap *gomock.Call

func (*MockStringerLoadCall) Do

Do rewrite *gomock.Call.Do

func (*MockStringerLoadCall) DoAndReturn

func (c *MockStringerLoadCall) DoAndReturn(f func(string) error) *MockStringerLoadCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockStringerLoadCall) Return

Return rewrite *gomock.Call.Return

type MockStringerMockRecorder

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

MockStringerMockRecorder is the mock recorder for MockStringer.

func (*MockStringerMockRecorder) Load

Load indicates an expected call of Load.

func (*MockStringerMockRecorder) String

String indicates an expected call of String.

type MockStringerStringCall

type MockStringerStringCall struct {
	*gomock.Call
}

MockStringerStringCall wrap *gomock.Call

func (*MockStringerStringCall) Do

Do rewrite *gomock.Call.Do

func (*MockStringerStringCall) DoAndReturn

func (c *MockStringerStringCall) DoAndReturn(f func() (string, error)) *MockStringerStringCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockStringerStringCall) Return

Return rewrite *gomock.Call.Return

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) Delete

func (m *MockUserStore) Delete(ID meta.UserID) error

Delete 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(ID meta.UserID) (*meta.User, error)

Get mocks base method.

func (*MockUserStore) List

func (m *MockUserStore) List(offset, limit int) ([]*meta.User, error)

List mocks base method.

func (*MockUserStore) Put

func (m *MockUserStore) Put(ID meta.UserID, user *meta.User) error

Put mocks base method.

type MockUserStoreDeleteCall

type MockUserStoreDeleteCall struct {
	*gomock.Call
}

MockUserStoreDeleteCall wrap *gomock.Call

func (*MockUserStoreDeleteCall) Do

Do rewrite *gomock.Call.Do

func (*MockUserStoreDeleteCall) DoAndReturn

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockUserStoreDeleteCall) Return

Return rewrite *gomock.Call.Return

type MockUserStoreGetCall

type MockUserStoreGetCall struct {
	*gomock.Call
}

MockUserStoreGetCall wrap *gomock.Call

func (*MockUserStoreGetCall) Do

Do rewrite *gomock.Call.Do

func (*MockUserStoreGetCall) DoAndReturn

func (c *MockUserStoreGetCall) DoAndReturn(f func(meta.UserID) (*meta.User, error)) *MockUserStoreGetCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockUserStoreGetCall) Return

func (c *MockUserStoreGetCall) Return(arg0 *meta.User, arg1 error) *MockUserStoreGetCall

Return rewrite *gomock.Call.Return

type MockUserStoreListCall

type MockUserStoreListCall struct {
	*gomock.Call
}

MockUserStoreListCall wrap *gomock.Call

func (*MockUserStoreListCall) Do

Do rewrite *gomock.Call.Do

func (*MockUserStoreListCall) DoAndReturn

func (c *MockUserStoreListCall) DoAndReturn(f func(int, int) ([]*meta.User, error)) *MockUserStoreListCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockUserStoreListCall) Return

func (c *MockUserStoreListCall) Return(arg0 []*meta.User, arg1 error) *MockUserStoreListCall

Return rewrite *gomock.Call.Return

type MockUserStoreMockRecorder

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

MockUserStoreMockRecorder is the mock recorder for MockUserStore.

func (*MockUserStoreMockRecorder) Delete

Delete indicates an expected call of Delete.

func (*MockUserStoreMockRecorder) Get

Get indicates an expected call of Get.

func (*MockUserStoreMockRecorder) List

func (mr *MockUserStoreMockRecorder) List(offset, limit any) *MockUserStoreListCall

List indicates an expected call of List.

func (*MockUserStoreMockRecorder) Put

Put indicates an expected call of Put.

type MockUserStorePutCall

type MockUserStorePutCall struct {
	*gomock.Call
}

MockUserStorePutCall wrap *gomock.Call

func (*MockUserStorePutCall) Do

Do rewrite *gomock.Call.Do

func (*MockUserStorePutCall) DoAndReturn

func (c *MockUserStorePutCall) DoAndReturn(f func(meta.UserID, *meta.User) error) *MockUserStorePutCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockUserStorePutCall) Return

Return rewrite *gomock.Call.Return

type ObjectStore

type ObjectStore interface {
	Put(key string, value []byte)
	Get(key string) []byte
}

type PostStore

type PostStore interface {
	Put(ID meta.PostID, post *meta.Post) error
	Get(ID meta.PostID) (*meta.Post, error)
	Delete(ID meta.PostID) error
	List(offset, limit int) ([]*meta.Post, error)
}

type Stringer

type Stringer interface {
	String() (string, error)
	Load(string) error
}

type UserStore

type UserStore interface {
	Put(ID meta.UserID, user *meta.User) error
	Get(ID meta.UserID) (*meta.User, error)
	Delete(ID meta.UserID) error
	// List returns a list of users with offset and limit
	// offset is the starting index of the list
	// limit is the maximum number of users to return, 0 means no limit
	List(offset, limit int) ([]*meta.User, error)
}

func NewUserStore

func NewUserStore(kv KvStore) UserStore

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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