kvtest

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const MaxPageSize = 10

MaxPageSize is the maximum page size for pagination tests

Variables

View Source
var File_kv_kvtest_test_model_proto protoreflect.FileDescriptor

Functions

func DriverTest added in v0.97.0

func DriverTest(t *testing.T, ms MakeStore)

func GetStore added in v0.67.0

func GetStore(ctx context.Context, t testing.TB) kv.Store

GetStore helper function to return Store object for all unit tests

Types

type MakeStore added in v0.65.0

type MakeStore func(t testing.TB, ctx context.Context) kv.Store

type StoreWithCounter added in v0.106.0

type StoreWithCounter struct {
	kv.Store
	ScanCalls int64
}

func NewStoreWithCounter added in v0.106.0

func NewStoreWithCounter(store kv.Store) *StoreWithCounter

func (*StoreWithCounter) Scan added in v0.106.0

func (swc *StoreWithCounter) Scan(ctx context.Context, partitionKey []byte, options kv.ScanOptions) (kv.EntriesIterator, error)

type TestModel added in v0.65.0

type TestModel struct {
	Name        []byte                 `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	JustAString string                 `protobuf:"bytes,2,opt,name=just_a_string,json=justAString,proto3" json:"just_a_string,omitempty"`
	ADouble     float64                `protobuf:"fixed64,3,opt,name=a_double,json=aDouble,proto3" json:"a_double,omitempty"`
	TestTime    *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=test_time,json=testTime,proto3" json:"test_time,omitempty"`
	TestMap     map[string]int32       `` /* 171-byte string literal not displayed */
	TestList    []bool                 `protobuf:"varint,6,rep,packed,name=test_list,json=testList,proto3" json:"test_list,omitempty"`
	// contains filtered or unexported fields
}

func (*TestModel) Descriptor deprecated added in v0.65.0

func (*TestModel) Descriptor() ([]byte, []int)

Deprecated: Use TestModel.ProtoReflect.Descriptor instead.

func (*TestModel) GetADouble added in v0.65.0

func (x *TestModel) GetADouble() float64

func (*TestModel) GetJustAString added in v0.69.0

func (x *TestModel) GetJustAString() string

func (*TestModel) GetName added in v0.65.0

func (x *TestModel) GetName() []byte

func (*TestModel) GetTestList added in v0.65.0

func (x *TestModel) GetTestList() []bool

func (*TestModel) GetTestMap added in v0.65.0

func (x *TestModel) GetTestMap() map[string]int32

func (*TestModel) GetTestTime added in v0.65.0

func (x *TestModel) GetTestTime() *timestamppb.Timestamp

func (*TestModel) ProtoMessage added in v0.65.0

func (*TestModel) ProtoMessage()

func (*TestModel) ProtoReflect added in v0.65.0

func (x *TestModel) ProtoReflect() protoreflect.Message

func (*TestModel) Reset added in v0.65.0

func (x *TestModel) Reset()

func (*TestModel) String added in v0.65.0

func (x *TestModel) String() string

Jump to

Keyboard shortcuts

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