Documentation ¶
Index ¶
- Constants
- func DisableAPIMiddleware(enabledAPI bool) gin.HandlerFunc
- func GetTimeNowTruncatedToSeconds() metav1.Time
- func SetUpHealthCheck(server *gin.Engine)
- func SetUpPrometheus(server *gin.Engine)
- func SetUpSwagger(rg *gin.RouterGroup, apiStaticFS http.FileSystem)
- func URLParamsToFilter(c *gin.Context, filter interface{}, fields map[string]int) (size int, page int, err error)
Constants ¶
View Source
const ( MaxSize = 500 FirstPage = 0 SizeURLParamName = "size" PageURLParamName = "page" DisabledAPIErrorMessage = "This API is disabled" )
View Source
const (
HealthCheckURL = "/health"
)
Variables ¶
This section is empty.
Functions ¶
func DisableAPIMiddleware ¶
func DisableAPIMiddleware(enabledAPI bool) gin.HandlerFunc
func GetTimeNowTruncatedToSeconds ¶
Because k8s has only "seconds" precision therefore we should operate the same precision in tests to compare timings in appropriate way
func SetUpHealthCheck ¶
func SetUpPrometheus ¶
func SetUpSwagger ¶
func SetUpSwagger(rg *gin.RouterGroup, apiStaticFS http.FileSystem)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.