specials

package
v0.0.0-...-fda232b Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EventModel = &libdata.ModelDefinition{
	Name: "event",
	Fields: []libdata.Field{
		&fields.Text{Name: "aggregate", String: "Aggregate", Required: true},
		&fields.Text{Name: "aggregateUUID", String: "Aggregate UUID", Required: true},
		&fields.Text{Name: "name", String: "Name", Required: true},
		&fields.JSON{Name: "payload", String: "Payload", Required: true},
		&fields.Text{Name: "idempotencyKey", String: "Idempotency Key"},
		&fields.Boolean{Name: "published", String: "Published", Required: true},
	},
	Datetime:    true,
	CanAssignID: false,
	StoreCustomFunctions: `//InsertBuildArgs todo
		func (s *EventStore) NewEvent(
			aggregate string, aggregateUUID string, name string, payload []byte,
		) libdata.EventInterface {
			
			return &pb.Event{
				UUID: uuid.New().String(),
				Aggregate: aggregate,
				AggregateUUID: aggregateUUID,
				Name: name,
				Payload: payload,
			}
		}
		
		func (e *Event) GetName() string {
			return e.Name 
		}
		func (e *Event) GetAggregate() string {
			return e.Aggregate
		}
		func (e *Event) GetPayload() []byte {
			return e.Payload
		}`,
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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