Files
KubeControl/include/kubecontrol/Utils.hpp

48 lines
729 B
C++

#pragma once
#include <string>
#include <algorithm>
namespace kubecontrol
{
enum PullPolicy: uint32_t
{
ALWAYS,
IFNOTPRESENT,
NEVER
};
/**
* @brief translate PullPolicy enum to string
*/
inline std::string toString(const PullPolicy &kind)
{
switch (kind)
{
case PullPolicy::ALWAYS: return "Always";
case PullPolicy::IFNOTPRESENT: return "IfNotPresent";
case PullPolicy::NEVER: return "Never";
default: return "Always";
}
}
class Utils
{
public:
/**
* @brief lowercase a string
*/
static std::string to_lower(std::string);
};
}