namespaced

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package namespaced is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cache cache.Cache[*any.Any], namespace string) *namespacedBiz

New creates a new namespacedBiz instance with the specified cache and namespace.

Types

type MockNamespacedBiz

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

MockNamespacedBiz is a mock of NamespacedBiz interface.

func NewMockNamespacedBiz

func NewMockNamespacedBiz(ctrl *gomock.Controller) *MockNamespacedBiz

NewMockNamespacedBiz creates a new mock instance.

func (*MockNamespacedBiz) Del

func (m *MockNamespacedBiz) Del(arg0 context.Context, arg1 string) error

Del mocks base method.

func (*MockNamespacedBiz) EXPECT

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

func (*MockNamespacedBiz) Get

func (m *MockNamespacedBiz) Get(arg0 context.Context, arg1 string) (*v1.GetResponse, error)

Get mocks base method.

func (*MockNamespacedBiz) Set

func (m *MockNamespacedBiz) Set(arg0 context.Context, arg1 string, arg2 *anypb.Any, arg3 *durationpb.Duration) error

Set mocks base method.

type MockNamespacedBizMockRecorder

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

MockNamespacedBizMockRecorder is the mock recorder for MockNamespacedBiz.

func (*MockNamespacedBizMockRecorder) Del

func (mr *MockNamespacedBizMockRecorder) Del(arg0, arg1 interface{}) *gomock.Call

Del indicates an expected call of Del.

func (*MockNamespacedBizMockRecorder) Get

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

Get indicates an expected call of Get.

func (*MockNamespacedBizMockRecorder) Set

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

Set indicates an expected call of Set.

type NamespacedBiz

type NamespacedBiz interface {
	Set(ctx context.Context, key string, value *any.Any, ttl *durationpb.Duration) error
	Get(ctx context.Context, key string) (*v1.GetResponse, error)
	Del(ctx context.Context, key string) error
}

NamespacedBiz defines the methods that need to be implemented for namespaced cache operations.

type NamespacedKey

type NamespacedKey struct {
	Namespace string
	Key       string
}

NamespacedKey represents a key with a namespace.

func (NamespacedKey) CacheKey

func (k NamespacedKey) CacheKey() string

CacheKey returns the cache key for the NamespacedKey.

Jump to

Keyboard shortcuts

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