persistence

package
v0.0.0-...-1a3fe61 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsStr

func ContainsStr(arr []string, substr string) bool

Types

type BeaconsFilePersistence

type BeaconsFilePersistence struct {
	BeaconsMemoryPersistence
	// contains filtered or unexported fields
}

func NewBeaconsFilePersistence

func NewBeaconsFilePersistence(path string) *BeaconsFilePersistence

func (*BeaconsFilePersistence) Configure

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

type BeaconsMemoryPersistence

type BeaconsMemoryPersistence struct {
	cpersist.IdentifiableMemoryPersistence[data1.BeaconV1, string]
}

func NewBeaconsMemoryPersistence

func NewBeaconsMemoryPersistence() *BeaconsMemoryPersistence

func (*BeaconsMemoryPersistence) GetOneByUdi

func (c *BeaconsMemoryPersistence) GetOneByUdi(ctx context.Context, correlationId string, udi string) (data1.BeaconV1, error)

func (*BeaconsMemoryPersistence) GetPageByFilter

func (c *BeaconsMemoryPersistence) GetPageByFilter(ctx context.Context, correlationId string,
	filter cdata.FilterParams, paging cdata.PagingParams) (cdata.DataPage[data1.BeaconV1], error)

type BeaconsMongoPersistence

type BeaconsMongoPersistence struct {
	cmongo.IdentifiableMongoDbPersistence[data1.BeaconV1, string]
}

func NewBeaconsMongoPersistence

func NewBeaconsMongoPersistence() *BeaconsMongoPersistence

func (*BeaconsMongoPersistence) GetOneByUdi

func (c *BeaconsMongoPersistence) GetOneByUdi(ctx context.Context, correlationId string, udi string) (data1.BeaconV1, error)

func (*BeaconsMongoPersistence) GetPageByFilter

func (c *BeaconsMongoPersistence) GetPageByFilter(ctx context.Context, correlationId string, filter cdata.FilterParams, paging cdata.PagingParams) (cdata.DataPage[data1.BeaconV1], error)

type BeaconsPostgresPersistence

type BeaconsPostgresPersistence struct {
	cpg.IdentifiableJsonPostgresPersistence[data1.BeaconV1, string]
}

func NewBeaconsPostgresPersistence

func NewBeaconsPostgresPersistence() *BeaconsPostgresPersistence

func (*BeaconsPostgresPersistence) DefineSchema

func (c *BeaconsPostgresPersistence) DefineSchema()

func (*BeaconsPostgresPersistence) GetOneByUdi

func (c *BeaconsPostgresPersistence) GetOneByUdi(ctx context.Context, correlationId string, udi string) (data1.BeaconV1, error)

func (*BeaconsPostgresPersistence) GetPageByFilter

func (c *BeaconsPostgresPersistence) GetPageByFilter(ctx context.Context, correlationId string, filter cdata.FilterParams, paging cdata.PagingParams) (cdata.DataPage[data1.BeaconV1], error)

type IBeaconsPersistence

type IBeaconsPersistence interface {
	GetPageByFilter(ctx context.Context, correlationId string, filter cdata.FilterParams, paging cdata.PagingParams) (cdata.DataPage[data1.BeaconV1], error)

	GetOneById(ctx context.Context, correlationId string, id string) (data1.BeaconV1, error)

	GetOneByUdi(ctx context.Context, correlationId string, udi string) (data1.BeaconV1, error)

	Create(ctx context.Context, correlationId string, item data1.BeaconV1) (data1.BeaconV1, error)

	Update(ctx context.Context, correlationId string, item data1.BeaconV1) (data1.BeaconV1, error)

	DeleteById(ctx context.Context, correlationId string, id string) (data1.BeaconV1, error)
}

Jump to

Keyboard shortcuts

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