docs: fixed some typos, formatting, grammar (#11540)

# Which Problems Are Solved

- Typos
- Punctuation
- Markdown table formatting
- ...

(A bunch of issues my editor gave)

# How the Problems Are Solved


# Additional Changes


# Additional Context
This commit is contained in:
Wim Van Laer
2026-02-13 07:45:17 +01:00
committed by GitHub
parent b0609aa861
commit 9b064d8b74
127 changed files with 764 additions and 760 deletions
+1 -1
View File
@@ -77,7 +77,7 @@ func AggregateFromWriteModelCtx(
// Aggregate is the basic implementation of Aggregater
type Aggregate struct {
// ID is the unique identitfier of this aggregate
// ID is the unique identifier of this aggregate
ID string `json:"id"`
// Type is the name of the aggregate.
Type AggregateType `json:"type"`
+2 -2
View File
@@ -24,10 +24,10 @@ type action interface {
Revision() uint16
}
// Command is the intend to store an event into the eventstore
// Command is the intent to store an event into the eventstore
type Command interface {
action
// Payload returns the payload of the event. It represent the changed fields by the event
// Payload returns the payload of the event. It represents the changed fields by the event
// valid types are:
// * nil: no payload
// * struct: which can be marshalled to json
+6 -6
View File
@@ -63,12 +63,12 @@ func (e *BaseEvent) Type() EventType {
return e.EventType
}
// Sequence is an upcounting unique number of the event
// Sequence is an increasing number unique for the event
func (e *BaseEvent) Sequence() uint64 {
return e.Seq
}
// CreationDate is the the time, the event is inserted into the eventstore
// CreationDate is the time, the event is inserted into the eventstore
func (e *BaseEvent) CreationDate() time.Time {
return e.Creation
}
@@ -83,7 +83,7 @@ func (e *BaseEvent) Aggregate() *Aggregate {
return e.Agg
}
// Data returns the payload of the event. It represent the changed fields by the event
// DataAsBytes returns the payload of the event. It represents the changed fields by the event
func (e *BaseEvent) DataAsBytes() []byte {
return e.Data
}
@@ -119,9 +119,9 @@ func BaseEventFromRepo(event Event) *BaseEvent {
}
}
// NewBaseEventForPush is the constructor for event's which will be pushed into the eventstore
// the resource owner of the aggregate is only used if it's the first event of this aggregate type
// afterwards the resource owner of the first previous events is taken
// NewBaseEventForPush is the constructor for events which will be pushed into the eventstore.
// The resource owner of the aggregate is only used if it's the first event of this aggregate type.
// Afterward, the resource owner of the first previous events is taken.
func NewBaseEventForPush(ctx context.Context, aggregate *Aggregate, typ EventType) *BaseEvent {
return &BaseEvent{
Agg: aggregate,
+1 -1
View File
@@ -512,7 +512,7 @@ func (h *Handler) lockInstance(ctx context.Context, config *triggerConfig) func(
}
// in case we want to wait for a running trigger / lock (e.g. query),
// we try to lock as long as the context is not cancelled
// we try to lock as long as the context is not canceled
select {
case instanceLock.(chan bool) <- true:
return func() {
+1 -1
View File
@@ -1,6 +1,6 @@
package repository
//Asset represents all information about a asset (img)
// Asset represents all information about an asset (img)
type Asset struct {
// ID is to refer to the asset
ID string
+3 -3
View File
@@ -48,13 +48,13 @@ type Event struct {
// it's used in read models to reduce the events in the correct definition
Version eventstore.Version
// AggregateID id is the unique identifier of the aggregate
// the client must generate it by it's own
// the client must generate it on its own
AggregateID string
// AggregateType describes the meaning of the aggregate for this event
// it could an object like user
AggregateType eventstore.AggregateType
// ResourceOwner is the organisation which owns this aggregate
// an aggregate can only be managed by one organisation
// ResourceOwner is the organization which owns this aggregate
// an aggregate can only be managed by one organization
// use the ID of the org
ResourceOwner sql.NullString
// InstanceID is the instance where this event belongs to
+1 -1
View File
@@ -101,7 +101,7 @@ func query(ctx context.Context, criteria querier, searchQuery *eventstore.Search
q.Desc = true
}
// if there is only one subquery we can optimize the query ordering by ordering by sequence
// if there is only one subquery we can optimize the query ordering by sequence
var shouldOrderBySequence bool
if len(q.SubQueries) == 1 {
for _, filter := range q.SubQueries[0] {
+1 -1
View File
@@ -245,7 +245,7 @@ func Test_mapCommands(t *testing.T) {
require.NoError(t, err)
}
}
// is used to set the the [pushPlaceholderFmt]
// is used to set the [pushPlaceholderFmt]
NewEventstore(&database.DB{Database: new(postgres.Config)})
t.Run(tt.name, func(t *testing.T) {
defer func() {
@@ -1,5 +1,5 @@
-- the query is so complex because we accidentally stored unique constraint case sensitive
-- the query checks first if there is a case sensitive match and afterwards if there is a case insensitive match
-- the query is so complex because we accidentally stored unique constraint case-sensitive
-- the query checks first if there is a case-sensitive match and afterward if there is a case-insensitive match
(instance_id = $%[1]d AND unique_type = $%[2]d AND unique_field = (
SELECT unique_field from (
SELECT instance_id, unique_type, unique_field