Skip to content

Commit

Permalink
refactor(cloudevents-server): add reason filed (#14)
Browse files Browse the repository at this point in the history
Add `reason` filed in table, and adjust the event handler for new
problem case reporting palyload structure.

Signed-off-by: wuhuizuo <wuhuizuo@126.com>
  • Loading branch information
wuhuizuo authored Dec 5, 2023
1 parent 3abea17 commit 462e2b6
Show file tree
Hide file tree
Showing 14 changed files with 259 additions and 43 deletions.
5 changes: 2 additions & 3 deletions cloudevents-server/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@ package main
import (
"context"
"fmt"
"net/http"

"log"
"net/http"

cloudevents "github.com/cloudevents/sdk-go/v2"
cehttp "github.com/cloudevents/sdk-go/v2/protocol/http"
)

func main() {
ctx := cloudevents.ContextWithTarget(context.Background(), "http://localhost:80/events")
ctx := cloudevents.ContextWithTarget(context.Background(), "http://localhost/events")
p, err := cloudevents.NewHTTP()
if err != nil {
log.Fatalf("failed to create protocol: %s", err.Error())
Expand Down
21 changes: 20 additions & 1 deletion cloudevents-server/ent/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions cloudevents-server/ent/migrate/schema.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 55 additions & 1 deletion cloudevents-server/ent/mutation.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 13 additions & 2 deletions cloudevents-server/ent/problemcaserun.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions cloudevents-server/ent/problemcaserun/problemcaserun.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

93 changes: 73 additions & 20 deletions cloudevents-server/ent/problemcaserun/where.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 462e2b6

Please sign in to comment.