Documentation ¶
Index ¶
- func Failed(c *gin.Context, msg string)
- func InitJobRuntimeObjectByKind(kind string) client.Object
- func IsKubedlManagedNamespace(namespace *corev1.Namespace) bool
- func Param(c *gin.Context, param string) string
- func Query(c *gin.Context, param string) string
- func Redirect403(c *gin.Context)
- func Redirect404(c *gin.Context)
- func Redirect500(c *gin.Context)
- func RequestWithHeader(method string, reqUrl string, header map[string]string, ...) (status int, body string, err error)
- func RequestWithPost(reqUrl string, header map[string]string, params map[string]string) (status int, body string, err error)
- func RuntimeObjToMetaObj(obj runtime.Object) (metaObj metav1.Object, ok bool)
- func Succeed(c *gin.Context, obj interface{})
- func TimeTransform(from, to string) (fromTime, toTime time.Time, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsKubedlManagedNamespace ¶ added in v0.4.2
func Redirect403 ¶
func Redirect404 ¶
func Redirect500 ¶
func RequestWithHeader ¶
func RequestWithHeader(method string, reqUrl string, header map[string]string, params map[string]string) (status int, body string, err error)
RequestWithHeader is a http client with header, url, and params
func RequestWithPost ¶
func RequestWithPost(reqUrl string, header map[string]string, params map[string]string) (status int, body string, err error)
RequestWithPost is a http client with url, header and params
func RuntimeObjToMetaObj ¶
func TimeTransform ¶
TimeTransform transforms from-time and to-time from string to a Time instance formatted in RFC3339. Considering time differences between log-timestamp and job-timestamp, we shift 1h earlier for from-time and postpone 1h for to-time.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.