test_persistence

package
v0.0.1-3 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dummy

type Dummy struct {
	Id      string `json:"id"`
	Key     string `json:"key"`
	Content string `json:"content"`
}

type DummyFilePersistence

type DummyFilePersistence struct {
	DummyMemoryPersistence
	// contains filtered or unexported fields
}

func NewDummyFilePersistence

func NewDummyFilePersistence(path string) *DummyFilePersistence

func (*DummyFilePersistence) Configure

func (c *DummyFilePersistence) Configure(ctx context.Context, config *cconf.ConfigParams)

type DummyInterfacable

type DummyInterfacable struct {
	Id      string `json:"id"`
	Key     string `json:"key"`
	Content string `json:"content"`
}

func (DummyInterfacable) Clone

func (DummyInterfacable) GetId

func (d DummyInterfacable) GetId() string

func (*DummyInterfacable) SetId

func (d *DummyInterfacable) SetId(id string)

type DummyInterfacableFilePersistence

type DummyInterfacableFilePersistence struct {
	DummyInterfacableMemoryPersistence
	// contains filtered or unexported fields
}

func NewDummyInterfacableFilePersistence

func NewDummyInterfacableFilePersistence(path string) *DummyInterfacableFilePersistence

func (*DummyInterfacableFilePersistence) Configure

type DummyInterfacableMemoryPersistence

type DummyInterfacableMemoryPersistence struct {
	cpersist.IdentifiableMemoryPersistence[DummyInterfacable, string]
}

func NewDummyInterfacableMemoryPersistence

func NewDummyInterfacableMemoryPersistence() *DummyInterfacableMemoryPersistence

func (*DummyInterfacableMemoryPersistence) GetCountByFilter

func (c *DummyInterfacableMemoryPersistence) GetCountByFilter(ctx context.Context, filter cquery.FilterParams) (count int64, err error)

func (*DummyInterfacableMemoryPersistence) GetPageByFilter

type DummyInterfacablePersistenceFixture

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

func (*DummyInterfacablePersistenceFixture) TestBatchOperations

func (c *DummyInterfacablePersistenceFixture) TestBatchOperations(t *testing.T)

func (*DummyInterfacablePersistenceFixture) TestCrudOperations

func (c *DummyInterfacablePersistenceFixture) TestCrudOperations(t *testing.T)

type DummyMap

type DummyMap map[string]any

type DummyMapFilePersistence

type DummyMapFilePersistence struct {
	DummyMapMemoryPersistence
	// contains filtered or unexported fields
}

func NewDummyMapFilePersistence

func NewDummyMapFilePersistence(path string) *DummyMapFilePersistence

func (*DummyMapFilePersistence) Configure

func (c *DummyMapFilePersistence) Configure(ctx context.Context, config *cconf.ConfigParams)

type DummyMapMemoryPersistence

type DummyMapMemoryPersistence struct {
	cpersist.IdentifiableMemoryPersistence[DummyMap, string]
}

func NewDummyMapMemoryPersistence

func NewDummyMapMemoryPersistence() *DummyMapMemoryPersistence

func (*DummyMapMemoryPersistence) GetCountByFilter

func (c *DummyMapMemoryPersistence) GetCountByFilter(ctx context.Context,
	filter cquery.FilterParams) (count int64, err error)

func (*DummyMapMemoryPersistence) GetPageByFilter

func (c *DummyMapMemoryPersistence) GetPageByFilter(ctx context.Context,
	filter cquery.FilterParams, paging cquery.PagingParams) (result cquery.DataPage[DummyMap], err error)

type DummyMapPersistenceFixture

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

func NewDummyMapPersistenceFixture

func NewDummyMapPersistenceFixture(persistence IDummyMapPersistence) *DummyMapPersistenceFixture

func (*DummyMapPersistenceFixture) TestBatchOperations

func (c *DummyMapPersistenceFixture) TestBatchOperations(t *testing.T)

func (*DummyMapPersistenceFixture) TestCrudOperations

func (c *DummyMapPersistenceFixture) TestCrudOperations(t *testing.T)

type DummyMemoryPersistence

type DummyMemoryPersistence struct {
	cpersist.IdentifiableMemoryPersistence[Dummy, string]
}

func NewDummyMemoryPersistence

func NewDummyMemoryPersistence() *DummyMemoryPersistence

func (*DummyMemoryPersistence) GetCountByFilter

func (c *DummyMemoryPersistence) GetCountByFilter(ctx context.Context, filter cquery.FilterParams) (count int64, err error)

func (*DummyMemoryPersistence) GetPageByFilter

type DummyPersistenceFixture

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

func NewDummyPersistenceFixture

func NewDummyPersistenceFixture(persistence IDummyPersistence) *DummyPersistenceFixture

func (*DummyPersistenceFixture) TestBatchOperations

func (c *DummyPersistenceFixture) TestBatchOperations(t *testing.T)

func (*DummyPersistenceFixture) TestCrudOperations

func (c *DummyPersistenceFixture) TestCrudOperations(t *testing.T)

type DummyRef

type DummyRef struct {
	Id      string `json:"id"`
	Key     string `json:"key"`
	Content string `json:"content"`
}

type DummyRefFilePersistence

type DummyRefFilePersistence struct {
	DummyRefMemoryPersistence
	// contains filtered or unexported fields
}

extends DummyMemoryPersistence

