gendomain

package
v0.0.0-...-86e84b6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EventAggregate *eventAggregate

EventAggregate contain the definition of the event object.

*It is also used to generate the factory containing the main functions with the environnement.
View Source
var EventEntity *eventEntity
View Source
var EventShouldBe func(
	t *testing.T, ctx context.Context, client TestClientInterface, tenantID string, checkEvents bool,
	eventFrom *pb.Event,
	want *pb.Event,
) func(t *testing.T)

Functions

Types

type DummyStruct

type DummyStruct struct{}

type Event

type Event struct {
	Workflow libdomain.WorkflowInterface
	// contains filtered or unexported fields
}

Event is the main struct for operating a event object, which shall

*be used in custom code because it contains the environnement informations and
*the easy-to-use functions.

func (*Event) Action

func (t *Event) Action() string

func (*Event) Aggregate

func (t *Event) Aggregate() string

func (*Event) AggregateID

func (t *Event) AggregateID() string

func (*Event) Dispatched

func (t *Event) Dispatched() bool

func (*Event) ExternalID

func (t *Event) ExternalID() string

func (*Event) ExternalModule

func (t *Event) ExternalModule() string

func (*Event) GetID

func (t *Event) GetID() string

func (*Event) ID

func (t *Event) ID() string

SetID is a function to set the ID of the event.

func (*Event) Init

func (t *Event) Init(wk libdomain.WorkflowInterface, pb *pb.Event)

func (*Event) JSON

func (t *Event) JSON() ([]byte, error)

JSON is a function to return the event data in JSON format.

func (*Event) Map

func (t *Event) Map() map[string]interface{}

Map is a function to return the event data in JSON format.

func (*Event) Payload

func (t *Event) Payload() string

func (*Event) Pb

func (t *Event) Pb() *pb.Event

SetID is a function to set the ID of the event.

func (*Event) TenantID

func (t *Event) TenantID() string

type EventCollection

type EventCollection struct {
	//*libdomain.Collection
	// EventCollectionInterface
	Workflow libdomain.WorkflowInterface
	// contains filtered or unexported fields
}

EventCollection is the main struct for operating a list event object, which shall

*be used in custom code because it contains the environnement informations and
*the easy-to-use functions.

func (*EventCollection) Aggregate

func (*EventCollection) GetByID

func (c *EventCollection) GetByID(id string) *Event

GetByID return the event in this collection, by id.

func (*EventCollection) GetKeys

func (c *EventCollection) GetKeys() []string

GetByID return the event in this collection, by id.

func (*EventCollection) Map

func (d *EventCollection) Map() []map[string]interface{}

func (*EventCollection) Rehydrate

func (c *EventCollection) Rehydrate(pbEvents []*pb.Event)

func (*EventCollection) Slice

func (c *EventCollection) Slice() []*Event

GetSlice return all events in this collection, as a slice.

func (*EventCollection) SlicePb

func (c *EventCollection) SlicePb() []*pb.Event

GetSlice return all events in this collection, as a slice.

type EventFactory

type EventFactory struct {
	*libdomain.Factory
	EventFactoryInterface
}

EventFactory is the main struct for operating event objects, which shall

*be used in custom code because it contains the environnement informations and
*the easy-to-use functions.

func (*EventFactory) New

func (d *EventFactory) New() *Event

New return a new instance of a event object.

func (*EventFactory) NewCollection

func (d *EventFactory) NewCollection(events []*Event) *EventCollection

NewCollection return a new instance of a event collection object.

type EventFactoryInterface

type EventFactoryInterface interface {
}

type EventInternalLibrary

type EventInternalLibrary struct {
}

type PbEvent

type PbEvent = pb.Event

type TestClientInterface

type TestClientInterface interface {
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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