Documentation
¶
Index ¶
- func Contains(slice []string, value string) bool
- func DeploymentCreateToUpdate(create body.DeploymentCreate) body.DeploymentUpdate
- func DownloadFile(filepath string, url string) error
- func EnsureFileExists(path string) error
- func FileExists(path string) (bool, error)
- func Float64Pointer(f float64) *float64
- func GetCommonDomain(domains ...string) (string, error)
- func GetNameFromUser() (string, error)
- func GetNames(apiKeys []body.ApiKey) []string
- func HandleResponse(response *resty.Response) error
- func IfNotNilDo[T any](e *T, action func())
- func IntPointer(i int) *int
- func IsEmptyOrNil(image *string) bool
- func IsValidDeplName(name string) bool
- func NotNilOrEmpty(image *string) bool
- func Or[T comparable](vals ...T) T
- func ProcessResponse[T any](responseBody string) (*T, error)
- func ProcessResponseArr[T any](responseBody string) ([]T, error)
- func ProcessUserReadResponse(responseBody string) ([]body.UserRead, error)
- func PtrOr[T comparable](ptr *T, vals ...T) T
- func SafeSend[T any](ch chan T, data T)
- func SetupSignalHandler(done chan bool, handler func())
- func TimeAgo(t *time.Time) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeploymentCreateToUpdate ¶
func DeploymentCreateToUpdate(create body.DeploymentCreate) body.DeploymentUpdate
func DownloadFile ¶
func EnsureFileExists ¶
func FileExists ¶
func Float64Pointer ¶
func GetCommonDomain ¶
GetCommonDomain returns the common domain from multiple domains by removing subdomains. It assumes domains provided are hosts without a scheme.
func GetNameFromUser ¶
func HandleResponse ¶
func IfNotNilDo ¶
func IfNotNilDo[T any](e *T, action func())
func IntPointer ¶
func IsEmptyOrNil ¶
func IsValidDeplName ¶
func NotNilOrEmpty ¶
func Or ¶
func Or[T comparable](vals ...T) T
Returns the first non default value, fallback is default value
func ProcessResponse ¶
func ProcessResponseArr ¶
func ProcessUserReadResponse ¶
func PtrOr ¶
func PtrOr[T comparable](ptr *T, vals ...T) T
Like Or but the first argument is a pointer, that if it is not nil is used
func SetupSignalHandler ¶
func SetupSignalHandler(done chan bool, handler func())
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.