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
+4 -4
View File
@@ -239,16 +239,16 @@ func (a *API) HandleFunc(path string, f http.HandlerFunc) {
a.router.HandleFunc(path, f)
}
// RegisterHandlerOnPrefix registers a http handler on a path prefix
// the prefix will not be passed to the actual handler
// RegisterHandlerOnPrefix registers an http handler on a path prefix.
// The prefix will not be passed to the actual handler.
func (a *API) RegisterHandlerOnPrefix(prefix string, handler http.Handler) {
prefix = strings.TrimSuffix(prefix, "/")
subRouter := a.router.PathPrefix(prefix).Name(prefix).Subrouter()
subRouter.PathPrefix("").Handler(http.StripPrefix(prefix, handler))
}
// RegisterHandlerPrefixes registers a http handler on a multiple path prefixes
// the prefix will remain when calling the actual handler
// RegisterHandlerPrefixes registers an http handler on multiple path prefixes.
// The prefix will remain when calling the actual handler.
func (a *API) RegisterHandlerPrefixes(handler http.Handler, prefixes ...string) {
for _, prefix := range prefixes {
prefix = strings.TrimSuffix(prefix, "/")
+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
+1 -1
View File
@@ -25,7 +25,7 @@ type Worker struct {
}
// Timeout implements the Timeout-function of [river.Worker].
// Maximum time a job can run before the context gets cancelled.
// Maximum time a job can run before the context gets canceled.
// The time can be shorter than the sum of target timeouts, this is expected behavior to not block the request indefinitely.
func (w *Worker) Timeout(*river.Job[*exec_repo.Request]) time.Duration {
return w.config.TransactionDuration
+2 -2
View File
@@ -48,7 +48,7 @@ type ResourceListDetailsMsg interface {
// It targets API v2 messages that have the `GetDetails()` method.
//
// Dynamically generated values are not compared with expected.
// Instead a sanity check is performed.
// Instead, a sanity check is performed.
// For the sequence a non-zero value is expected.
// If the change date is populated, it is checked with a tolerance of 1 minute around Now.
//
@@ -149,7 +149,7 @@ func AssertGrpcStatus(t assert.TestingT, expected codes.Code, err error) {
//
// As [assert.Equal] is based on reflection, comparing 2 proto messages sometimes fails,
// due to their internal state.
// Expected messages are usually with a vanilla state, eg only exported fields contain data.
// Expected messages are usually with a vanilla state, e.g. only exported fields contain data.
// Actual messages obtained from the gRPC client had unexported fields with data.
// This makes them hard to compare.
func EqualProto(t testing.TB, expected, actual proto.Message) bool {
+1 -1
View File
@@ -28,7 +28,7 @@ var (
loadedConfig Config
)
// TmpDir returns the absolute path to the projects's temp directory.
// TmpDir returns the absolute path to the project's temp directory.
func TmpDir() string {
return tmpDir
}
+1 -1
View File
@@ -35,7 +35,7 @@ type Subscription struct {
// handler, after Subscribe has returned.
// Multiple subscription may be active on a single channel.
// Each request is always forwarded to each Subscription.
// Close must be called to cleanup up the Subscription's channel and go routine.
// Close must be called to clean up the Subscription's channel and go routine.
func Subscribe(ctx context.Context, ch Channel) *Subscription {
u := url.URL{
Scheme: "ws",
+1 -1
View File
@@ -25,7 +25,7 @@ type debouncer[T LogRecord[T]] struct {
// However, debouncer starts a go routine that triggers side effects itself.
// So, there is no incoming context.Context available when these events trigger.
// The only context we can use for the side effects is the app context.
// Because this can be cancelled by os signals, it's the better solution than creating new background contexts.
// Because this can be canceled by os signals, it's the better solution than creating new background contexts.
binarySignaledCtx context.Context
clock clock.Clock
ticker *clock.Ticker
@@ -8,7 +8,7 @@ import (
"github.com/zitadel/zitadel/internal/zerrors"
)
// golang net/smtp SMTP AUTH LOGIN or PLAIN Auth Handler
// golang net/smtp: SMTP AUTH LOGIN or PLAIN Auth Handler
// Reference: https://gist.github.com/andelf/5118732?permalink_comment_id=4825669#gistcomment-4825669
func PlainOrLoginAuth(config PlainAuthConfig, host string) smtp.Auth {
@@ -38,7 +38,7 @@ type NotificationWorker struct {
}
// Timeout implements the Timeout-function of [river.Worker].
// Maximum time a job can run before the context gets cancelled.
// Maximum time a job can run before the context gets canceled.
func (w *NotificationWorker) Timeout(*river.Job[*notification.Request]) time.Duration {
return w.config.TransactionDuration
}
+1 -1
View File
@@ -103,7 +103,7 @@ func (w *Worker) reportBaseInformation(ctx context.Context) (string, error) {
func (w *Worker) reportResourceCounts(ctx context.Context, reportID string) error {
lastID := 0
// iterate over the resource counts until there are no more counts to report
// or the context gets cancelled
// or the context gets canceled
for {
select {
case <-ctx.Done():
+2 -2
View File
@@ -246,8 +246,8 @@ func uniqueConstraints(ctx context.Context, tx *sql.Tx, commands []*command) (er
return nil
}
// 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
var deleteUniqueConstraintClause = `
(instance_id = $1 AND unique_type = $2 AND unique_field = (
SELECT unique_field from (