Documentation ¶
Index ¶
- Constants
- func BoolFromPtr(val *bool) bool
- func BoolPtr(b bool) *bool
- func Close(closer io.ReadCloser)
- func DecodeJson(jsonConfig string, target interface{}) error
- func EncodeJson(state interface{}) (string, error)
- func IntOrStrPtr(intOrStr intstr.IntOrString) *intstr.IntOrString
- func IntPtr(val int) *int
- func RemoveNotAllowedCharacters(str string) string
- func RespondWithError(w http.ResponseWriter, status int, err error)
- func Retry(interval time.Duration, count int, operation func() error) error
- func StartWithLetter(str string) string
- func StringPtr(str string) *string
- func TimePtr(time time.Time) *time.Time
- func UnwrapInt(intPtr *int) int
- func UnwrapStr(strPtr *string) string
- func WaitForFunction(interval time.Duration, timeout time.Duration, isReady func() (bool, error)) error
- type Error
- type ErrorResponse
Constants ¶
View Source
const ( ContentTypeApplicationJSON = "application/json" HeaderContentType = "Content-Type" )
Variables ¶
This section is empty.
Functions ¶
func BoolFromPtr ¶
func Close ¶
func Close(closer io.ReadCloser)
func DecodeJson ¶
func EncodeJson ¶
func IntOrStrPtr ¶
func IntOrStrPtr(intOrStr intstr.IntOrString) *intstr.IntOrString
func RemoveNotAllowedCharacters ¶
RemoveNotAllowedCharacters returns string containing only alphanumeric characters or hyphens
func RespondWithError ¶
func RespondWithError(w http.ResponseWriter, status int, err error)
func StartWithLetter ¶
StartWithLetter returns given string but starting with letter
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
Errors []Error `json:"errors"`
}
Click to show internal directories.
Click to hide internal directories.