mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-22 01:38:11 +00:00
chunk the yaml into sections
This commit is contained in:
14
router/middleware/bus.go
Normal file
14
router/middleware/bus.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"github.com/drone/drone/bus"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func Bus() gin.HandlerFunc {
|
||||
bus_ := bus.New()
|
||||
return func(c *gin.Context) {
|
||||
bus.ToContext(c, bus_)
|
||||
c.Next()
|
||||
}
|
||||
}
|
14
router/middleware/queue.go
Normal file
14
router/middleware/queue.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"github.com/drone/drone/queue"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func Queue() gin.HandlerFunc {
|
||||
queue_ := queue.New()
|
||||
return func(c *gin.Context) {
|
||||
queue.ToContext(c, queue_)
|
||||
c.Next()
|
||||
}
|
||||
}
|
14
router/middleware/stream.go
Normal file
14
router/middleware/stream.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"github.com/drone/drone/stream"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func Stream() gin.HandlerFunc {
|
||||
stream_ := stream.New()
|
||||
return func(c *gin.Context) {
|
||||
stream.ToContext(c, stream_)
|
||||
c.Next()
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user