mirror of
https://github.com/rclone/rclone.git
synced 2024-11-28 03:14:55 +01:00
6427029c4e
* Update all dependencies * Remove all `[[constraint]]` from Gopkg.toml * Add in the minimum number of `[[override]]` to build * Remove go get of github.com/inconshreveable/mousetrap as it is vendored * Update docs with new policy on constraints
29 lines
488 B
Go
29 lines
488 B
Go
// +build codegen
|
|
|
|
package api
|
|
|
|
func (a *API) suppressEventStreams() {
|
|
const eventStreamMemberName = "EventStream"
|
|
|
|
for name, op := range a.Operations {
|
|
outbound := hasEventStream(op.InputRef.Shape)
|
|
inbound := hasEventStream(op.OutputRef.Shape)
|
|
|
|
if !(outbound || inbound) {
|
|
continue
|
|
}
|
|
|
|
a.removeOperation(name)
|
|
}
|
|
}
|
|
|
|
func hasEventStream(topShape *Shape) bool {
|
|
for _, ref := range topShape.MemberRefs {
|
|
if ref.Shape.IsEventStream {
|
|
return true
|
|
}
|
|
}
|
|
|
|
return false
|
|
}
|