Documentation
¶
Overview ¶
Package testapp contains a Dogma application that is used to test engine implementations.
Index ¶
- Variables
- type App
- type EventProjection
- func (h *EventProjection) CloseResource(_ context.Context, r []byte) error
- func (h *EventProjection) Configure(c dogma.ProjectionConfigurer)
- func (h *EventProjection) HandleEvent(_ context.Context, r, c, n []byte, _ dogma.ProjectionEventScope, e dogma.Event) (ok bool, err error)
- func (h *EventProjection) Range(ctx context.Context, fn func(dogma.Event) bool) error
- func (h *EventProjection) ResourceVersion(_ context.Context, r []byte) ([]byte, error)
- type IntegrationCommandA
- func (*IntegrationCommandA) Descriptor() ([]byte, []int)deprecated
- func (x *IntegrationCommandA) GetActions() []*action.Action
- func (x *IntegrationCommandA) GetIsInvalid() bool
- func (x *IntegrationCommandA) MessageDescription() string
- func (*IntegrationCommandA) ProtoMessage()
- func (x *IntegrationCommandA) ProtoReflect() protoreflect.Message
- func (x *IntegrationCommandA) Reset()
- func (x *IntegrationCommandA) SetActions(v []*action.Action)
- func (x *IntegrationCommandA) SetIsInvalid(v bool)
- func (x *IntegrationCommandA) String() string
- func (x *IntegrationCommandA) Validate() error
- type IntegrationCommandABuilder
- func (b *IntegrationCommandABuilder) Build() *IntegrationCommandA
- func (b *IntegrationCommandABuilder) From(x *IntegrationCommandA) *IntegrationCommandABuilder
- func (b *IntegrationCommandABuilder) WithActions(v []*action.Action) *IntegrationCommandABuilder
- func (b *IntegrationCommandABuilder) WithIsInvalid(v bool) *IntegrationCommandABuilder
- type IntegrationCommandB
- func (*IntegrationCommandB) Descriptor() ([]byte, []int)deprecated
- func (x *IntegrationCommandB) GetActions() []*action.Action
- func (x *IntegrationCommandB) GetIsInvalid() bool
- func (x *IntegrationCommandB) MessageDescription() string
- func (*IntegrationCommandB) ProtoMessage()
- func (x *IntegrationCommandB) ProtoReflect() protoreflect.Message
- func (x *IntegrationCommandB) Reset()
- func (x *IntegrationCommandB) SetActions(v []*action.Action)
- func (x *IntegrationCommandB) SetIsInvalid(v bool)
- func (x *IntegrationCommandB) String() string
- func (x *IntegrationCommandB) Validate() error
- type IntegrationCommandBBuilder
- func (b *IntegrationCommandBBuilder) Build() *IntegrationCommandB
- func (b *IntegrationCommandBBuilder) From(x *IntegrationCommandB) *IntegrationCommandBBuilder
- func (b *IntegrationCommandBBuilder) WithActions(v []*action.Action) *IntegrationCommandBBuilder
- func (b *IntegrationCommandBBuilder) WithIsInvalid(v bool) *IntegrationCommandBBuilder
- type IntegrationEventA
- func (*IntegrationEventA) Descriptor() ([]byte, []int)deprecated
- func (x *IntegrationEventA) GetValue() string
- func (x *IntegrationEventA) MessageDescription() string
- func (*IntegrationEventA) ProtoMessage()
- func (x *IntegrationEventA) ProtoReflect() protoreflect.Message
- func (x *IntegrationEventA) Reset()
- func (x *IntegrationEventA) SetValue(v string)
- func (x *IntegrationEventA) String() string
- func (x *IntegrationEventA) Validate() error
- type IntegrationEventABuilder
- type IntegrationEventB
- func (*IntegrationEventB) Descriptor() ([]byte, []int)deprecated
- func (x *IntegrationEventB) GetValue() string
- func (x *IntegrationEventB) MessageDescription() string
- func (*IntegrationEventB) ProtoMessage()
- func (x *IntegrationEventB) ProtoReflect() protoreflect.Message
- func (x *IntegrationEventB) Reset()
- func (x *IntegrationEventB) SetValue(v string)
- func (x *IntegrationEventB) String() string
- func (x *IntegrationEventB) Validate() error
- type IntegrationEventBBuilder
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidIntegrationMessage = errors.New("integration message is invalid")
ErrInvalidIntegrationMessage is returned by the IntegrationCommand.Validate() if the IsInvalid flag is true.
var File_github_com_dogmatiq_enginekit_enginetest_internal_testapp_integration_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
Events EventProjection
}
App is a Dogma application that is used to test the engine.
func (*App) Configure ¶
func (a *App) Configure(c dogma.ApplicationConfigurer)
Configure configures the Dogma application.
type EventProjection ¶
type EventProjection struct { dogma.NoCompactBehavior // contains filtered or unexported fields }
EventProjection tracks all events produced by the test application.
func (*EventProjection) CloseResource ¶
func (h *EventProjection) CloseResource(_ context.Context, r []byte) error
CloseResource informs the handler that the engine has no further use for a resource.
func (*EventProjection) Configure ¶
func (h *EventProjection) Configure(c dogma.ProjectionConfigurer)
Configure describes the handler's configuration to the engine.
func (*EventProjection) HandleEvent ¶
func (h *EventProjection) HandleEvent( _ context.Context, r, c, n []byte, _ dogma.ProjectionEventScope, e dogma.Event, ) (ok bool, err error)
HandleEvent updates the projection to reflect the occurrence of an event.
func (*EventProjection) Range ¶
Range calls fn for each event that the application records until fn returns false or ctx is canceled.
func (*EventProjection) ResourceVersion ¶
ResourceVersion returns the current version of a resource.
type IntegrationCommandA ¶
type IntegrationCommandA struct { IsInvalid bool `protobuf:"varint,1,opt,name=is_invalid,json=isInvalid,proto3" json:"is_invalid,omitempty"` Actions []*action.Action `protobuf:"bytes,2,rep,name=actions,proto3" json:"actions,omitempty"` // contains filtered or unexported fields }
func (*IntegrationCommandA) Descriptor
deprecated
func (*IntegrationCommandA) Descriptor() ([]byte, []int)
Deprecated: Use IntegrationCommandA.ProtoReflect.Descriptor instead.
func (*IntegrationCommandA) GetActions ¶
func (x *IntegrationCommandA) GetActions() []*action.Action
func (*IntegrationCommandA) GetIsInvalid ¶
func (x *IntegrationCommandA) GetIsInvalid() bool
func (*IntegrationCommandA) MessageDescription ¶
func (x *IntegrationCommandA) MessageDescription() string
MessageDescription returns a human-readable description of the message.
func (*IntegrationCommandA) ProtoMessage ¶
func (*IntegrationCommandA) ProtoMessage()
func (*IntegrationCommandA) ProtoReflect ¶
func (x *IntegrationCommandA) ProtoReflect() protoreflect.Message
func (*IntegrationCommandA) Reset ¶
func (x *IntegrationCommandA) Reset()
func (*IntegrationCommandA) SetActions ¶
func (x *IntegrationCommandA) SetActions(v []*action.Action)
SetActions sets the x.Actions field to v, then returns x.
func (*IntegrationCommandA) SetIsInvalid ¶
func (x *IntegrationCommandA) SetIsInvalid(v bool)
SetIsInvalid sets the x.IsInvalid field to v, then returns x.
func (*IntegrationCommandA) String ¶
func (x *IntegrationCommandA) String() string
func (*IntegrationCommandA) Validate ¶
func (x *IntegrationCommandA) Validate() error
Validate returns an error if the message is invalid.
type IntegrationCommandABuilder ¶
type IntegrationCommandABuilder struct {
// contains filtered or unexported fields
}
func NewIntegrationCommandABuilder ¶
func NewIntegrationCommandABuilder() *IntegrationCommandABuilder
NewIntegrationCommandABuilder returns a builder that constructs IntegrationCommandA messages.
func (*IntegrationCommandABuilder) Build ¶
func (b *IntegrationCommandABuilder) Build() *IntegrationCommandA
Build returns a new IntegrationCommandA containing the values configured via the builder.
Each call returns a new message, such that future changes to the builder do not modify previously constructed messages.
func (*IntegrationCommandABuilder) From ¶
func (b *IntegrationCommandABuilder) From(x *IntegrationCommandA) *IntegrationCommandABuilder
From configures the builder to use x as the prototype for new messages, then returns b.
It performs a shallow copy of x, such that any changes made via the builder do not modify x. It does not make a copy of the field values themselves.
func (*IntegrationCommandABuilder) WithActions ¶
func (b *IntegrationCommandABuilder) WithActions(v []*action.Action) *IntegrationCommandABuilder
WithActions configures the builder to set the Actions field to v, then returns b.
func (*IntegrationCommandABuilder) WithIsInvalid ¶
func (b *IntegrationCommandABuilder) WithIsInvalid(v bool) *IntegrationCommandABuilder
WithIsInvalid configures the builder to set the IsInvalid field to v, then returns b.
type IntegrationCommandB ¶
type IntegrationCommandB struct { IsInvalid bool `protobuf:"varint,1,opt,name=is_invalid,json=isInvalid,proto3" json:"is_invalid,omitempty"` Actions []*action.Action `protobuf:"bytes,2,rep,name=actions,proto3" json:"actions,omitempty"` // contains filtered or unexported fields }
func (*IntegrationCommandB) Descriptor
deprecated
func (*IntegrationCommandB) Descriptor() ([]byte, []int)
Deprecated: Use IntegrationCommandB.ProtoReflect.Descriptor instead.
func (*IntegrationCommandB) GetActions ¶
func (x *IntegrationCommandB) GetActions() []*action.Action
func (*IntegrationCommandB) GetIsInvalid ¶
func (x *IntegrationCommandB) GetIsInvalid() bool
func (*IntegrationCommandB) MessageDescription ¶
func (x *IntegrationCommandB) MessageDescription() string
MessageDescription returns a human-readable description of the message.
func (*IntegrationCommandB) ProtoMessage ¶
func (*IntegrationCommandB) ProtoMessage()
func (*IntegrationCommandB) ProtoReflect ¶
func (x *IntegrationCommandB) ProtoReflect() protoreflect.Message
func (*IntegrationCommandB) Reset ¶
func (x *IntegrationCommandB) Reset()
func (*IntegrationCommandB) SetActions ¶
func (x *IntegrationCommandB) SetActions(v []*action.Action)
SetActions sets the x.Actions field to v, then returns x.
func (*IntegrationCommandB) SetIsInvalid ¶
func (x *IntegrationCommandB) SetIsInvalid(v bool)
SetIsInvalid sets the x.IsInvalid field to v, then returns x.
func (*IntegrationCommandB) String ¶
func (x *IntegrationCommandB) String() string
func (*IntegrationCommandB) Validate ¶
func (x *IntegrationCommandB) Validate() error
Validate returns an error if the message is invalid.
type IntegrationCommandBBuilder ¶
type IntegrationCommandBBuilder struct {
// contains filtered or unexported fields
}
func NewIntegrationCommandBBuilder ¶
func NewIntegrationCommandBBuilder() *IntegrationCommandBBuilder
NewIntegrationCommandBBuilder returns a builder that constructs IntegrationCommandB messages.
func (*IntegrationCommandBBuilder) Build ¶
func (b *IntegrationCommandBBuilder) Build() *IntegrationCommandB
Build returns a new IntegrationCommandB containing the values configured via the builder.
Each call returns a new message, such that future changes to the builder do not modify previously constructed messages.
func (*IntegrationCommandBBuilder) From ¶
func (b *IntegrationCommandBBuilder) From(x *IntegrationCommandB) *IntegrationCommandBBuilder
From configures the builder to use x as the prototype for new messages, then returns b.
It performs a shallow copy of x, such that any changes made via the builder do not modify x. It does not make a copy of the field values themselves.
func (*IntegrationCommandBBuilder) WithActions ¶
func (b *IntegrationCommandBBuilder) WithActions(v []*action.Action) *IntegrationCommandBBuilder
WithActions configures the builder to set the Actions field to v, then returns b.
func (*IntegrationCommandBBuilder) WithIsInvalid ¶
func (b *IntegrationCommandBBuilder) WithIsInvalid(v bool) *IntegrationCommandBBuilder
WithIsInvalid configures the builder to set the IsInvalid field to v, then returns b.
type IntegrationEventA ¶
type IntegrationEventA struct { Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*IntegrationEventA) Descriptor
deprecated
func (*IntegrationEventA) Descriptor() ([]byte, []int)
Deprecated: Use IntegrationEventA.ProtoReflect.Descriptor instead.
func (*IntegrationEventA) GetValue ¶
func (x *IntegrationEventA) GetValue() string
func (*IntegrationEventA) MessageDescription ¶
func (x *IntegrationEventA) MessageDescription() string
MessageDescription returns a human-readable description of the message.
func (*IntegrationEventA) ProtoMessage ¶
func (*IntegrationEventA) ProtoMessage()
func (*IntegrationEventA) ProtoReflect ¶
func (x *IntegrationEventA) ProtoReflect() protoreflect.Message
func (*IntegrationEventA) Reset ¶
func (x *IntegrationEventA) Reset()
func (*IntegrationEventA) SetValue ¶
func (x *IntegrationEventA) SetValue(v string)
SetValue sets the x.Value field to v, then returns x.
func (*IntegrationEventA) String ¶
func (x *IntegrationEventA) String() string
func (*IntegrationEventA) Validate ¶
func (x *IntegrationEventA) Validate() error
Validate returns an error if the message is invalid.
type IntegrationEventABuilder ¶
type IntegrationEventABuilder struct {
// contains filtered or unexported fields
}
func NewIntegrationEventABuilder ¶
func NewIntegrationEventABuilder() *IntegrationEventABuilder
NewIntegrationEventABuilder returns a builder that constructs IntegrationEventA messages.
func (*IntegrationEventABuilder) Build ¶
func (b *IntegrationEventABuilder) Build() *IntegrationEventA
Build returns a new IntegrationEventA containing the values configured via the builder.
Each call returns a new message, such that future changes to the builder do not modify previously constructed messages.
func (*IntegrationEventABuilder) From ¶
func (b *IntegrationEventABuilder) From(x *IntegrationEventA) *IntegrationEventABuilder
From configures the builder to use x as the prototype for new messages, then returns b.
It performs a shallow copy of x, such that any changes made via the builder do not modify x. It does not make a copy of the field values themselves.
func (*IntegrationEventABuilder) WithValue ¶
func (b *IntegrationEventABuilder) WithValue(v string) *IntegrationEventABuilder
WithValue configures the builder to set the Value field to v, then returns b.
type IntegrationEventB ¶
type IntegrationEventB struct { Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*IntegrationEventB) Descriptor
deprecated
func (*IntegrationEventB) Descriptor() ([]byte, []int)
Deprecated: Use IntegrationEventB.ProtoReflect.Descriptor instead.
func (*IntegrationEventB) GetValue ¶
func (x *IntegrationEventB) GetValue() string
func (*IntegrationEventB) MessageDescription ¶
func (x *IntegrationEventB) MessageDescription() string
MessageDescription returns a human-readable description of the message.
func (*IntegrationEventB) ProtoMessage ¶
func (*IntegrationEventB) ProtoMessage()
func (*IntegrationEventB) ProtoReflect ¶
func (x *IntegrationEventB) ProtoReflect() protoreflect.Message
func (*IntegrationEventB) Reset ¶
func (x *IntegrationEventB) Reset()
func (*IntegrationEventB) SetValue ¶
func (x *IntegrationEventB) SetValue(v string)
SetValue sets the x.Value field to v, then returns x.
func (*IntegrationEventB) String ¶
func (x *IntegrationEventB) String() string
func (*IntegrationEventB) Validate ¶
func (x *IntegrationEventB) Validate() error
Validate returns an error if the message is invalid.
type IntegrationEventBBuilder ¶
type IntegrationEventBBuilder struct {
// contains filtered or unexported fields
}
func NewIntegrationEventBBuilder ¶
func NewIntegrationEventBBuilder() *IntegrationEventBBuilder
NewIntegrationEventBBuilder returns a builder that constructs IntegrationEventB messages.
func (*IntegrationEventBBuilder) Build ¶
func (b *IntegrationEventBBuilder) Build() *IntegrationEventB
Build returns a new IntegrationEventB containing the values configured via the builder.
Each call returns a new message, such that future changes to the builder do not modify previously constructed messages.
func (*IntegrationEventBBuilder) From ¶
func (b *IntegrationEventBBuilder) From(x *IntegrationEventB) *IntegrationEventBBuilder
From configures the builder to use x as the prototype for new messages, then returns b.
It performs a shallow copy of x, such that any changes made via the builder do not modify x. It does not make a copy of the field values themselves.
func (*IntegrationEventBBuilder) WithValue ¶
func (b *IntegrationEventBBuilder) WithValue(v string) *IntegrationEventBBuilder
WithValue configures the builder to set the Value field to v, then returns b.