test_persistence

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: MIT Imports: 6 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 `bson:"_id" json:"id"`
	Key     string `bson:"key" json:"key"`
	Content string `bson:"content" json:"content"`
}

type DummyMapMongoDbPersistence

type DummyMapMongoDbPersistence struct {
	*persist.IdentifiableMongoDbPersistence[map[string]any, string]
}

func NewDummyMapMongoDbPersistence

func NewDummyMapMongoDbPersistence() *DummyMapMongoDbPersistence

func (*DummyMapMongoDbPersistence) GetCountByFilter

func (c *DummyMapMongoDbPersistence) GetCountByFilter(ctx context.Context, correlationId string, filter cdata.FilterParams) (count int64, err error)

func (*DummyMapMongoDbPersistence) GetPageByFilter

func (c *DummyMapMongoDbPersistence) GetPageByFilter(ctx context.Context, correlationId string, filter cdata.FilterParams, paging cdata.PagingParams) (page cdata.DataPage[map[string]any], 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 DummyMongoDbPersistence

type DummyMongoDbPersistence struct {
	*persist.IdentifiableMongoDbPersistence[Dummy, string]
}

func NewDummyMongoDbPersistence

func NewDummyMongoDbPersistence() *DummyMongoDbPersistence

func (*DummyMongoDbPersistence) GetCountByFilter

func (c *DummyMongoDbPersistence) GetCountByFilter(ctx context.Context, correlationId string, filter cdata.FilterParams) (count int64, err error)

func (*DummyMongoDbPersistence) GetPageByFilter

func (c *DummyMongoDbPersistence) GetPageByFilter(ctx context.Context, correlationId string,
	filter cdata.FilterParams, paging cdata.PagingParams) (page cdata.DataPage[Dummy], err error)

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 DummyRefMongoDbPersistence

type DummyRefMongoDbPersistence struct {
	*persist.IdentifiableMongoDbPersistence[*Dummy, string]
}

func NewDummyRefMongoDbPersistence

func NewDummyRefMongoDbPersistence() *DummyRefMongoDbPersistence

func (*DummyRefMongoDbPersistence) GetCountByFilter

func (c *DummyRefMongoDbPersistence) GetCountByFilter(ctx context.Context, correlationId string, filter cdata.FilterParams) (count int64, err error)

func (*DummyRefMongoDbPersistence) GetPageByFilter

func (c *DummyRefMongoDbPersistence) GetPageByFilter(ctx context.Context, correlationId string, filter cdata.FilterParams, paging cdata.PagingParams) (page cdata.DataPage[*Dummy], 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 IDummyMapPersistence

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

type IDummyPersistence

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

type IDummyRefPersistence

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

Jump to

Keyboard shortcuts

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