func NewDummyRefFilePersistence

func NewDummyRefFilePersistence(path string) *DummyRefFilePersistence

func (*DummyRefFilePersistence) Configure

func (c *DummyRefFilePersistence) Configure(ctx context.Context, config *cconf.ConfigParams)

type DummyRefMemoryPersistence

type DummyRefMemoryPersistence struct {
	cpersist.IdentifiableMemoryPersistence[*DummyRef, string]
}

extends IdentifiableMemoryPersistence<Dummy, string> implements IDummyPersistence {

func NewDummyRefMemoryPersistence

func NewDummyRefMemoryPersistence() *DummyRefMemoryPersistence

func (*DummyRefMemoryPersistence) GetCountByFilter

func (c *DummyRefMemoryPersistence) GetCountByFilter(ctx context.Context, filter cquery.FilterParams) (count int64, err error)

func (*DummyRefMemoryPersistence) GetPageByFilter

func (c *DummyRefMemoryPersistence) GetPageByFilter(ctx context.Context, filter cquery.FilterParams, paging cquery.PagingParams) (page cquery.DataPage[*DummyRef], err error)

type DummyRefPersistenceFixture

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

func NewDummyRefPersistenceFixture

func NewDummyRefPersistenceFixture(persistence IDummyRefPersistence) *DummyRefPersistenceFixture

func (*DummyRefPersistenceFixture) TestBatchOperations

func (c *DummyRefPersistenceFixture) TestBatchOperations(t *testing.T)

func (*DummyRefPersistenceFixture) TestCrudOperations

func (c *DummyRefPersistenceFixture) TestCrudOperations(t *testing.T)

type IDummyInterfacablePersistence

type IDummyInterfacablePersistence interface {
	GetPageByFilter(ctx context.Context, filter cquery.FilterParams, paging cquery.PagingParams) (page cquery.DataPage[DummyInterfacable], err error)
	GetListByIds(ctx context.Context, ids []string) (items []DummyInterfacable, err error)
	GetOneById(ctx context.Context, id string) (item DummyInterfacable, err error)
	Create(ctx context.Context, item DummyInterfacable) (result DummyInterfacable, err error)
	Update(ctx context.Context, item DummyInterfacable) (result DummyInterfacable, err error)
	UpdatePartially(ctx context.Context, id string, data cdata.AnyValueMap) (item DummyInterfacable, err error)
	DeleteById(ctx context.Context, id string) (item DummyInterfacable, err error)
	DeleteByIds(ctx context.Context, ids []string) (err error)
	GetCountByFilter(ctx context.Context, filter cquery.FilterParams) (count int64, err error)
}

type IDummyMapPersistence

type IDummyMapPersistence interface {
	GetPageByFilter(ctx context.Context, filter cquery.FilterParams, paging cquery.PagingParams) (page cquery.DataPage[DummyMap], err error)
	GetListByIds(ctx context.Context, ids []string) (items []DummyMap, err error)
	GetOneById(ctx context.Context, id string) (item DummyMap, err error)
	Create(ctx context.Context, item DummyMap) (result DummyMap, err error)
	Update(ctx context.Context, item DummyMap) (result DummyMap, err error)
	UpdatePartially(ctx context.Context, id string, data cdata.AnyValueMap) (item DummyMap, err error)
	DeleteById(ctx context.Context, id string) (item DummyMap, err error)
	DeleteByIds(ctx context.Context, ids []string) (err error)
	GetCountByFilter(ctx context.Context, filter cquery.FilterParams) (count int64, err error)
}

type IDummyPersistence

type IDummyPersistence interface {
	GetPageByFilter(ctx context.Context, filter cquery.FilterParams, paging cquery.PagingParams) (page cquery.DataPage[Dummy], err error)
	GetListByIds(ctx context.Context, ids []string) (items []Dummy, err error)
	GetOneById(ctx context.Context, id string) (item Dummy, err error)
	Create(ctx context.Context, item Dummy) (result Dummy, err error)
	Update(ctx context.Context, item Dummy) (result Dummy, err error)
	UpdatePartially(ctx context.Context, id string, data cdata.AnyValueMap) (item Dummy, err error)
	DeleteById(ctx context.Context, id string) (item Dummy, err error)
	DeleteByIds(ctx context.Context, ids []string) (err error)
	GetCountByFilter(ctx context.Context, filter cquery.FilterParams) (count int64, err error)
}

type IDummyRefPersistence

type IDummyRefPersistence interface {
	GetPageByFilter(ctx context.Context, filter cquery.FilterParams, paging cquery.PagingParams) (page cquery.DataPage[*DummyRef], err error)
	GetListByIds(ctx context.Context, ids []string) (items []*DummyRef, err error)
	GetOneById(ctx context.Context, id string) (item *DummyRef, err error)
	Create(ctx context.Context, item *DummyRef) (result *DummyRef, err error)
	Update(ctx context.Context, item *DummyRef) (result *DummyRef, err error)
	UpdatePartially(ctx context.Context, id string, data cdata.AnyValueMap) (item *DummyRef, err error)
	DeleteById(ctx context.Context, id string) (item *DummyRef, err error)
	DeleteByIds(ctx context.Context, ids []string) (err error)
	GetCountByFilter(ctx context.Context, filter cquery.FilterParams) (count int64, err error)
}

Jump to

Keyboard shortcuts

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