mirror of
https://github.com/semaphoreui/semaphore.git
synced 2025-01-07 16:42:41 +01:00
feat(tf): mocks
This commit is contained in:
parent
3018d614e8
commit
3f0c8846cd
@ -100,6 +100,11 @@ func Route() *mux.Router {
|
||||
publicWebHookRouter.Use(StoreMiddleware, JSONMiddleware)
|
||||
publicWebHookRouter.Path("/integrations/{integration_alias}").HandlerFunc(ReceiveIntegration).Methods("POST", "GET", "OPTIONS")
|
||||
|
||||
publicWebHookRouter.Path("/terraform/{alias}").HandlerFunc(getTerraformState).Methods("GET")
|
||||
publicWebHookRouter.Path("/terraform/{alias}").HandlerFunc(addTerraformState).Methods("POST")
|
||||
publicWebHookRouter.Path("/terraform/{alias}").HandlerFunc(lockTerraformState).Methods("LOCK")
|
||||
publicWebHookRouter.Path("/terraform/{alias}").HandlerFunc(unlockTerraformState).Methods("UNLOCK")
|
||||
|
||||
authenticatedWS := r.PathPrefix(webPath + "api").Subrouter()
|
||||
authenticatedWS.Use(JSONMiddleware, authenticationWithStore)
|
||||
authenticatedWS.Path("/ws").HandlerFunc(sockets.Handler).Methods("GET", "HEAD")
|
||||
|
21
api/terraform.go
Normal file
21
api/terraform.go
Normal file
@ -0,0 +1,21 @@
|
||||
//go:build !pro
|
||||
|
||||
package api
|
||||
|
||||
import "net/http"
|
||||
|
||||
func getTerraformState(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
}
|
||||
|
||||
func addTerraformState(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
}
|
||||
|
||||
func lockTerraformState(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
}
|
||||
|
||||
func unlockTerraformState(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
}
|
Loading…
Reference in New Issue
Block a user