generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- pipes module calls for publishing events through to the controller to the db - fake implementation for tests not included - added TopicEventKey. It will be generally useful I think, but also required for how db events are set up needing a "key" column
- Loading branch information
Showing
22 changed files
with
1,163 additions
and
751 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package dal | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/TBD54566975/ftl/backend/controller/sql" | ||
"github.com/TBD54566975/ftl/internal/model" | ||
) | ||
|
||
func (d *DAL) PublishEventForTopic(ctx context.Context, module, topic string, payload []byte) error { | ||
err := d.db.PublishEventForTopic(ctx, sql.PublishEventForTopicParams{ | ||
Key: model.NewTopicEventKey(module, topic), | ||
Module: module, | ||
Topic: topic, | ||
Payload: payload, | ||
}) | ||
if err != nil { | ||
return translatePGError(err) | ||
} | ||
return nil | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.