mirror of
https://github.com/Dvorinka/Containr.git
synced 2026-06-04 04:22:57 +00:00
26 lines
596 B
Go
26 lines
596 B
Go
package api
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func respondFeatureUnavailable(c *gin.Context, feature string, details string) {
|
|
c.JSON(http.StatusNotImplemented, gin.H{
|
|
"error": "Feature not implemented",
|
|
"code": "FEATURE_NOT_IMPLEMENTED",
|
|
"feature": feature,
|
|
"details": details,
|
|
})
|
|
}
|
|
|
|
func respondDependencyUnavailable(c *gin.Context, dependency string, details string) {
|
|
c.JSON(http.StatusServiceUnavailable, gin.H{
|
|
"error": "Dependency unavailable",
|
|
"code": "DEPENDENCY_UNAVAILABLE",
|
|
"dependency": dependency,
|
|
"details": details,
|
|
})
|
|
}
|