storage

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllProviderNames = []ProviderName{MONGO_STORAGE}

Functions

This section is empty.

Types

type EntityProvider added in v0.11.0

type EntityProvider interface {
	SetEntity(ctx context.Context, entity *stategate.Entity) *errorz.Error
	EditEntity(ctx context.Context, entity *stategate.Entity) (*stategate.Entity, *errorz.Error)
	SearchEntities(ctx context.Context, ref *stategate.SearchEntityOpts) (*stategate.Entities, *errorz.Error)
	DelEntity(ctx context.Context, ref *stategate.EntityRef) *errorz.Error
	GetEntity(ctx context.Context, ref *stategate.EntityRef) (*stategate.Entity, *errorz.Error)
}

EntityProvider acts as a dependency injection for querying/persisting entities

type EventProvider added in v0.11.0

type EventProvider interface {
	SaveEvent(ctx context.Context, event *stategate.Event) *errorz.Error
	SearchEvents(ctx context.Context, ref *stategate.SearchEventOpts) (*stategate.Events, *errorz.Error)
	GetEvent(ctx context.Context, ref *stategate.EventRef) (*stategate.Event, *errorz.Error)
}

EventProvider acts as a dependency injection for querying/persisting events

type Provider

type Provider interface {
	EventProvider
	EntityProvider
	Close() error
}

Provider is an event & entity provider

func GetStorageProvider

func GetStorageProvider(lgger *logger.Logger, providerConfig map[string]string) (Provider, error)

type ProviderName

type ProviderName string
const (
	MONGO_STORAGE ProviderName = "mongo"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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