Skip to content

Commit

Permalink
events: Add project field to Event.
Browse files Browse the repository at this point in the history
This is necessary to enable "project-level" events. Before this commit, Events could only be used at the "app-level".
  • Loading branch information
paladin-devops committed Aug 9, 2023
1 parent 6fd19a3 commit 95d63f2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
12 changes: 12 additions & 0 deletions pkg/server/gen/server.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -7124,6 +7124,12 @@
"type": "string"
},
"collectionFormat": "multi"
},
{
"name": "project.project",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
Expand Down Expand Up @@ -7284,6 +7290,12 @@
"type": "string"
},
"collectionFormat": "multi"
},
{
"name": "project.project",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
Expand Down
3 changes: 3 additions & 0 deletions pkg/server/proto/server.proto
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,9 @@ message UI {

PaginationRequest pagination = 3;
SortingRequest sorting = 4;

// Project that the events belong to
Ref.Project project = 5;
}

message ListEventsResponse {
Expand Down
4 changes: 3 additions & 1 deletion pkg/serverstate/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@
package serverstate

import (
"github.com/hashicorp/waypoint/pkg/server/gen"
"time"

"github.com/hashicorp/waypoint/pkg/server/gen"
)

type Event struct {
Application *gen.Ref_Application
Project *gen.Project
EventTimestamp time.Time
EventType string
EventData []byte
Expand Down

0 comments on commit 95d63f2

Please sign in to comment.