Separate request data from actor in Event
To clarify the role of actor, the request data that initiates an event has been separated. The ActorRecord is pared down to just the username. This eliminates confusion about where event related data should be added. Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
parent
2aed7c2d0c
commit
1089cae282
@ -336,13 +336,11 @@ func (app *App) eventBridge(ctx *Context, r *http.Request) notifications.Listene
|
||||
// auth system. Would prefer to do this during logging refactor and
|
||||
// addition of user and google context type.
|
||||
actor := notifications.ActorRecord{
|
||||
Name: "--todo--",
|
||||
Addr: r.RemoteAddr,
|
||||
Host: r.Host,
|
||||
RequestID: ctx.RequestID,
|
||||
Name: "--todo--",
|
||||
}
|
||||
request := notifications.NewRequestRecord(ctx.RequestID, r)
|
||||
|
||||
return notifications.NewBridge(ctx.urlBuilder, app.events.source, actor, app.events.sink)
|
||||
return notifications.NewBridge(ctx.urlBuilder, app.events.source, actor, request, app.events.sink)
|
||||
}
|
||||
|
||||
// apiBase implements a simple yes-man for doing overall checks against the
|
||||
|
Loading…
Reference in New Issue
Block a user